Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There is a game called Against The Wall, developed by Michael P. Consoli. It's a fantastic game, as I've always been stumped at how the game creates an infinitely spanning wall.

In the game, you can fall forever, and the wall will keep spanning. I can fall as long as I like, and still be able to climb back to where I was before. The game is developed in Unity.

How can a game do this without crashing, or creating some kind of memory overload?

share|improve this question
It probably starts paging out to the disk at some point. – Vaughan Hilts Nov 11 '12 at 5:48
up vote 8 down vote accepted

There's no need for the wall to actually be infinite in the implementation itself. Games are 99% smoke and mirrors. The game could easily be despawning bits of wall that are too far away and recreating them on demand.

Doing so with the right algorithmic approach would make the wall generation "stable" (that is, if you fall enough and then climb back up, it'll be the same wall layout and not a new random layout). There would be some kind of limit to that based purely on the limits of integer sizes, but this limit can be large enough that it is effectively infinite in practice. If the world eventually wraps (no idea if it does) you can even avoid ever showing the player any "edge" to the world.

The game also possibly moves the wall rather than the player. If the player moved, then eventually the player would move to some coordinate where floating point inaccuracies and imprecision would cause severe errors. Keeping the player at position 0,0,0 and them moving the wall avoids that, as the walls are despawned from memory before they get too far away from the origin.

share|improve this answer
This does not answer the question xD – J. C. Leitão Nov 11 '12 at 6:49
@J.C.Leitão I'm not clear on how this doesn't answer the question... it seems to me like it does. – ktodisco Nov 11 '12 at 7:48
I think it would be better to describe the wall generation as "deterministic" rather than "stable." – ktodisco Nov 11 '12 at 7:49
I tend avoid labeling algorithmic randomness as non-deterministic from a CS purist point of view (since it is quite deterministic, technically speaking; same seed and same series of calls results in the same output), but you're probably right that it's a better term here since that's what most people interpret it to mean. :) – Sean Middleditch Nov 11 '12 at 8:09
@J.C.Leitão: hey, even if it was "how can the game" it'd still be a valid answer, since it's it's one way the game can do it. Now, if it were "how specifically did this game exactly do it," it'd maybe be a bad answer, but then I'd vote to close since the question would be localized and off-topic for GDSE. :p – Sean Middleditch Nov 11 '12 at 9:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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