User Interface Code

A game without a user interface isn't much more than a screen saver. User interface code for games is quite a bit different than the user interface for other software, for two different reasons. First, Microsoft Word doesn't need a joystick, and it probably never will. Games have an amazing variety of user input devices: joysticks, steering wheels, and even fishing poles. The fishing pole has always amazed me. I just can't imagine fishing on my computer, but hey there are tens of thousands of computer fishing enthusiasts that will disagree with me.

Second, the user interface for a game doesn't look like the standard Windows GDI. They have a creative flair, and they should. This means that the user interface code needs to be baked fresh, especially since most operating systems don't have a standard user interface control for a health meter.

The irony of this is that games still need things like a text control, so players can easily enter strings of text for their name or the names of save game files. These controls aren't hard to write, but if you're like me you hate rewriting something that already exists and is well understood by both coders and players. Even so, it is difficult to get a game to hook into things like the Windows GDI because Windows doesn't understand complicated graphics systems that commonly exist in games. Bottom line: You'll probably roll your own, and hopefully keep that code around from game to game so you won't have to rewrite it ever again.

Game Coding Complete
Game Coding Complete
ISBN: 1932111751
EAN: 2147483647
Year: 2003
Pages: 139 © 2008-2017.
If you may any questions please contact us: