2d side scroller map editor
Hi,
I need tips for how to make a map editor for a 2d side scroller. By that I mean a way to build the levels that the game runs.
Thanks
Case
I need tips for how to make a map editor for a 2d side scroller. By that I mean a way to build the levels that the game runs.
Thanks
Case
You could check out LevelCreator for ideas. It works very well, however isn't OS X compatible. I want to make a Cocoa-equivalent of this, but haven't yet.
I'm using LevelCreator to make the levels for my game, despite the fact that I have to boot up classic to use it.
-Jon
I'm using LevelCreator to make the levels for my game, despite the fact that I have to boot up classic to use it.
-Jon
The best way is with tiles. Make your tiles 40 x 40 or whatever, and then just make a grid for your map editor. Load the tiles you'll use for the game, and then when you click in a square on the grid, draw the tile picture.
Save the grid size, and number each square according to the tile that was placed there. Also save the tiles' positions. Then load the picture for each the tile, and set it to its position.
This is also a simple way to do bad guys or any other sprites. Have them as a special tile when you make the tile map. Then when you load the map, change that tile to a background tile, (maybe transparent) and use that tile position to see the sprites position.
Its also easy to animate tile, like for a waterfall etc. Just have the first tile frame for the editor, and then in the code, if you see that tile animate it.
Save the grid size, and number each square according to the tile that was placed there. Also save the tiles' positions. Then load the picture for each the tile, and set it to its position.
This is also a simple way to do bad guys or any other sprites. Have them as a special tile when you make the tile map. Then when you load the map, change that tile to a background tile, (maybe transparent) and use that tile position to see the sprites position.
Its also easy to animate tile, like for a waterfall etc. Just have the first tile frame for the editor, and then in the code, if you see that tile animate it.
if you use opengl its better to use ttile like 64x64 or 128x128... ;-)
you can make you editor, its easy , just store your data in Map[40][300] and save the data in a text file
this is the easy way, after you can improve it by adding information in you text file about light, smoke or effet and what tiles to download in memory
and if you want to make collision with your tiles you can make some group of tiles.. like tiles from 0 to 99 are solide 100 to 110 kill your ship(or whatever)
voila
you can make you editor, its easy , just store your data in Map[40][300] and save the data in a text file
this is the easy way, after you can improve it by adding information in you text file about light, smoke or effet and what tiles to download in memory
and if you want to make collision with your tiles you can make some group of tiles.. like tiles from 0 to 99 are solide 100 to 110 kill your ship(or whatever)
voila

If you drop Rage 128 support (and thus only support Quartz Extreme capable machines) you can use any tile size you want. GF2/Radeon and newer all support rectangle textures.
However, rectangular textures don't support mipmapping, which will look bad if you're not always drawing them at the size they were meant to be drawn.
1 rule : makie it good make it square make it opengl !
Possibly Related Threads...
Thread: | Author | Replies: | Views: | Last Post | |
Good storyline for 2d fps side-scroller? | Elfenlyte | 16 | 11,958 |
Mar 13, 2007 05:39 PM Last Post: igame3d |
|
The joy of side-scrollers | Griggs | 35 | 21,395 |
Oct 14, 2002 07:34 PM Last Post: Feanor |