1

I've been using a tilemap editor for making levels, but I was wondering if there was a way to use PNG images as the level map, as maps created in tiled editor are graphically uninteresting.

Background: I've recently started 2d game development and have learned basics i.e collision, game loop etc. I am developing game in JavaScript for Windows 8, but c#/c++ would work for me also.

Anko
  • 13,393
  • 10
  • 54
  • 82
mshahbazm
  • 121
  • 5

1 Answers1

3

Sure it's possible and it has been done in the past, but there are several advantages and disadvantages associated with using a texture as the map:

  • You'll need some way to determine specific attributes of parts of the map, e.g. whether some position is actually solid, or for other things, such as destructible terrain, ice, etc.
  • Making parts of the map dynamic is rather tricky. So you can't do things such as moving platforms or doors as easy (they'll have to be in a different layer).
  • Doing bigger maps can get rather memory consuming. Also consider limited hardware capabilities (maximum width/height for textures and such).

The only games I can think of right now using images as maps are several artillery clones, such as Worms, Gunbound, Warmux and others.

If you don't want to use repetitive tiles in a tile map, I'd suggest you use polygons to describe your map and separated tiles/textures to decorate your map. E.g. your map file defines the solid outlines of your map and where to place art assets for the solid areas to be visible in some way (e.g. as a rock).

Mario
  • 8,442
  • 1
  • 29
  • 34
  • I appreciate answers, I would have love to up-vote answers that helped me a lot but unfortunately it requires min 15 reputation. – mshahbazm Jan 31 '13 at 14:32
  • No worries, it's how the site works, e.g. to avoid people creating new accounts just to upvote a single posting. :) – Mario Jan 31 '13 at 14:44