Quantcast
Channel: Planet Python
Viewing all articles
Browse latest Browse all 23531

Inspired Python: Tower Defense Game: Game Loop and Initializing PyGame

$
0
0

Tower Defense Game: Game Loop and Initializing PyGame

How do you instruct your computer game to draw things to the screen consistently and to a drum-beat that ensures there’s no awkward pauses or jitter? What about listening to the keyboard and mouse inputs, or updating the score board for your game? The physics engine?

Get any one of these things wrong, or forget to do them, and your game misbehaves. Worse, it can misbehave in ways that you won’t necessarily catch on your own machine.

That’s why all computer games – big or small – has one (or more!) game loops that ensure the game carries out its most essential tasks in a repeatable and stable manner.

It’s time to write our skeleton game loop that will serve us throughout the course of the development of our tower defense game.



Read More ->

Viewing all articles
Browse latest Browse all 23531

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>