O'Reilly logo

Program Arcade Games: With Python and Pygame, Fourth Edition by Paul Vincent Craven

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 2

image

Create a Custom Calculator

One of the simplest things that can be done with Python is to use it as a fancy calculator. Wait, a calculator isn’t a game. Why are we talking about calculators? Boring....

Hey, to calculate objects dropping, bullets flying, and high scores, we need calculations. Plus, any true geek will consider a calculator a toy rather than a torture device! Let’s start our game education with calculators. Don’t worry, we’ll start graphics by Chapter 6.

A simple calculator program can be used to ask the user for information and then calculate boring things like mortgage payments, or more exciting things like the trajectory ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required