Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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

I´ve got a question regarding TileMaps. Each level in my game is going to be determined by the length of the tile map. I would like to create a map that will be about 5 mins (in length) long. I want to add depth to my map so I will be making individual layers to create that depth illusion via ParallaxNode. Each independent layer is going to be scrolling automatically at different speeds however the ground layer is going to be scrolling the fastest thus increasing its length being a map that long and the ground layer being longer. Will that bring performance in my game to it's knees?

share|improve this question
up vote 1 down vote accepted

Yes, that should be fine for your needs. Simple all you are doing would be some form of parallax scrolling methods alongside your basic tile-map with X amount of layers. Unlikely to cause you any issues on its own. Really it will depend on what else you have going on, usually things like physics, any other render intensive calls and how many enemies you will have in your game. Like eBusiness said, testing is key to your performance, in regards you should every now and again when you've implemented something new look at "stress testing". How many of X can i have along with X & X before i start losing performance?

Really quite simple things, so shouldn't be too hard. As for simple optimization, remember to:

  1. Only render what is on-screen and can be seen by the player. Which with the iDevice screens won't be that much at all. Your'll probably need to add a simple offset of + 1 to this, as otherwise the player can see the edge tiles being drawn on-screen.

  2. Only render tiles that contain items, you don't want unnecessary draw calls rendering blank tiles.

Hope that answers your question.

share|improve this answer
"Only render what is on-screen and can be seen by the player" Since my map is going to be scrolling automatically with no going back am I going to have to release the layers that are no longer in view or is it best to let them be. Thanks for responding. – user1068384 Jan 24 '12 at 0:22

There is nothing to suggest that this should be problematic, the feature is certainly within the capabilities of an iPhone.

However, as always with regards to performance, testing is key. Whenever you are in doubt, implement as much as is needed to make a benchmark.

share|improve this answer

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.