Hello heX-
Search this forum for : "2D Map editor"
It is a map editor from juddman and it is pretty good.
There are so many different ways of implementing a map.
The map editor you refer to have a tile-based system which
means that each tile is basically a separate image.
pseudo code:
1 2 3 4 5 6 7 8
| for(int i=0; i < images; i++) image[i]=readImage("tile"+i+".gif");
int GRID=16; int TILESIZE=32; for(int i=0; i < GRID*GRID; i++){ getGraphics().drawImage(image[map[i]], X+( (i%GRID)*TILESIZE ), Y+((i/GRID)*TILESIZE), this); } |
Hope this helps.
Best regards from
M.E.