Skip navigation

I posted the following on the Card Kingdom development blog.

Interactive Wave Editor

As the project nears completion, this will be the last Tool Time post, but I’m ending with a bang. A large part of Card Kingdom is its waves and their design. They are our main mechanic to convey progression and are used to teach the player how to play the game. Therefore, the design of these waves are incredibly important. Before how we were designing waves was on a whiteboard. We used different symbols representing each object type, labels for when and where objects would spawn, and tried to convey how the wave should flow through hand-waving and notes. We would then convert all that to fit in the XML Serialization of the wave, not really knowing exactly if the wave would work or the placement of objects were correct. This took time and a lot of guessing on the part of the designers, and was just an unpleasant experience all around.

The need for a tool to aid in the process of creating, tuning, and visually seeing what is happening in a wave was needed. Enter the Interactive Wave Editor. This tool lets designers create waves with a few mouse clicks and key presses. When complete, the wave can be exported to the proper XML Serialization format with a click of the button. The wave can also be “played,” as in it steps through time, displaying where and when a spawn occurs. Having the ability to “play” a wave will help in the tuning of the wave out of the engine. Without this feature, a wave would have to be run in the engine where the setup time is actually quite long. Loading and constructing all the objects, meshes, textures, and other assets, let alone have to play the wave in order to see if the timing and placement was correct, takes valuable time away from the designers.

The hours it took to build this tool will save countless more with its use.

Here’s an example wave built in the editor:

It’s really not that pretty to look at, but all the functionality is there. I could spend the time and make it pretty, but as with nature of my position on the team, I have other tasks that need to be done. If I had the rest of the project to work on this, it would be beautiful and have more time-saving features, such as an import, but as it stands now, I am very pleased with the results.

Some of the features the wave editor supports:

  • An interactive map that shows spawn locations and ranges
  • Dynamic cache definitions
  • Dynamic position creation and deletion
  • All the types of wave objects currently in use in the game with live updating links to caches and positions
  • “Playback” functionality to step through the wave
  • Export and Save properly formatted XML
  • Define multiple wave events with different parameters for each

You can try the wave editor here. If you come up with a cool wave, post it in the comments and maybe we’ll put it in the game. (Please note that this is an internal tool and will not be supported in the future. I also make no promises that any wave created will go in the final game.)

Lessons Learned

Seeing as this is the last Tool Time post, I will wrap up with some things I’ve learned while making tools for Card Kingdom.

You have to be ready to through out everything and/or have your code never be seen by anyone but yourself. Some programmers cannot get past this. They think every line they write is gold, infallible, and must be in the final production release of the product. As a tools programmer, your work is visible in the final product, it’s just not the line of code that detects when a sword strikes an object; it’s the line that helped the other developers tweak and refine that collision easily and quickly.

Spend the time now to save more in the future. This is probably the main reason tools programmers exist. A great example of this is the interactive wave editor. Before, each refinement of a wave would take, lets say, a minute for each change. If there are 100 changes that need to be made, that’s 100 minutes wasted. Multiply that by how ever many waves are developed and what seemed like a simple task has now taken up countless hours of someone’s time. The dozen or so hours it took to create the wave editor will save multitudes of hours as each tweak can be done and visually shown in seconds.

Functionality beats ascetics every time. This is not to say that a poor user experience is acceptable, but if you’re spending more time making it look pretty than functional, you’re doing it wrong. Functionality is king for a tool, next is ease of use. Marking options clearly with proper and understandable verbiage, having intuitive, natural controls, and providing a tutorial or “how to” section helps everyone involved, but the functionality needs to be there to begin with.

Mirror existing processes/methods, don’t create your own. A tool is supposed to make someones life easier by simplifying common and repeated tasks. Building off these tasks will make the tool easier to grasp by users, and it gives the programmer a solid set of requirements to build from. It falls in the “don’t change what isn’t broken” mentality. While developing the editor mode for the engine, I tried to mirror the free-look camera controls as closely to Maya’s controls as possible. Users that already have experience with Maya would not have to learn a new control scheme just for the engine. This made moving between the two applications seamless and gave me a solid base from which to test while developing.