Bugsmashers! Episode 15
Transcript — every row opens the video at that moment
- 00:00:00
hey everyone welcome back to all new exciting bug Smashers uh we're going to do things a little bit differently we're going to do things in 3D right no mark That's not how 3D works damn it Randy no all right back to Wy bug [Music] species hey everyone we're here in a fun little test level um actually this is going to be the next uh what do you call it SC 2.000 fun map that you guys will get to play and we have a fun bug where the thrusters stop working after you get in the ship fly it for a bit and then get
- 00:00:50
out of the seat and go back into the seat so we are going to try to replicate that bad boy right now and we are in a local multiplayer server so as as I get into my seat I can see my fun dedicated server I'll hide him off to the side grabs his little joystick wait for all the fun little sequences so much cooler in 3D Randy was wrong so all right we're going to fly up a bit move forward as you can see I could move all way around all right let's hop back out of the seat and see what happens we need like a super hyper State
- 00:01:46
animation for that oh crap Pirates are coming we got to get in the seat fast one day oh no I'm getting shot but I got to turn on all this stuff first and grab my joystick all right so now as you can see trying to move around I know my ship doesn't work no so if I actually turn on mystical pipe system let's this a little bit more readable you'll notice that um all these green things in the power none of them well I should say there's a bunch of items turned on but none of them are in my thrusters so what's happening is when
- 00:02:35
I get into the seat the first time I'm able to use the thrusters and it'll actually show up in this thing and then when I get out of the seat and back into the seat I no longer am able to use the item and as such you don't see them in the um the power request so if I turn off I'll leave that on and we'll go into we call it the shared item manager this bad boy is in charge of saying hey if you sit down in this seat you're going to get access to this item this item this item and this item and it's all controlled by the server so if a sneaky client's like I should get this server will be like nope so when we get a packet from the the server um we'll run through this bit of logic and this is the information we get from the
- 00:03:22
server what's our Authority do we have authority were we denied were we given it was cancelled and the mystical is selected um this selection is basically all right I have the authority now I could actually use the item so if I have ownership of the Thruster I used the Thruster now the Thruster is on and if you you could toggle the Thruster on and off by using it or selection so uh I can turn off the Thruster turn on the Thruster so the selection is basically onof um and when we get or change our Authority or if we change change our selection it will deselect it change the authority and reselect the item if it needs to be and what's happening is when we get out of the seat um we'll get a
- 00:04:11
packet saying hey we're no longer selected and we were selected so we're going to do our deselection cool and it changes the authority getting lost and we don't select it again because well we lost it when we finally get out of the seat The Authority now goes back to um no longer the the owner or the actor it goes back to just being the default thing and what happens is the selection gets stuck it gets set to turn on by default and because it was off and now it's on it gets turned off but then since I left it it still set it's turned on so the selection is still stuck so when I sit back in and this is set the
- 00:05:01
true I never get my selection the client is effectively stuck and where the selection is set the true so what we have to do is instead of serializing the selection cuz yes it may have changed on the server but the client we have we don't want to change it until we have done our selection process so I am going to say hey we're going to store off um we're going to go hey server instead of writing directly into the variable we are going to store it for now and that way we could say hey we were selected and if the server changes
- 00:05:50
it we're not going to change our client state yet until after we have done the thing so that way if the server changes it we we could call the thing correct IR ly so we get changed or anything the client could replicate things so if we don't have an authority so this would mean like uh if we have a turret and we're connecting and for some reason we got our lasers before our turret and it's not in yet we have to put in kind of in a pending list that's what this guy is and fortunately for us the pending stuff will directly cost the selection or not based on this variable so we could just assign it to whatever the server has told us basically it works as what it what has been doing before now um if we're going to do a d selection we want to
- 00:06:39
check what the server is telling us instead of our own State and if we have changed now we change our client State bam we have deselected now we have to do the same thing for the server woo up and we'll change this to our fancy Dancy level or our variable bam so now um when the client gets the server information it won't directly write into that variable instead we will check to see what the client has done assuming we actually have um an basically an authority The Authority is you know the actual um the play player
- 00:07:30
you know sitting down in the seat it's like he you sit here you get this this and this so now that we have the selection and we're making sure that we only set the selection when we have an authority we are going to compile and see what happens recode all right so as you can see in our green little um output that we have here we have no thrusters and when I get off the seat it removed all the pipes because we're not using the thing anymore cool up he'll get up from the seat and then we'll sit down again and once he has seated down we should get all the fun
- 00:08:26
stuff bam I have gotten all the things and now I could fly whoa let my ship figure itself out there we go actually funny enough we only have oh we have quite a few thrusters you can see them here popping in and out as you use the thrusters they'll make heat in this case I'm looking at the heat pipe so but you can see I'm actually flying and everything is connected so we are good to go woo all right uh to recap uh we had a little problem with our item system Authority where the client would get locked into a
- 00:09:15
state of hey you use this item and it would never change it so then when a new guy popped in it wouldn't give you access to you know your thrusters because it was still in the selected state and what I had to do was clean that up a bit so when you get out of the seat it makes sure to set the selection the false and then when you get back into the seat it actually now populates it as true and allows you to do the selection deselection and unfortunately this has never popped up until we got into these bigger maps and we're starting to see some fun little things because we're networking a lot of stuff in these huge Maps so we're getting all these fun little issues that have been around but they're more dominant in these big mapss which is kind of cool because we get to
- 00:10:02
actually fix these things rather than them being you know minute instances that one guy gets but no one else gets so it's pretty cool a little frustrating but we're getting there hope you guys enjoyed till next time this video made possible by the ICC Stellar surveyors and subscribers like you [Applause]
Transcript from YouTube’s automatic captions — punctuation and Star Citizen jargon are approximate. The video itself is hosted by CIG on the official channel.

