Game Development Reference
In-Depth Information
Editors Need Robust Error Checking
One thing that is missing is checks on the data types. This occurred because
the author was focusing most of his time on getting C# and C++ to play nice
and trying to stamp out linker errors! However, you should make sure that
data being passed to the editor game engine is all
legitimate. You don
'
t
want to send any data that isn
t appropriate to the unmanaged DLL. At best,
nothing happens. At worst, the entire application crashes, taking with it
several hours of work! There is nothing more dangerous to a programmer
'
'
s
well being than a person whose finest work has been lost by an editor bug.
Future Work
The editor framework presented in this chapter is a great beginning, but there are
plenty of projects ahead for the would-be tools programmer. Remember that a
game editor
s purpose is to enable rapid development and iteration. It should also
be able to optimize the level files so that the game
'
'
s data is always as small as possi-
ble. Here are a few projects you can work on that will push this simple editor toward
that goal:
n Create mouse controls for moving and positioning actors in the game world.
Follow the lead of many commercial editors and create a tool bar that can set
the display panel to move objects instead of the camera.
n Allow object picking with the mouse
this requires some additional cooperation
between the display panel, the EditorHumanView , and the C# application.
n Allow multiple visual displays with a wireframe mode to let game designers have
a fine degree of accuracy when placing actors.
n Create level properties that can be added into the level file for adding back-
ground music or level chaining.
n Create new actor components.
n Add the physics system so objects will already be stable when the game begins
running, and the editor can be sure not to place objects interpenetrating each
other.
n Create the ability for actor components themselves to be instanced so that
if actors only use the default values of the XML definitions in the Assets\
Actors\*.xml files, it doesn
'
t take up more memory in the game or the save
game file.
 
 
Search WWH ::




Custom Search