Subliminal
Bugsmashers

Star Citizen: Bugsmashers! - Player Move Requests

15 February 201700:07:51163 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 aent and I'm here to take you behind the scenes on some bugs and how we smash them bug smashes hey everyone we're here in that awesome test level of mine and I have a Gladius and I'm going to pop right down so this bug that we have um came from the physics guys there's you know they're analyzing some things and they found out well we could do some slight optimizations and when we have the player here and he's just

  2. 00:00:53

    walking around he sends move requests to physics to move uh his physics type is known as living body he has ridges and he moves uh organically so when he gets inside of one of these ships Let's see we pop in right there uh we basically take him and snap him to the chair and we keep him there all the time so he doesn't need to do any of these crazy move requests and unfortunately when he's snapped here he's still doing all the move requests uh so pop down in the code uh in this little bit of code that we have here uh this is how will we control the player or any actors um when you want to move left or move right or if the animation wants to force you move to a specific location this bit of code runs and it figures out what it needs to do

  3. 00:01:42

    and it sends either requests to physics or requests to animations do uh some alignment uh so once we get down to this little bit if we're bound to an attachment um which is going to be basically here inside the ship or in a seat or some other um thing that needs to keep the player in a localized area uh we basically if we have an attachment we move all of his U Move request local to that attachment uh that way so if we sit down here he still moves but it's relative to attachment since we're always forcing him to that location and in this bit of code is where we tell physics to stop moving because uh we're basically uh just moving uh the player entity

  4. 00:02:30

    by game code around that uh location Point uh so every frame we're basically saying hey physics stop and what this actually does is the physics code will actually do some internal stuff that basically wakes him up and maybe does some things that were not necessary because well we're doing our own thing uh so the guys in the UK specifically Yen decided what we could do instead if we get get the movement get get we're going to check the status of our

  5. 00:03:21

    position and we're going to see if our position is active we are so we actually want to see the player Dynamics uh so this is something specific to the player physics we want to see what the player is actually doing uh because living entity like I said he's more organic so he has a lot more uh features so we're going to check to see that the player is actively walking so physics is moving him um then we're going to stop it and then from this point on we don't have to tell physics to do anything because he should still be

  6. 00:04:09

    stopped so we'll hit magical recode button no recode ah here's the one fun thing physics this bull not a bull so we got to make sure it's not zero physics does some crazy crazy optimization and tricks especially since it's an old system so which you think is a bll is actually in it Joy recode why are you recode recode go it would help if I used the correct

  7. 00:05:07

    function physics has a prams and status and why don't you want to get ah too early in the morning so physics has PS and status and you have to figure out which uh basically you just look at the function and see if it's param or status and then call the appropriate uh function then of course you have to remember that this takes in a pointer so you have to send in the reference um of the structure so physics could fill it in ah those early mornings when you think you have it down the error code pops up and you're like oh of course all right so we ran it and now that we're inside of the ship we should not be getting any break points in here and of course as we move around the ship we get nothing so if I pop out

  8. 00:05:59

    oh where' my ship go pop back down my guy will won't run in this area with a code but he will do some movement requests down here which will'll send it to physics all we care about though is the attachment so we'll go back in and I'm still free the attachment code kicks in so this is the first time it runs since I was moving around I might be active I'm not active so it clears it and we'll see yep so we never hit it again perfect there you go hope you guys

  9. 00:06:47

    enjoyed so as you guys saw we had a fun little um optimization there uh the physics guys were like Hey we're getting these crazy move requests from the player when they're in the seat they shouldn't even be moving so if we optimize a little bit out um the physics side won't have to do all these crazy calculations when the game side just going to keep snapping them uh so y put in a little fix one two three bam slight easy optimization and we gained quite a big performance um in yeah crusador especially when we have all those AIS running around when we snap them in place they don't need to do physics moves so nice little optimization speeds up the game and it gives you guys that little extra FPS hope you guys enjoyed till next time thank you for watching in so if you want to keep it with the latest and greatest and Star Citizen and Squadron 42's development please follow us on our social media channels see you

  10. 00:07:36

    soon

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