Game Development Reference
In-Depth Information
Context-Sensitive Help
Context-sensitive help is useful if you have a complicated game with lots of controls.
If the player presses a hot key to launch the help window when a control is
highlighted, the help system can bring up help text that describes what the control
will do. An easy way to do this is to associate an identifier with each control that has
context-sensitive help. In one game, this identifier was the name of the HTML file
associated with that control. When the screen gets the hot key event for help, it first
finds any highlighted control and asks it if it has an associated help file.
Dragging
Controls can initiate a drag event or accept drag events. Drag initiation is simply a
Boolean value that is used to indicate if a drag event can start on top of the control
or not. Drag acceptance is a little more complicated. Most drag events have a source
type, as discussed at the beginning of this chapter. Some controls might accept drags
of different types, given only particular game states. An example of this might be
dragging items around in a fantasy role-playing game. A character in the game
might not be able to accept a dragged object because he
'
s already carrying too
much, and thus not be a legal target for the drag event.
One thing you should be careful of is the discoverability of dragging. Interfaces are
becoming much more point and click, rather than click and hold, drag around, and
release. If dragging is important to your game, as it frequently is in RTS games, just
make sure your players have a good tutorial when the game starts.
Sounds and Animation
Most controls have a sound effect that launches when the button changes state. Some
games associate a single sound effect for every button, but it
s not crazy to give each
control its own sound effect. Animation frames for buttons and other controls are
usually associated with the highlighted state. Instead of a single bitmap, you should
use a bitmap series that loops while the control is highlighted.
'
Some Final User Interface Tips
As parting advice, there are a few random but important tips I can give you on user
interface work.
n All rectangular interfaces are boring.
n Localization can make a mess of your UI.
 
 
 
 
 
Search WWH ::




Custom Search