Star Citizen: Bugsmashers! – Player Move Requests

Star Citizen: Bugsmashers! – Player Move Requests


Closed Captioning provided by Relay.sc Mark Abent: Hey everyone, welcome to Bugsmashers. I’m your host Mark Abent and I’m here
to take you behind the scenes on some bugs and how we smash them. 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 came from the physics
guys, you know, they’re analyzing some things and they found out, ‘well, we could do some
slight optimizations’ and when we have the player and he’s just walking around. He sends move requests to physics to move,
his physics type is known as a living body, he has ridges and he moves organically. So, when he gets inside one of these ships,
let’s see we’ll hop in right there. 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 but unfortunately when we snapped here, he’s still doing all of the move requests. So, pop down into the code. In this little bit of code that we have here,
this is how we control the player or any actors when you want to move left or move right or
if the animation wants to force you to move to a specific location. This little bit of code runs and it figures
out what it needs to do and it sends either requests to physics or requests to animations
to do some alignment. So, once we get down to this little bit, if
we’re bound to an attachment which is going to be basically here inside the ship or in
a seat or some other thing that needs to keep the player in a localized area. We basically, if we have an attachment we
move all of his move requests local to that attachment, that way if we sit down here he
still moves but it’s relative to the attachment because we’re always forcing him to that
location. In this bit of code is where we tell physics
to stop moving because we’re basically just moving the player entity by game code around
that location point. 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. So, the guys in the UK specifically Jens decided
what we could do instead if we get the movement… we’re going to check the status of our position
and we’re going to see if our position is active. We actually want to see the player dynamics. So this is something specific to the player
physics, we want to see what the player is actually doing because living entity like
I said he’s more organic so he has a lot more features. So we’re going to check to see that the
player is actively walking, so physics is moving him then we’re going to stop it. From this point on we don’t have to tell
physics to do anything because he should still be 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 gotta make sure it’s not zero. Physics does some crazy, crazy optimizations
and tricks especially since it’s an old system so what you think is a bull is actually
an ent, joy. Recode. Why are you… ah, recode, recode, go! It would help if I used the correct function,
physics has a params and status and why don’t you want to get… ah. Two early in the morning. So physics has params and status and you have
figure out which… basically you just look at the function to
see if it’s params or status and call it the appropriate function. Then of course you have to remember that this
takes in pointer so you have to send in the reference of the structure so physics can
fill it in. Those early mornings when you think have it
down, the error code pops up and you’re like, ‘oh, of course’. All right, so we ran it and now that’s were
inside the ship we should not be getting any break point in here and of course as we move
around the ship, we get nothing. So if I pop out, where’d my ship go… hop
back down, wooo. My guy won’t run in this area of the code
but he will do some movement requests down here which will 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. Yup, so we never hit it again, perfect. There you go, hope you guys enjoyed. So, as you guys saw we had a fun little optimization
there. The physics guys are 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 it a little bit there, the
physics side won’t have to do all these crazy calculations when the game side is just
going to keep snapping them. So again, just put in a little fix… 1,2,3, bam. Slight easy optimization and we gain quite
a big performance in Crusader especially when we have all those AIs running around and we’re
snapping them into place, you don’t need to do physics moves. So nice little optimization, speeds up the
game and gives you guys that little bit extra FPS. Hope you guys enjoyed, till next time.

