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

If I am building my level from a text file


and I want to draw a large image, how do I go about doing that? do I take the image, separate it in tiles (the same size as the other ones) and then add a value to each image


or is there another way to do this? Lets say I want to add a house, or a something like this ship?

enter image description here

share|improve this question
up vote 3 down vote accepted

Old-school RPG engines like that typically render 2 or more layers of tile maps, f.e.:

  • Ground layer (below sprites; roads, floor, etc.)
  • Upper layer (above sprites; stuff in front; the upper part of the ship in your image)

This allows sprites to walk behind stuff on the upper layer. So in your text file, you'd define 2 layers per tilemap, f.e.:

// ground layer

// upper layer

(I'd recommend using 0 as "no tile")

share|improve this answer
very nice, so if this was a house instead of a boat, I would make some of the house tiles on the ground layers, and the rest on the upper layer. And if my house was really large (with 20 different tiles) I would set aside 20 numbers (20-40) as large house tiles – bitbitbot Jun 6 '12 at 21:31
Yeah. If you have a lot of large graphics of which parts aren't reused, you could consider including arbitrarily sized tiles (although probably with dimensions that are integer multiples of a single tile), at the cost of adding some complexity to the engine/renderer. – Torious Jun 6 '12 at 22:00

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.