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.
There are only seven buckets. Couldn’t you predetermine the result while also giving the illusion of the physics doing it by just simulating a bunch of slightly varied drops and presenting the first one that gives the desired result?
In this mini game you have fine control of the plunger, so it’s not just 7 bucket animations but also thousands of launch powers and ricochets you need to account for. I’ve played this game, you can reliably and finely adjust where the ball falls with the plunger, but the ricochets off the bumpers are so aggressive it’s impossible to get a consistent result, plus there could be fuzzing on the plunger input.
The fuzzing of the plunger input is what I was thinking about. You could run a bunch of simulations right as the plunger is released with slightly different inputs and then pick the one with the desired result to display on the screen. You’d need to have a pretty efficient simulation, but the user would be none-the-wiser.