Game Development Reference
In-Depth Information
//gathered with the
previous step
Draw(); //Draws graphics on
screen,
//a process called
Render.
}
}
In this piece of script, the loop given by the HandleInput() , Update() , and
Draw() functions is repeated as long as the gameEnded variable remains true .
At some point that variable turns its value to false , likely due to the main character
death. The loop then stops, the Game Over message is displayed, and the game
gets ready to start a new match.
Termination
The final section is termination. The player decided to quit playing, so it is time to
clean up the system memory from any residual of the game routines and perform
any shut-down operation required.
This phase is especially important for smartphones, which are kind of omnitools that
solve many different tasks. You surely don't want a game that keeps running on your
device, sucking down system resources, and slowing down its performances.
Conclusion
This is the basic plan all games stick to, regardless of platform and programming
language. The internet is full of resources to develop the game structure of a game
in any language you may want to use.
We thus close this section with a few pieces of advice. One is to draw on screen
only after all other operations regarding the game logic are performed. Otherwise,
the player could experience errors, for example, on the position of game objects.
Search WWH ::




Custom Search