Big tile maps

Started by
2 comments, last by unfinished 19 years, 4 months ago
I have tried tiling some small maps by hard coding the maps with numbers which represent the different types of tile. I thought of trying to tile big maps but i guess it will be quite tedious to hard code big maps. Can anyone offer any advice how to tile big maps efficently? thanks in advance for any advice
Advertisement
store the data in a text file, load it from there.

[Formerly "capn_midnight". See some of my projects. Find me on twitter tumblr G+ Github.]

Make your self a mapeditor, write it in Java, C# or VB so you can get it done nice and quick.

Split the screen into 2 the left hand 2/3rds of the screen is a grid of blank squares with its X,Y specified by the user at start up. the right hand 1/3rd shows the tilemap (bitmap with your tiles on). Also make the user specify the tile size on startup.

Give both windows scrollbars when the user clicks on a square in the tile map the program makes that tile the "brush" and also logs its position on the map as:
point at mousedown[(int)x/tilesize,(int)y/tilesize)] this will give you the row and column of the tile clicked on,remember to cast them to integers to get rid of any floating points. Next paint the tile on the sqaure the user clicks on in the blank grid.
The blank on screen grid represents a 2D array defined at start up that has as many elements wide and high as the map is TILES (not pixels) wide and high.
When the user clicks on a blank tile in the leftwindow with a brush selected get the: point at mousedown [(int)x/tilesize,(int)y/tilesize)] to get the row and column of the array.
now just write the loggeed x,y from the tile map into x,y co-ord on the array.
When the user is done and clicks save stream the data out of the array into a text file in the manner you will be reading it back.

There you go, a simple map editor with a front end that stores the map in a text file your program can read into an array.
at a later date you can add "paintable" collision data to the choices of your editor, etc.
Try this

Tile Studio

you can cofigure the output file.

This topic is closed to new replies.

Advertisement