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.

  • Nibodhika@lemmy.world
    link
    fedilink
    arrow-up
    9
    arrow-down
    2
    ·
    5 months ago

    The easy way if doing this is just using a physics engine and calculate the result depending on where the ball lands. Prototyping a game like that would take me a few hours probably.

    That being said if the game asks for money to do anything it’s highly unlikely that that’s what it’s doing, instead it’s probably choosing your result based on how much do they want you to win and then calculate a path for the ball that gets this result.

    Something that makes it difficult to do this second alternative is if you have some semblance of control, e.g. if you choose the strength to use for the ball or something, that makes it slightly trickier to pull off because you’re against the clock on finding a path and might end up with an unrealistic move (however if those round things make the ball kick around like they do on a pin all machine they can be used to set the course you want).

    Long story short it’s easier to do the animation deciding the result but if the game asks for money in exchange for anything in-game it’s more profitable to do the results deciding the animation.

    • fidodo@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 months ago

      I know this game, this is a mini game within the main game and I’m not actually sure how they make money since they have no ads and they shower you with so many power ups that I’ve never come close to running out. I guess lots of players are just bad at the game so they need to buy power ups? This particular mini game doesn’t have any pay to win mechanics, you get balls by beating levels in the main game so it’s just there to encourage reengagement.

      It’s a standard match 3 game but I play it as a fidget game since there are no ads and the levels are reasonably beatable with the tons of power ups they give you.