Advertisement

Tile Map (Prototype - First Iteration)

Tile Map (Prototype - First Iteration) A prototype tile map with a character moving around on top of it. Written in C++ with SFML.

The Map uses a single array to store a collection of tile Ids which refers to a tile within a Palette. The drawing is handled using a height and width variable which is also stored within the Tile Map. The Tile Map itself reads from a simple text file for its data(for now) and a Texture-Sprite pair is used to store the image data.

Insights: Palettizing the Tile data instead of storing the data tile by tile is a waste of resources. The tile palette allows for map to only deal with Id's and has the further benefit of allowing the tile texture to be changed in design time while still having the same map structure. This can be used to solve problems like implementing seasons or biomes.

Iteration)

Post a Comment

0 Comments