Game Development Reference
In-Depth Information
Figure 11.8
A tile map.
Here each pound sign represents a wall that blocks the character. The S character
represents the start of the level, and the E represents the end. Here is some rough
code to demonstrate how a level could be built up.
double startX = 0;
double startY = 0;
double tileWidthHeight = 32;
Dictionary < char, TileData > tileLookUp = LoadTileDefinitions();
string levelDef =
"############\n" +
"# #\n" +
"# #\n" +
"#S E#\n" +
"############\n";
Search WWH ::




Custom Search