Home > Articles

  • Print
  • + Share This
This chapter is from the book

Q&A

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

  2. 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.

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

  4. 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.

  • + Share This
  • 🔖 Save To Your Account