Project Information
Written in C#, using .NET, GDI+, and a custom library I wrote.
I love 2D games, but the one thing I didn’t enjoy doing while developing them is manually making levels depending on which API I wanted to use for the rendering or which platform it was for. This project’s purpose is to be a cross-API, cross-platform all purpose 2D map editor, with a library that you don’t have to do much work at all to use. At this stage in development it is currently Graphics-API independent. The only requirement when using the library is writing a function to specific to your API that can render a single tile; the library handles the rest.
Currently work on the C# library is finished, and other libraries to load the map files are being worked on in Java and C++. The editor itself is ongoing development with updates being made to the UI, and new features being added.
The data format of the maps is quite simple, outside of header information, Tilesets store data such as a byte for an ID, a name, and the location of the resource file associated with that Tileset. Layers are made up of an ID, depth, and an array of 32 bit unsigned integers representing the tile data. This 32 bit integer contains a byte for custom-data/collision information, a byte for the Tileset id, a byte for source x, a byte for source y from that Tileset. Currently maps are saved uncompressed however, due to the data format I am using I am going to develop an encoder to compress the data even further using Run-Length Encoding to compress the layers. The format also allows for fast processing as you can easily take advantage of bitmasks to process information about that tile, and it allows high utility.
In the early version you see in the video, the editor currently supports multiple layers, and multiple Tilesets, as well as having a save and load feature. Currently tiles are added and removed from maps using the right(delete) and left(add) mouse buttons while using the Paint Tool, sections are filled using the Fill Tool and left mouse button, and collision data is added using the Collision Tool using again right(delete) and left(add) mouse buttons.
In future iterations the editor are going to include:
- Multiple tools such as, add, delete, fill, copy etc.
- Custom data: create custom data to be encoded into tiles eg:spawn points, exit points
- Updated UI
- Object layer
- Isometric Mode
- And probably more as I think of them!