Sunday, March 31, 2013

TCX Map Editor

The following a blog post I wrote for a video game I developed in a team of four Winter 2013.

During one of our early meetings with our professor, Dr. Zoe Wood, Zoe stressed the importance of having a strong map editor early in the development process. Because the focus of our game is competitive multiplayer, a balanced map would need to be created and recreated in order to achieve our goal.

I started with the concept of the best map editor I've had experience with - Halo's Forge. As a long time Halo fan, Forge is the first thing that pops into my head whenever someone says map editor. The success of Forge is displayed by the numerous community-made maps which Halo pushes into its multiplayer playlists.

When I started designing, the first thing I knew I needed was a virtual trackball. Forge uses the virtual trackball to help place map pieces, and I had already written one as per the requirements of CPE471, Introduction to Graphics, last quarter. The virtual trackball allows the user to manipulate objects through translation, scaling, and rotation.

By the 25% demo, I had a simple map editor. It featured 10 cubes all on virtual trackballs, indexed for selection between each other, but I had so much room for improvement. First I added mesh selection, which changed the object from a cube mesh to a rectangle mesh to a cylinder mesh and much more. I also made the list of meshes dynamic, allowing the removal of meshes and the adding of meshes to the map via buttons.

I ran into an issue at this point. Mouse controls are very good for manipulating an object in 2D space. There's an x-axis and a y-axis to derive inputs from. However, the map editor was in 3D space, and I had no way to control a third axis from the mouse. I decided the quickest solution was to add two buttons to control my third axis. Mouse controls move the objects about the x-axis and z-axis (flat on the floor) while the two buttons control up and down movements (the y-axis).

The map editor has changed as per the specifications of the project. Recently I've added territory and spawn locations to the map editor, and I'm sure there will be more to add later in the quarter.

No comments:

Post a Comment