Original Post
Hello, i'm building a small scale 2d smooth scrolling game..currently i'm working on the map editor and am curious to see if my map format is as good as it could be..currently I have it like this And that's basically my map format as of now..my tiles are all located on a bitmap, and are all numbered I'm not sure if I have too many layers to be able to make a smooth scrolling game...or will that be to much for the computer to handle that fast? My drawing routine maybe a little shaky as well..it goes similar to this..
struct TileData
{
int BackGround; //Layer 1 --Behind Everything
int BackGround2; //Layer 2 --Behind Everything except layer 1
int BackGround3; //Layer 3 --Last layer before the actual characters
int ForeGround; //Layer 4 --This layer would appear in front of the character
int ForeGround2; //Layer 5 --Layer ontop of Layer 4
int Roof; //Roof Layer, this layer will disapeer when a character walks into a building
int Attribute; //warp, door, wall, key..you name it
int Zone; //what monster, music, friendly, indoors?
};
struct MapData
{
char MapName[128]; //name of the map
TileData Tiles[128][128]; //128x128 maps
//maybe more stuff?
};
for(int x=0; x<=12; x++)
{
for(int y=0; y<=12; y++)
{
DrawLayer1(x, y);
DrawLayer2(x, y);
DrawLayer3(x, y);
DrawCharacters(x,y);
DrawLayer4(x, y);
DrawLayer5(x, y);
DrawRoof(x, y);
}
}
so Yeah, I would appreciate it if you guys told me what you think of that, or any enhancements or corrections or ideas you might have..Thanks :-) ArchG