Children of War Editor

 

Summary:

A level editor application for the game ‘Children of War’. It is a windows form application programmed in C#.

 

Quick Notes:

  • Created in C# using Windows Forms
  • Level editor for another game that I worked on

 

Involvement:

Initially, during the the development of ‘Children of War’, we did not have a level editor. The file format was relatively simply and was written in plain ASCII that could be written and edited using a text editor so we made them by hand. However making precise changes, such as lining up obstacles or objects, in the level using this method was difficult. A level file would need to be saved and lunched in the game before a developer could even see if a change was correct. Each enemy and obstacle also had to be painstakingly manually entered into the level file which could wind up taking an unreasonable amount of time with a large number of enemies and objects. This was time consuming, but at the time neither I nor the other programmer had made an editor and its development was pushed back in favor of working on other pressing matters. The problems with level designing eventually became overwhelming and I was tasked with creating this editor. I designed and programmed it on my own and had to do research into several areas to properly integrate XNA and windows forms as well as learn how to program windows forms. It features drag and drop actor placement, a properties window with fields for individuals values, and a the ability to launch a test game with the level to try it out.

 

Personal Growth:

At the time of my developing this, I had never made an editor and had only worked with windows forms in a class in my freshman year of college. This project gave me the opportunity to work with windows forms applications as well as giving me experience in how a level editor works. It gave me the ability to look into and understand what features are useful in an editor and why. Seeing just how useful a simple updating level view or test game can be to designing gives me a new appreciation good editors and how useful they truly are. It also gave me the chance to explore how to interface an editor with a game and how to organize code to make it easier to share code, run a test game, and level data. Challenges like having to restructure the level class just to move it into an isolated area outside of the game logic so a test level could be run on its own, and having to design and add an enter system to get proprieties from level actors, have helped me understand how a game should be designed in order to make editors more efficient and easier to design.

 

 

Code Samples:

The main editor form code: Divided into sections and featuring overall logic SelectShow
The level display controller: Controls the display of the level and handles logic for drawing various editor items, like selection boxes, and enemy patrol paths SelectShow
IEditorEditable: Defines the interface that is used to get properties about an object into the editor using a generic method, a simple list SelectShow