Tile Based Level Editor Progress


Well it’s about time isn’t it?  I finally got around to writing this blog post regarding my tile editor.  I recently joined a team to produce an RPG in C# using XNA Studio 3.1, so I figured now would be a good time to put some more work into the tile engine / editor and showcase what is working so far.

As it stands, the editor is pretty robust.  Currently it supports three tile layers, a rear, mid, and foreground layer.  The rear layer is self explanatory.  The mid layer renders over the rear layer to add details, and the foreground layer renders over NPCs, the player, particles, etc (as long as your engine supports it).  The foreground layer is currently tinted yellow so it can be distinguished.

Tiles can be drawn in as single tiles and regions.  You can also choose to fill an entire layer with a single tile if you so choose.

The editor supports multiple collision types such as impassible, platform, slopes, etc.  These are basically just flags that your engine needs to interpret correctly.

The editor also supports spawn points.  Any entity your engine supports can be dumped into a plain text file and the editor will parse it.  The spawn points can be added dynamically to the map.

It also supports a portal layer which allows for areas of the map to be flagged as a portal.  This allows for your engine to do a check against those regions and load a new map as needed.

We also support terrain effects which are regions of the map that will be processed with some sort of effect.  My demo shows this being used with a simple water shader I wrote.

You can set the background color of the map to any of the predefined .NET colors, as well as a custom color using the color wheel.  You can resize the map dynamically as well as specify the tile size to match your tile set.

The next iteration of this editor will support more layers, likely unlimited using just a list of layers.  In addition I plan to implement a sort of multilayer occlusion so that the foreground layer is more or less dynamic.  Different layers will occlude other layers, so on and so forth.  This is not really needed for a platformer, but will be pretty useful in RPG world building.

Videos:

(My apologies as the audio goes out of sync near the end of part 1 and into part 2, blame Camstudio.)

, ,