First thing I did after all that thinking was create a level class and a tile class. The level class contains a grid of tiles, a timer for when we eventually implement the timing mechanism, a starting point and a ending point.
This is the format of the level file. Each character represents a different type of tile and is separated by a blank space. This file is then read in line by line. By using the blank spaces as a separator I split the line up and converted each character into a tile object. Each tile object has an x/y location and a tile id. After that all that is left to do is to draw them on the screen.
This image shows the level when drawn using temporary tile images.


cool. interesting!
ReplyDelete