Menu

TMX Map loader with normal mapping

 

This is the first project I made for the “Introduction to Programming” module at Goldsmiths Msc in Computer Games and Entertainment.

It consists on a simple demo for rendering TMX map files (http://doc.mapeditor.org/reference/tmx-map-format/) which can be authored with an external editor called Tiled Editor (http://www.mapeditor.org/)

Essentially TMX files are an XML file defining 2D map properties based in tiles. These tiles are sorted in layers and can be drawn from different textures called tilesets.

In this project, I aimed to make the rendering as efficient as possible by saving as many drawcalls as possible.

Although the project runs inside the Octet framework, the rendering is done directly in OpenGL.

For loading and parsing the TMX files I used the TinyXML library which is integrated in the Octet framework.

The normal maps have been generated using a filter included in Photoshop CC (Filters->3D->Generate Normal map).

Currently the program supports only one point light, however support for more could be added easily.

 

See the code on Github