This question pertains to a type of platform/maze game (made with Unity 5) for typical smartphones (iOS/Android).

This game has following characteristics: 1. an upper limit (about 100) on the amount of rooms 2. 3-5 different "levels", each with a different amount of rooms 3. the shape and type of the "ground" in each room is dynamically generated 4. each room has some items that are dynamically placed in the room but are generated from a prefab

A rough idea on the rooms in this game is given in below screen shot.

enter image description here

In that image only the platforms (black and white tiles) and the ground (light brown) would be shaped by an algorithm. The other objects shown in the image are prefabs that would be located somewhere in the room by an algorithm.

But considering that this game would not exactly be an infinite runner, and since it should run on smart phones, would it be better from performance perspective, to create 100 hard coded rooms instead?


2 Answers 2


It wouldn't be that much of a performance drag. The user would have to wait in order for the level to generate, but other than that it should perform the same as a pre-made level.

100 custom made levels on the other hand would load faster but would take up more storage.

  • \$\begingroup\$ thanks @Daniel. When you say that the 100 custom levels would "take up more memory", do you mean storage memory (as opposed to RAM)? I am asking because would it not be possible to have the game load the rooms as it needs them (or keep only the rooms that are around the players current location in RAM)? \$\endgroup\$
    – user62633
    Sep 27, 2015 at 12:29
  • \$\begingroup\$ Both methods would use the same RAM. The custom 100 levels would take more storage memory. \$\endgroup\$
    – Daniel
    Sep 27, 2015 at 12:33
  • 1
    \$\begingroup\$ We call it "storage" not "storage memory." The amount of space, honestly, would be trivial (kilobytes to megabytes). \$\endgroup\$
    – ashes999
    Oct 28, 2015 at 1:48

What I would do in these situations with the new Unity 5.3.3 patch with the new Scene Management is to create a level editor and save the rooms as scenes. It is fairly easy to create editor functions, you can learn here.

If you are worried with storage, you can make a level editor that converts and store the levels as a .txt file but that would be as asshes999 say, trivial. But I would say the scene approach is better.

Other advantages of making a level editor, is you can extend the level editor functions and make unit tests.


You must log in to answer this question.