DEV Community

Aaron Ransley
Aaron Ransley

Posted on • Edited on

Discussion: Physics Sandboxes vs. Deterministic Event Timelines

I wanted to ask a question I've always wondered about to the larger crowd of gamedevs out there:

Why is there often a disconnect between the movement / locomotion systems that a player interacts with, and the ones used in cutscenes or other in-game events?

This is a super open-ended and broad question, so I'll give some examples:


As a player in a game with a 3rd person action RPG style camera system, I run to a ledge and press the jump button.

  1. My character is propelled upwards and then falls to the ground below.
  2. The speed at which I feel rise to the apex of my jump and the speed at which I fall to the ground are consistent with jumps I've made in other areas of the game.
  3. Everything feels grounded and consistent.
  4. Nice!

As a player in a game with a 3rd person action RPG style camera, an in-game event begins.

  1. An NPC spawns on a ledge above me and moves towards the edge. 1. They jump off the ledge, but rather than rising to the apex of their jump and falling to the ground at a consistent speed, they seem to travel more quickly or more slowly than I would as a player.
  2. The NPC appears stiff, glued to a precalculated path, their animations playing out at whatever speed will guarantee they travel from Point A to Point B in exactly 1.2 seconds.
  3. Do the physics calculations in this world not apply to them as they do to me?
  4. I feel pulled out of the world and hyper aware of the "gaminess" of what is happening on screen.
  5. Bleh.

As a player, I'm zooming around the world of Destiny 2.

  1. I'm on my sparrow, a space-magic imbued mount that has S+ tier game-feel baked in every way.
  2. My field of view changes as I speed up.
  3. I turn and opt to engage the "cornering" button which modifies the sparrow's friction in the environment.
  4. I snap around a corner and press another button to hop off my sparrow.
  5. The momentum of my action launches the sparrow into a nearby wall, and then it falls down a chasm.
  6. I'm so immersed! So present in the game world!
  7. Nice!

As a player, a new "Public Event" starts in the shared game world of Destiny 2.

  1. A "move the payload" prop appears and I hop onto the object.
  2. It's velocity immediately changes from 0 to 100 [insert units] per second.
  3. Ooof, that was a bit jarring.
  4. My field of view does not change while on the payload, despite the speed change.
  5. The payload comes up on a corner and rounds it. It does so with absolute precision, a clean 90-degree arc.
  6. There is no banking of the payload; it does not "lean into" the turn.
  7. An obstacle ahead blocks the path, and the payload stops suddenly. The velocity changes from 100 [insert units] per second to 0.
  8. There is no momentum or sense of physicality to its movements.
  9. I'm pulled from the game world and note the disparity between my actions and those of the props in the world.
  10. Yuck.

Hopefully these examples are illustrative enough to paint the picture I'm trying to communicate. With my understanding of game development systems, I imagine a lot of these disparities are due to developers needing to ensure the determinism of these systems that interact directly with the player.

The Jumping NPC

The NPC needs to spend only X number of seconds in the air, so their act of jumping off a ledge isn't calculated via the physics constants in the world but is instead calculated in a way where gameplay programmers can ensure Actor A can reliably navigate from Transform B to Transform C without unforeseen physics sandbox issues.

The Stiff Payload

Along with the needs of the above w/r/t avoid physics sandbox issues, the payload needs to arrive at each checkpoint in a fixed amount of time. It is simpler to attach the payload to a path and have it advance at a fixed speed, ensuring it arrives at the appropriate time and triggers the next set of event behaviors. The payload does not slow down if it hits a player or a physics prop; it triggers collision on other objects but is not influenced by collision itself.


This all seems to suggest that determinism is the motivating factor here.

In all honesty, my question is almost entirely answered by now, just by typing this all out, but I'd still like to pose it to anyone who may want to weigh in with anecdotes or wisdom:

Why are some systems of a game setup to A) live "in the world", with full collision and kinematics, whereas others seem to be B) built almost like "event timelines" that play out in a predetermined way?

My gut tells me: cost and scope.

While the game-feel and satisfaction of interacting with systems of type A) is unparalleled (think Rockstar's Red Dead Redemption 2, or Arkane sandboxes like Dishonored / Prey), it creates an enormous soup of variables and testing edge cases. Type B) is simply cheaper to implement, more predictable and more easily reasoned about during development and QA cycles.


Jeez, anyways, this is a huge post now so I'm going to sign off on it for now.

Very much looking forward to hearing from folks who have come across these decisions themselves in their games (2D, 3D, VR, I imagine these decisions aren't unique to genre or technologies) and hope to learn more about how y'all make the choice between interactivity + emergent gameplay vs. predictability + guided experiences.

Top comments (1)

Collapse
 
miketalbot profile image
Mike Talbot ⭐

Physics frequently isn't deterministic, randomness is used to resolve complex collisions etc - when you play and something goes wrong then you blame yourself and in all likelihood it is close to being your fault you crashed or missed a turn - if cut sequences did this then it would end up being ridiculous that an NPC randomly killed themselves or made a jump and started talking to the person next to you etc.

Clearly you could spend a lot of time doing either:

  • Better AI logic to resolve issues occuring in the physics system (monitoring the swing of the payload and adjusting the forces involved etc)
  • Higher fidelity paths that are drawn from the physics system but have minor adjustments to ensure the ideal outcomes

I'd guess that the developers have decided to spend their time on places where the player can make a difference and skipped over cut scenes in the games you mention and as you say, that's just about cost and perceived return on the investment.