Work

BlockEd

The word "Block Ed" written in a tile based editor
C#
WinForms
OpenTK
.NET
OpenGL

We were given the task of reading/writing an XML based file for loading into a game. This file described how to generate the level as tiles. I decided to create the solution in WinForms and use OpenTK library to allow me to render the editor with OpenGL; essentially rendering what the game would look like.

April 2013 | View on YouTube | Download BlockEd | View Source (GitHub)

As part of my second year at University, I did a module called Games Authoring Tools. The module looked at various techniques used for making tools that assist the development of games and make the content pipeline easier to use or manage assets for different target platforms. For the ICA I had to develop a tool that would assist a level designer to quickly manipulate the XML files that the test harness used. I decided to code the tool in C# as I have used Visual Basic in the past so I was familiar with some of the things .NET has to offer. Also I wanted to give myself a little head start in C# due to that being the language used in Games Software Development (see the Cosmic Dust demo).

From the start I knew I needed to use something that would be able to draw quickly due to the amount of tiles. Some people decided to just use GDI, others XNA but I decided to try give OpenTK a go. It’s a nice wrapper of OpenGL for C# which was great as I could apply what I learnt in my 3D Programming module into this ICA so it all came together quite well.

How to use

I tried to make the controls as simple as possible looking into other applications to find out what felt well. In the end I came up with the following:

Keyboard and Mouse

  • Mouse Left Click Interact with the UI, also places a tile if selected
  • Mouse Right Click Removes tiles on selected layer. Launches the Graphic Editor if a tile is right clicked in the tabs.
  • Keys W, A, S, D OR Arrow Keys: Pans the map

Shortcuts

  • CTRL + N: Create a new map
  • CTRL + O: Open a file
  • CTRL + S: Save current map
  • CTRL + Z: Performs Undo
  • CTRL + R: Performs Redo
  • CTRL + G: Toggle layer ghosting
  • CTRL + B: Toggle layer bounds