QA


Q&A

Q1:

Why doesn't the game engine code include implementations of the game event functions?

A1:

The game event functions are deliberately left unimplemented in the game engine because it is up to each game program to provide implementations for them. This is how the game engine allows games to perform game-specific tasks in a structured manner. Put another way, your job in developing games via the game engine is to flesh out the game event functions with your own game code.

Q2:

Why is the main game window created in the game engine not resizable?

A2:

The main game window is not resizable so that the game code can be dramatically simplified. You will typically create game graphics that target a particular resolution, or game screen size; in which case, all the code in the game revolves around this size. If the user can change the game screen size at will, it becomes very difficult to scale the graphics appropriately. Granted, this is less of a problem in some games in which the playfield is somewhat open -ended (Asteroids, for example), but in other games it can be a real problem because the playfield might be a very specific shape and size (Pac-Man, for example). The game engine allows you to set the game screen to any size you want, but it doesn't allow the user to change that size.



Sams Teach Yourself Game Programming in 24 Hours
Sams Teach Yourself Game Programming in 24 Hours
ISBN: 067232461X
EAN: 2147483647
Year: 2002
Pages: 271

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net