Comments

  1. Post
    Author
  2. Post
    Author
  3. Post
    Author
  4. Post
    Author
  5. Post
    Author
  6. Post
    Author
  7. Post
    Author
  8. Post
    Author
  9. Post
    Author
  10. Post
    Author
  11. Post
    Author
  12. Post
    Author
    Shadow4evr

    Lol. on his screen in the to do list, find a way to stop the microwave from sucking all the air out of the players suit. (paraphrased)

  13. Post
    Author
    Challenger CC

    Great job ! But please fix the local physics grit glitching. So i dont get thrown out of my ship everytime i move around and hit a wall.
    Thats your core game feature and dont get addressed.

  14. Post
    Author
    Андрій Хамурда

    Great episode. But i remember that ancient times when Bugsmashers was about smashing gamebreaking bugs not optimisation.

  15. Post
    Author
  16. Post
    Author
  17. Post
    Author
  18. Post
    Author
  19. Post
    Author
    tyoma_14

    Bugsmash the launcher, my dowload speed drops to 0 randomly and I have to delete all the update to get normal speed again.

  20. Post
    Author
  21. Post
    Author
  22. Post
    Author
    Shadow4evr

    MARK ABENT: Does this optimization mean the AI's are now snapped to the floor where they're sitting so we can't push them around and relocate them to Security Station Kareah anymore? Video is at twitch /videos/121812611 Start at 34 mins 30 seconds

  23. Post
    Author
  24. Post
    Author
  25. Post
    Author
  26. Post
    Author
  27. Post
    Author
    Shadow Rose

    When Star Citizen releases it would be very interesting to know the statistics on the project, like how many lines of code in total were written, how many man-hours went into this and so on.

  28. Post
    Author
  29. Post
    Author
  30. Post
    Author
  31. Post
    Author
    HerrBertVanDesgud

    I like the code hint : "TODO: need a way to insert the playre into a anti-mutex volume for SC 4.0 release as the microwave keeps sucking all the air out of the player's suit"

  32. Post
    Author
  33. Post
    Author
  34. Post
    Author
  35. Post
    Author
  36. Post
    Author
  37. Post
    Author
  38. Post
    Author
  39. Post
    Author
  40. Post
    Author
  41. Post
    Author
  42. Post
    Author
  43. Post
    Author
  44. Post
    Author
  45. Post
    Author
  46. Post
    Author
  47. Post
    Author
  48. Post
    Author
    Alphie Wily

    6:41 He's not even using the ladder to get into the ship. How's that a bug you fixed? Oh and what is being addressed here? is it being able to move around while the action is taking place? i'm confused.

  49. Post
    Author
  50. Post
    Author
    ct

    Just gonna mention here, since relevant:
    I really dislike games that snap me into fixed animations. Please just let me walk into a ladder and move up it, like a more traditional FPS. This way I can move up and down whenever I want to, and I can cancel boarding my ship if I realize I need to get off quickly.

  51. Post
    Author
    Tasher Yasher

    fuuuuu slower do it slower! Chris said that version 3.0 will be released in January. Where? 6-7 years have passed .. 130+ million dollars! but we only have 3 locations. lol… this guy works alone?
    7 years of life bring a lot of things, life changing, change of government in the countries, new technologies, start and end the war in the world, discoveries in science, medicine ..
    But in ST we have just 3 locations. Great work!!!

  52. Post
    Author
  53. Post
    Author
  54. Post
    Author
  55. Post
    Author
  56. Post
    Author
  57. Post
    Author
  58. Post
    Author
  59. Post
    Author
    Phillip Mulligan

    I thought they already ditched the old game operation engine codes once they switched to StarEngine or LumberYard. They are still wrestling with legacy CryEngine codes? I'm just glad to experience the results and progression of the game as an alpha tester.

  60. Post
    Author
  61. Post
    Author
  62. Post
    Author
    Youri

    yeah this is fun and all but I've gone into autistic screeching mode because atv didn't arrive Thursday evening (European time)

  63. Post
    Author
  64. Post
    Author
    Recorsi

    There is a bug with the origin 300 series. You cant move your mouse after leaving the cockpit. This is a gamebreaking bug for me because its my only ship

  65. Post
    Author
  66. Post
    Author
    21st CENTURY TV

    Why did you remove when the players and Ai move buttons in ship it make it more real stop taking features off the game and making it more cheap and please when I press f to open ship cockpit and the stares move down we should be able to move away from ship stares without being  automatically pulled in to the stares and cockpit of the ship and we should be able to move up and down in any stares in star citizen just by touching the stares without pressing f.  many thanks 😉

  67. Post
    Author
    Rodolfo Rubens

    3:19 how you do this in VS? Select a block o text, type { to automatically wrap the selection with brackets?
    edit: oops, I mean, I don't know if you pressed "{" to do that with the selection made.

  68. Post
    Author
    kxmode

    // TODO: need a way to insert the player into a anti-mutex volume for SC 4.0 release as the microwave keeps sucking all the air out of the player's suit…

    A wise idea. Too many microwaves in space. Asteroids are full of them!

    P.S. please change "a anti-mutex volume" to "an anti-mutex volume."

Leave a Reply

Your email address will not be published. Required fields are marked *