BUGSMASHERS! Episode 22
Transcript — every row opens the video at that moment
- 00:00:07
[Music] hey everyone welcome to bug Smashers uh today I'm going to show you an awesome bug so let's get started bug smashes hey everyone we are here in Port alisar I really want to say Alistar but we're in alisar alir we're in a port so here in our fancy Dancy Port um we were tracking down some fun bugs in two three where the server after a while just goes completely Bonkers has low FPS and players get weird things like when you Tap a button maybe you don't start shooting because um the servers are you know taking a their
- 00:00:57
sweet time we are here in this fun little Port alar map and we as we were debugging to figure out why the servers were you know having such low FPS we discovered two horrible horrible things one uh ships that get spawned in by players and destroyed outside of the green zone weren't getting cleaned up and they were still there in the levels and the same thing was happening with items so we fixed the issue with the ships no longer um you know or I should say ship's always getting stuck there in the level and now they get properly cleaned up but we noticed something um where our items would actually stick around and on the screen you actually see um all the items that are currently
- 00:01:46
in the level and how many instances so we have a couple ammo crates a couple pistols and a couple repair beams um this is a fresh map um I'm the only player inside and these are the items that just so happen to be there because the designer add of them but if we spawn a fun little ship uh spawn on a hornet oops I have debugging on uh you'll see that a bunch of items just appeared on the list cool uh let's go to where is my ship let's go to my ship I'm going to go through all the levels because I don't feel like walking I am going to now enter my ship and I'm going to blow it
- 00:02:41
up so this might take a little bit to kill myself I'm turning on my ship and Bam all right so now once the HUD initializes I am going to destroy my fun little ship so I blew up my ship and on the top you'll see that um it says my Hornet CU it's telling me that it's destroyed and as you can see the items are all still there so if we wait a moment there it goes the ship went away and if you
- 00:03:29
notice not all of our items disappeared um we still have our debris piece which has some ammo boxes our radar and our laser guns so we're going to wait for the debris let's see so we still have some debris it's takes about 60 seconds for it to go away so wait for it to go bye-bye we still have eight instances oh all the debris pieces just vanished and if you noticed we still have all of these HUD items on the bottom we have
- 00:04:19
Let's see we have some counter measures we have a radar we have missiles we have the self-destruct um some thrusters and some weapons not good so basically if you spawn a bunch of ships and they all die and we take our items and attach it to our debris they never get cleaned up so after a while of playing you we build up these items and these items and these items and that's a lot of crap and unfortunately they get stacked so much um they become a burden on the networking and even on client and server performance so what's happening we go to our lovely debris item um way back
- 00:05:06
when uh when our debris or I should say what our debris item is is anytime you smack into something or your wiing breaks off we take the geometry of the vehicle Stick it to this U entity called a vehicle item de breze and we attach all the weapons and gizmos and stuff onto that item and that controls the geometry and all the it items from then forth uh it used to be that this was all client side so when it got cleaned up um we just hid the you know the item on it because the server still own the item and it would get deleted when the ship get deleted because the item was still technically attached to the ship we just kind of did some magic to put it onto
- 00:05:55
the debris piece however as time went on we were slowly moving this debris piece over to be server and client so client versions would just have geometry server versions would have the actual items and when we actually move the items over now the debris item would own the item and no longer the vehicle so if the vehicle went away the debris piece owned the item if it went away and never deleted up its items you would still have all these items that you see in that fun little list so so all we have to do is when this debris piece goes away we have to make sure to clean up all the items that it owns and that's literally all we have to do uh it's just one of those things we forgot to do when we you know
- 00:06:43
move the debris piece over to server um uh server control with all these items on it so what we're going to do is build again and restart the level and see what happens all right so we are back into our lovely level in the port let's try this fix uh we shall spawn around another Hornet and see what happens still have fly mode where did I go
- 00:07:30
there we are ha all right let's spawn ourselves another f7c spawned it and we got a bunch of items in our list so let's go smash this Hornet wooo and while that happens we are going to cheat oops CU 60 seconds is way too long we're going to delete our debris in 5 seconds all right so recode just
- 00:08:21
finished and now our debris is set to for five seconds so let's smash this ship to Smither boom so our ship is still dead up on the top and all the items from the debris just went away and once our Hornet goes bye-bye we should now see everything go back down yep there we go so when our vehicle goes away all the items it owns get removed and now when our debris pieces get removed all the items it owns now go away so we're no longer leaking items and everyone could have a fun fun day when the 30 Pirates spawn and they kill them all woo hope
- 00:09:10
you guys enjoyed hey everyone as you guys saw we had a little bug with our items where after you kill a ship and it spawns debris pieces the debris goes away the vehicle goes away they all you know they all get cleaned up but our items get stuck there so if you have like a big battle like we have you know all those pirates spawning those 30 some Pirates which is another bug uh you know go and kill them all their items get stuck and stayed in the level and after a while they just build up and build up and build up and the client and server performance just goes bad so as had to clean that up fixed it as you can see it was just a byproduct of us moving the uh debris from Sir or client authorative to server authorative so that we could you know sync what goes to what and you know
- 00:09:58
you always forget one thing and that one thing could have some severe consequences so we figured it out solved it and on to the next bugs hope you guys enjoys see you next time
Transcript from YouTube’s automatic captions — punctuation and Star Citizen jargon are approximate. The video itself is hosted by CIG on the official channel.

