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.
This 200-pixel-tall plunger could have every possible input scored, and it’d take approximately no time and no space. If it somehow has a full 16-bit range then the score table would only weigh 256 KB. (Assuming you can’t score five billion on one ball.)
It would be nearly trivial to then nudge inputs onto lower- or higher-scoring values, nearby, at whatever rate maximizes player spending. Because that is the only metric these vampires care about.
This assumes they don’t just rely on the placement of the pegs to work like they do in real life. You know. Like actual pachinko games. High-scoring targets are marked that way because fewer balls go there.
But here’s what I think they actually do:
There might only be 30-odd real positions for the plunger. You can pull it as precisely as you like. It’ll animate like that matters. But you’re just picking a bucket, and in each bucket there’s a range of launch speeds. The game’s been trying random speeds behind-the-scenes. It knows how much each speed will score, when it picks it from that bucket.
That way they can place the pegs and bumpers wherever they damn well please, and the game can still hand you good scores and bad scores at its sole discretion.