Aug 31

Bugsmashers: Episode 31

This post is a transcription of Bugsmashers: Episode 31, material that is the intellectual property of Cloud Imperium Games (CIG) and it’s subsidiaries. INN is a Star Citizen fansite and is not officially affiliated with CIG but we reprint their materials with permission as a service to the community. Enjoy!

Bugsmashers: Episode 31 Transcript

Mark Abent: Oh hello there, welcome to Bugsmashers.

Hey everyone, we’re here in fun little environment with two clients in a multiplayer test and we have a bug in that remote ships are not moving, they’re calling it a desync issue so if I fly this guy around, weee. We stop him for a moment so I flew a bit, you’ll see on this client that he’s actually stayed still, nooooo. So, what’s happening. Oh shenanigans, that’s what’s happening… but for real, so if we have a ship and he’s flying around and then some fun guy in the Persistent Universe goes, ‘I want that ship’ and they get into a dogfight and you know, the first player explodes into a glorious fireball. He’ll respawn and from then on you’ll never see the ship move, or other clients won’t except if you wait long enough eventually it’ll start moving along.

What’s happening is the worst thing ever, so we have a ship, I’m going to use… what shall I use today? I will use this paper notebook. So we have this ship and when we spawn him in we give him the ID of let’s just say 2, now he flies around and explodes. We need to spawn a new one because well this guy still wants to dogfight. So we spawn a new ship and we give it the same ID because why not, I mean keep everything the same so we give him the same ID, we give him all his loadout information and he spawns. Problem is when this guy spawns on the server, the other clients may still have the old one around…oh, phone fell… or the old one is gone but they still are getting packets of information from the original ship.

So, IFCS checks to see the last time it has got a response from the server for any packets coming in and if it gets, you know, say a tick from the server of 600 but we just died and we’ve resetted our tick it would get a tick of 600 and it’ll think, ‘oh, we should be at 600, we should be at 600’ but then our new ship starts sending information and the tick’s going to be at 0-1-2-3-4 and it’s going to be like, ‘wait a minute, our last one was 600, our new one is smaller so we’re going to ignore all that’ and because it’s ignoring it, you basically see the remote client just stay still. Not cool.

So, for now what we have done are, let’s just say Sir Paul has done, is he has added a work around that checks to see if there’s some conditions we can see to restart the, you know, the flight controller again. Here you can see if we’re in the bad server state because of the aspect bug it will just allow it and get processed. It’s a good work around for 2.5 and let’s start this up and as this recodes… but it has disclosed a bad thing in our networking code that we’ll have to take a look at soon but it’s going to be such a big change it’s too risky for 2.5. You know, it’s pretty bad when you have a new entity spawn in and it’s getting information from the old system. I mean what happens if you have health of 5 or 10 or you die, you spawn but then you get information that you’re health should be 0 from the server because it’s from the old system and you die again, not cool.

So, there’s going to be some weird oddities until this gets resolved but this work around will at least allow you to fly until the networking issue can get resolved which should happen shortly. So, let’s pop up…recodes still going. Take my sip of coffee. All right, recode is gone. I’m going to move my clients, so as you can see the ship already moved around. Let’s see if we can find him… he snapped to the correct state, where did you go… oh, there he is, there he is. All right, so there’s the other Argo and if I go on here you now correctly see him move about, weee.

Oh the shenanigans of game design or programming, same thing, all right. So, we had a fun little issue with, you know, remote ships just dead stopping. No longer updating when a ship dies and respawns, it would just stay there and some time later it will just start magically working. It was tracked down by Paul, fun bug because it just realized a bigger issue we have where if we use the same entity ID on a ship that we’re… we delete it and spawn a new one with the same entity ID or ID, any old packets that come in the other clients will start using them so with the flight controller it checks to see if the server tick is a certain number and if it gets lower numbers it flat out ignores it.

Paul put in a work around to make sure the ships continue to fly even if it gets some bad information but we’re going to have to look into the deeper issue because we can’t have the network, you know, sending old information to new entities from old entities but you know that’s how it is in working on a game. You think you’ve covered something and then you get a bug that uncovers some crazy other shenanigans. Well, we’ll have to fix it but until next time I hope you guys enjoyed, bye.

About the Author:

Leave a Reply