- Game
- Level
- Room
- Tilex (set of one or more tiles)
- Pattern (matrix of ones and zeroes)
- levelList: list of levels
- roomList: list of rooms
- tlxList: list of tilex objects
- patList: list of patterns
- levelIdx, roomIdx, tlxIdx, patIdx: pointers to linked lists of available (unused) levels, rooms, tilexes, and patterns
- levId: level no.
- height: no. of rows
- width: no. columns
- color: background color
- penColor: color of grid lines
- roomList: list of room indices
- romId: room no.
- levId: level no.
- tlxList: list of tilex indices
Tilex:
- tlxId: tilex no.
- romId: room no.
- levId: level no.
- zOrder: display order, from back to front (equals zero for main tilex object of a room)
- row: row no. of upper left corner
- col: col no. of upper left corner
- height: no. of rows
- width: no. of columns
- color: color of tiles
- penColor: color of grid lines
- fileName: file name of bitmap, if any
- patId: pattern no. (if fileName is empty)
Pattern:
- patId: pattern no.
- patBits: list of h strings (composed of ones and zeroes), each of length w, where h = height and w = width
The above 5 classes will be used by the original version of the Map Editor to create maps of rooms (one map for each level), where rooms contain tilex objects (each tilex is a set of one or more tiles, all of the same color). Some tilex objects contain a bitmap, and are the same size as a single tile.
The 4 classes other than the Game class are each stored on disk in the form of comma-delimited text files. Each of those 4 files are stored in the following directory: C:\Docs\Pygridz\Data\Games\TicTacToe\, where TicTacToe is just a sample game name. For fields which are lists (of indices or strings), each list element appears on a separate line in the text file, preceded by an asterisk character (*). For records which correspond to available (unused) objects, the corresponding line in the text file consists of the index no. of the next available (unused) record, preceded by a slash character (/). Colors are represented by 3 values (RGB) separated by spaces, each value between 0 and 255, all enclosed in parentheses.
No comments:
Post a Comment