Subliminal
Bugsmashers

Star Citizen: Bugsmashers! - Havoc on the IFCS

10 May 201700:09:18178 linesWatch on YouTube ↗

Transcript — every row opens the video at that moment

  1. 00:00:06

    [Music] hey everyone welcome to bug smashers I'm your host mark abent and I'm here to take you behind the scenes on the shenanigans called bugs everyone we are here and blinking legs for that I am going to disable lights not to distract me now we look like a ps2 game excellent so we are in a fun real production map that is a dying star and I disabled lighting because I don't like blinking and we have a bug here where sometimes when I get into a map I can't move

  2. 00:00:58

    and this is the case of the non moveable ships so let's step into John Pritchett's fun is CF code and figure out what's going on we the best part is sometimes when I respawn it works sometimes it doesn't alright so here we are we have two ajaan systems we have the flight controller which is actual ifvs this dictates how the spaceship should move then we have this thruster manager which tells us yes hey I have all these thrusters all over this is how they move which is the acceleration velocity and this could change dynamically in case they get detached or if they get damaged so you have these two systems working in pair

  3. 00:01:45

    so this thruster manager is basically responsible for letting the flight control system know how much thrust is able to be done by the whole ship and I put a breakpoint on this fun little bad boy this tells what the maximum thrust of the whole system is and unfortunately we have this thing called a physics state which John uses to determine the overall physical objects so we have this rigid body which has mass it has speed and has acceleration and it has a bunch of thrust errs on it and what this guy does is the thruster manager says hey I have all these thrusters here and they can move this way this way this way so if the ifcs can move this guy a

  4. 00:02:32

    certain way based on input and move and fire off the thrusters so the thruster manager needs to know a few bits such as the mass of this thing to figure out its acceleration and unfortunately the civic status that the thruster manager sees is all basically zeroed out so according to the thruster manner this thing has no mass so it's going to say that all the thrusters are basically not going to be able to use any acceleration or provide any acceleration on a zero mass object because from the standpoint of the game general mass means static and this just going to stay it you can't have zero mass on a thing so this lovely thing is going to basically return let's step back put a breakpoint actually right here

  5. 00:03:27

    and as you can see our acceleration for the whole system is going to be zero so I can never ever move the joys so let's find out when this M status is set so it's set this is a some debug thing and it's never going to get hit obviously cuz we never hit the breakpoint and tuning so here's something where the thruster manager went in updates its going to capture the civic state of the flight controller so put up the breakpoint there and fought off the breakpoint here and let's continue so we get down begin update and we have actual information key point

  6. 00:04:18

    here we have two updates we have the physics update and then we have the main update the physics update happens in the Civic system so that it can do its physical calculations and we have a main update which is game code specific on how it should provide stop to the physics so in this specific area this is the physics update as you can see we have we're getting our physics information correctly cool let's disable that continue to now we get to the main update and as you can see we have invalid information so where does this happen in the flight controller so the flight controller let's go back this is

  7. 00:05:09

    M status so we have the physics status and we have to discuss four main this will guy works this guy's broken let's find out when this gets updated this gets updated in this is very specific code for track view so it won't get the hit in here this gets called on tuning debug feature won't get called and this gets caught out here we go so here's our update main and before way down here we actually update the thrusters to figure out the new acceleration it's supposed to set the main physics information however it'll bet you do debug all things aha so what

  8. 00:06:07

    this tells us is the flight controller has this variable called n animation mode and because it's true we're never updating the Civic status so thrusters can never figure out their valid acceleration this is fun because this is supposed to be for track view that was that value we saw way up at the top which doesn't get hit this should never be true so let's find out this only gets true when we enter track view information this is not going to hit because we're not in a cinematic sequence and that's the only spot alright let's find out in the code where all this gets set so nowhere does it ever set it except in your track view

  9. 00:06:55

    and in here ah-ha so what's happening is in C++ if you never give this guy an initial value it will be random it will be whatever the memory is in there and as you can tell from this break point it says true followed by a four what that means is we didn't actually set this to a boolean true we set this to true because it had some random data in this memory block so what we have to do for the stick is make sure that we start off false and to validate that we are going to in memory start it false now from then on it will calculate the

  10. 00:07:44

    correct information we continue to do we are now getting correct acceleration and I should be able to fly should I am so all it was was just a simple uninitialized variable causing havoc on the system globally the joys of C++ you have to be very very careful one variable could cause destruction and the whole wiser so zip just adding this will fix it and we no longer will get that random this guy works in this machine it doesn't work on this machine there you go hope you guys enjoy so as you guys saw we had one awesome uninitialized variable where sometimes it was true sometimes it was fault it was pure random and that caused havoc because on

  11. 00:08:33

    my machine that might work on someone else's machine it wouldn't work and it's just disrupted the flow of John's IFES system just making sure that was predefined fixed all the issues so when you hop into a multiplayer at work top and single-player it worked and in that fun track view it worked as intended hope you guys enjoy until next time thank you for watching so if you want to keep it with the latest and greatest in star citizen and squadron 42 development please follow us on our social media channels see you soon you

Transcript from YouTube’s automatic captions — punctuation and Star Citizen jargon are approximate. The video itself is hosted by CIG on the official channel.

Squadron 42

LiveSQ42 Launch Subathon

$2,094of $3,000

Getting Sub to Manchester for the Squadron 42 launch

Next giveawaySubscriber Store pick
$6.27to go