Dear mobile game devs. When I play games like that, I always wonder if it’s the physics engine that’s actually random and produces the result?

Or is the result calculated before the animation happens, and dictates the animation?

I’ve always wondered. I have some notion of programming, but from far back, and I’ve been scratching my head long enough about this.

Thanks in advance.

  • infinitepcg@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    9 months ago

    If the animations look realistic, it’s almost certainly not predetermined

    You could do a perfectly realistic simulation, record the path for each outcome and then play one of them.

    Or, if the physics simulation is deterministic, you could store a set of starting positions and their outcomes.