I'm not sure what the correct term for what I'm looking for is described, so apologies if this is a duplicate question. But is there a term/algorithm for making sure a game is "completable" with relation to an infinite scroller. What I mean by completable is that, if I had a game, where a user has to keep jumping up blocks as the screen tries to catch up with them, how would I ensure that there is always a reachable new block that the user could in theory jump to?

I know in theory I would check how high the user can jump and ensure there is a block within that reach, but is there anything else to it? i.e avoiding expensive checks when placing new blocks to make sure they're not overlapping etc?

I'm specifically looking at html5/js but I wondered if there was a term for this or a specific type of algo that I could investigate?


  • 2
    \$\begingroup\$ You pretty much described it. Know how far your user can jump and don't place a block farther than that. Really that is a simple kinematics calculation and won't be a bottleneck for your game compared to animation. \$\endgroup\$ – mobo Jun 22 '13 at 10:58
  • 2
    \$\begingroup\$ You may like to read gamasutra.com/view/feature/170049/… \$\endgroup\$ – Kelly Thomas Jun 22 '13 at 11:10
  • 3
    \$\begingroup\$ Worrying about expensive checks may be a bit premature when working out playability issues. You can almost always optimize something that becomes a speed problem later but you can't ever ship a game because it's unplayable because you thought a method would be too slow and so you never tried it =) \$\endgroup\$ – Patrick Hughes Jun 22 '13 at 17:49
  • 1
    \$\begingroup\$ Thanks for all the comments guys, really appreciate it. The gamasutra article is very helpful @KellyThomas \$\endgroup\$ – TommyBs Jun 24 '13 at 9:06

One interesting approach I've seen is to make a bot/AI that understands how to play the game. It doesn't even have to be good at it. Just make sure that for any particular point a jump appears necessary/possible that the AI speculatively tries out a good number of them (by simulating the jump) until it finds one it can do. Run the AI on the level some number of times and see if any of those result in completion.

See the Inifinite Mario AI video and supporting articles about this one possible technique. You might notice in the video that the AI is significantly better than a human should be expected to be. You might want to artificially dumb down any such AI to ensure that it represents a reasonable player skill level.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.