Skip to main content

Free Games

Project description

A collection (18) of free python games.

In the first half of 2012, I wrote ten games to teach a group of students some basics of programming. The goal was to have fun as much as it was to learn. Here you’ll find simplified versions of several classics.

In 2013, I used these games again as part of a programming club for high school students at Downtown College Prep in San Jose, CA. At that time, I added a number of new games bringing the total up to eighteen and covering more advanced topics like projectile motion and encryption.

In 2014, I used these games as part of week-long programming club that met in the evenings at The River Church Community in San Jose, CA. Our demographic was middle and high school students.

Each game is entirely independent from the others and includes comments along with a list of exercises to work through with students. Creativity and flexibility is important. There’s no right or wrong way to implement a new feature! You never know which games the students will find really interesting.

Screenshots

Nibbles

Nibbles – like Snake on the old Nokia phones.

Nibbles Free Computer Game

Memory

Memory – match tile pairs of numbers to uncover the hidden image.

Memory Free Computer Game

Tiles

Tiles – shuffle image tiles to solve the puzzle.

Tiles Free Computer Game

Pacman

Pacman – simplified version of the classic.

Pacman Free Computer Game

Maze

Maze – solve a randomly generated maze.

Maze Free Computer Game

Tic Tac Toe

Tic Tac Toe – the classic.

Tic Tac Toe Free Computer Game

Requirements

These games were tested on a Win32 system running Python 2.7 with pygame installed.

Most games should work for Linux-type systems. Where needed (e.g. hangman.py), I tried to make the code cross-platform compatible.

For Python 3 compatibility, you’ll need to run the 2to3 tool, change division (/) to integer division (//), and convert return values of filter(..), map(..), etc. calls to lists.

License

MIT-licensed.

Copyright (c) 2014 Grant Jenks

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.

Curriculum

What follows are notes for a week-long curriculum with about 3 hours of classroom time each day.

Monday

  • Interactive python interpreter

  • nibbles.py - Commenting code

  • guess.py

  • paint.py - Getting help in the ipython interpreter

Tuesday

  • tron.py

  • crypto.py

  • memory.py

Wednesday

  • pacman.py

  • bagels.py

  • cannon.py

  • cups.py

Thursday

  • tictactoe.py

  • hangman.py

  • sonar.py

  • simonsays.py

Friday

  • pong.py

  • connect.py

  • maze.py

  • tiles.py

Tags

  • guess.py | text-based, puzzle

  • hangman.py | text-based, two-player, puzzle

  • crypto.py | text-based, topic:encryption

  • bagels.py | text-based, puzzle

  • connect.py | two-player, game

  • tron.py | two-player, game

  • pong.py | two-player, game

  • maze.py | game, topic:maze

  • cannon.py | game, topic:projectile-motion

  • cups.py | game, topic:animation

  • sonar.py | game, topic:distance

  • nibbles.py | game

  • pacman.py | game

  • tictactoe.py | game, topic:artificial-intelligence

  • memory.py | puzzle, image

  • simonsays.py | game, puzzle

  • tiles.py | puzzle, image

  • paint.py | topic:drawing

  • flappy.py | nyi

Quickstart

Installing Free Python Games is simple with pip:

$ pip install freegames

You can access documentation in the interpreter with Python’s built-in help function:

>>> from freegames import snake
>>> help(snake)

User Guide

For those wanting more details, this part of the documentation describes tutorial, API, and development.

Reference and Indices

Free Python Games License

Copyright 2017 Grant Jenks

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

freegames-1.0.2.tar.gz (660.0 kB view details)

Uploaded Source

Built Distribution

freegames-1.0.2-py2.py3-none-any.whl (27.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file freegames-1.0.2.tar.gz.

File metadata

  • Download URL: freegames-1.0.2.tar.gz
  • Upload date:
  • Size: 660.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for freegames-1.0.2.tar.gz
Algorithm Hash digest
SHA256 3439f002037516a8ef13c993c8eb369f9c2cfcd74cdb393a3b76153846372451
MD5 9ea341b404ef950c5f6e709ec184cbe9
BLAKE2b-256 a7fc0c42f87534549260fa56e97499166cf3fbedf64dfb78f2ec42b98424dfbd

See more details on using hashes here.

File details

Details for the file freegames-1.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for freegames-1.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1140d660d9ae86e5daef8941416539356b38f5490e6e06a8dc44f0a621ef65fc
MD5 83c935da4e4625cc885f45f237402974
BLAKE2b-256 d62ee008adfacd81cda0b3ec00fedfb73ddf0c1c06c6c17b3dba629c2cd5b638

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page