Skip to content

Code used in the book Python Game Programming By Example. Also did some enhancements.

Notifications You must be signed in to change notification settings

jed1337/Python-game-programming-by-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Game Programming By Example

Code used in the book Python Game Programming By Example by Alejandro Rodas de Paz, and Joseph Howse

Contents

Hello Pong

Breakout implemented with Tkinter natively available with Python HelloPong

Cocos Invaders

Space invaders implemented with the Cocos2d package CocosInvaders

Controls
  • Arrow keys to move
  • Space to shoot
Changes from the book
  • Moved collision logic from Actor to GameLayer
  • Added bunkers
  • Added tests

Tower Defense

A tower defense game implemented with the Cocos2d package, the map is created using Tiled TowerDefense

Running the games

  1. Change directory to a game folder e.g. $cd CocosInvaders
  2. Create a virtual environment $python -m venv venv
  3. Activate the virtual environment $venv\Scripts\activate.bat
  4. Install the game's dependencies $pip install -r dependencies.txt
  5. Run the main application e.g. $python main.py

Running tests

  1. Change directory to a game folder
  2. Run the test python -m unittest discover

About

Code used in the book Python Game Programming By Example. Also did some enhancements.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages