Discussion: Physics Sandboxes vs. Deterministic Event Timelines
Aaron Ransley
Posted on March 9, 2022
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.
- My character is propelled upwards and then falls to the ground below.
- 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.
- Everything feels grounded and consistent.
- Nice!
As a player in a game with a 3rd person action RPG style camera, an in-game event begins.
- 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.
- 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.
- Do the physics calculations in this world not apply to them as they do to me?
- I feel pulled out of the world and hyper aware of the "gaminess" of what is happening on screen.
- Bleh.
As a player, I'm zooming around the world of Destiny 2.
- I'm on my sparrow, a space-magic imbued mount that has S+ tier game-feel baked in every way.
- My field of view changes as I speed up.
- I turn and opt to engage the "cornering" button which modifies the sparrow's friction in the environment.
- I snap around a corner and press another button to hop off my sparrow.
- The momentum of my action launches the sparrow into a nearby wall, and then it falls down a chasm.
- I'm so immersed! So present in the game world!
- Nice!
As a player, a new "Public Event" starts in the shared game world of Destiny 2.
- A "move the payload" prop appears and I hop onto the object.
- It's velocity immediately changes from 0 to 100 [insert units] per second.
- Ooof, that was a bit jarring.
- My field of view does not change while on the payload, despite the speed change.
- The payload comes up on a corner and rounds it. It does so with absolute precision, a clean 90-degree arc.
- There is no banking of the payload; it does not "lean into" the turn.
- An obstacle ahead blocks the path, and the payload stops suddenly. The velocity changes from 100 [insert units] per second to 0.
- There is no momentum or sense of physicality to its movements.
- I'm pulled from the game world and note the disparity between my actions and those of the props in the world.
- 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 beB)
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.
Posted on March 9, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
November 29, 2024