~ Designing games in Pygame and Python

Don't forget to Sign up or Subscribe for freebies and learn how to code games step by step! Series 3 takes you through programming in python and pygame with classes and understanding some of the basics like edge detection and collision detection!

The following games are described in these free Python programming books and their source code is available. However, you can make your own variants.Source: http://inventwithpython.com/blog/2012/02/20/i-need-practice-programming-49-ideas-for-game-clones-to-code/

1. Dodger

Description: Several bad guys fall from the top of the screen, and the user must avoid them. The player can be controlled with the arrow keys or more directly with the mouse. The longer the player lasts without being hit, the higher the score.

Variations: Have enemies fall at different rates and be different sizes. Have enemies fall from more than one side of the game. Have power up pickups that grant invulnerability for a while, slow down bad guys, give the player a temporary "reverse bad guys" power, etc.

This game is covered in Chapter 20 of "Invent with Python"

Download Source: dodger.zip

2. Memory Puzzle

Description: A board full of overturned cards. There is a pair for each card. The player flips over two cards. If they match, then they stay overturned. Otherwise they flip back. The player needs to overturn all the cards in the fewest moves to win.

Variations: Provide "hints" in the form of four possible matching cards after the player flips the first one. Or, quickly overturn groups of cards at the beginning of the game.

This game is covered in Chapter 1 of "Making Games with Python & Pygame"

Download Python Source: memorypuzzle.py

3. Sliding Puzzle

Description: A 4x4 board of numbered tiles has one missing space and is randomly set up. To win the game, the player must slide tiles over to put the tiles back in order.

Variants: Instead of numbers, you can have a scrambled picture cut up into 4x4 tiles.

This game is covered in Chapter 4 of "Making Games with Python & Pygame".

Download Python Source: slidepuzzle.py

4. Simon

Description: Four colored buttons light up in a specific pattern. After displaying the pattern, the player must repeat the pattern by clicking the buttons in proper order. The pattern gets longer each time the player completes the pattern. If the player presses a wrong button, the game ends.

Variant: A nine-button version can add challenge to this game (but more than that would probably just be tedious.)

This game is covered in Chapter 5 of "Making Games with Python & Pygame".

Download Pyhton Source: simulate.py

5. Nibbles

Description: A worm or snake constantly moves around the board. The player controls the direction the "head" of the worm moves, and the worm must try to eat apples that randomly appear. Eating an apply causes the worm to grow in length. The game ends if the worm crashes into the edge of the board or into itself.

Variants: Add walls to the level, instead of just a blank rectangle. Add power ups that the worm can pick up. Add bad guys that move around the board that the worm must avoid. Have two worms that the player must control simultaenously. Tron (see below) is a two-player variant of this game.

This game is covered in Chapter 6 of "Making Games with Python & Pygame".

Download Python Source: wormy.py

6. Tetris

Description: Shapes made up of four blocks fall from the top of the board. The player must rotate and place them to create full rows with no gaps. When a full row is made, the blocks in that row disappear and the blocks above it move down. The game ends if the board fills up.

Variant: Several Tetris variants are listed on Wikipedia. http://en.wikipedia.org/wiki/List_of_Tetris_variants

This game is covered in Chapter 7 of "Making Games with Python & Pygame".

Download Python Source: tetromino.py

7. Katamari Damacy

Description: The original Katamari Damacy game was in a 3d world, but a 2d version is also easy to implement. The player controls a small object in a world of different-sized objects. Touching the smaller objects grows the player, touching the larger objects damages or shrinks the player. The player wins when they reach a certain size.

A flash version of 2D Katamari is available.

This game is covered in Chapter 8 of "Making Games with Python & Pygame"

Download Source: squirrel.zip

8. Sokoban

Description: The player is in a level with objects that need to be pushed over goals. The objects can only be pushed, they can't be pulled. This game does require some effort to design levels for, but Sokoban levels have been designed by others and published on the web.

Variant: Add all sorts of level gimmicks: teleport tiles, conveyor belts, buttons that open doors/bridges, buttons that need an object left on them to keep a door open.

This game is covered in Chapter 9 of "Making Games with Python & Pygame".

Download Source: starpusher.zip

9. Othello

Description: On a grid, a black and white player places tiles of their color on the board. The opponent's tiles between the newly placed tile and that player's existing tiles are flipped to become the color of the player's tiles. The game ends when the board fills up and the player with the most tiles of their color wins.

Variant: Three player Othello with three different colors. Non-square boards.

This game is covered in Chapter 10 of "Making Games with Python & Pygame".

Download Source: flippy.zip

10. Flood It

Description: A grid of six colors of tiles starts off randomly. The player can do a "flood fill" on the top left tile, changing the color of any adjacent tiles of thesame color. The player wins if they are able to make the entire board a single color within a certain number of moves.

Variants: Power ups gained when a certain tile is changed.

This game is covered in Chapter 10 of "Making Games with Python & Pygame".

Download Source: inkspill.zip

11. Connect Four

Description: Two players of different colors drop their tokens on an upright board. The player to make four tokens in a row, column, or diagonal wins. Creating an AI for this requires a simple minimax algorithm.

Variant: Different board sizes. Walls inside the board that appear when the spaces beneath them are filled.

This game is covered in Chapter 10 of "Making Games with Python & Pygame".

Download Source: fourinarow.zip

12. Bejeweled

Description: The board is filled with seven different types of jewels. The player can swap two adjacent jewels to form a three-in-a-row, causing the jewels to disappear and the jewels on top of them to fall down. Creating chain reactions gives bonus points.

Variant: Different power ups for matching a particular jewel. Be able to sometimes swap jewels that are not adjacent to each other. Timed games.

The original Bejeweled game and its sequels are at http://www.bejeweled.com/

This game is covered in Chapter 10 of "Making Games with Python & Pygame".

Download Source: gemgem.zip

Board Games:

Board games are a good source for game clone ideas. A game like Monopoly has far too many rules to put together in a short time frame, but here's a list of board games that have simple mechanics. Chess, Go, and Stratego may be too complicated to create an AI opponent, but in that case you can just make it a two-player game. These games don't really have variants,

13. Mancala

YouTube video showing gameplay. Mancala rules

Description: A stone capture game where the board is made up of 12 pits and a "score pit" that the player tries to move their stones into. A simple minimax algorithm can be used by the AI.

Variants: Wikipedia has a list of "mancala games".

Source code for Awale, a Mancala variant.

14. Tic-tac-toe

Wikipedia page explaining rules.

Description: Players put down their X or O symbol on a 3x3 board and try to get three in a row.

Variants: Using a 3x3x3 board for 3D Tic-tac-toe. Wikipedia has a list of variations.

15. Quarto

Quarto rules YouTube video explaining the rules

Description: Two players take turns setting one of the 16 pieces which is either: tall/short, light/dark, square/circular, and hollow/solid. The goal is to get four in a row of a common trait.

Variants: You can increase the board size and the number of types of pieces.

16. Abalone

Wikipedia page with game rules. YouTube video explaining the rules.

Description: Players move their marbles around a hexagonal board, trying to be the first to push six of the opponent's marbles off the edge of the board.

17. Quoridor

YouTube video explaining the Quoridor rules

Description: Two players try to move their token to the other side of the board. On their turn, they can either move their token one space or place a wall on the board. A player cannot completely seal in the other player with a wall. An AI for this game may be too complex, but a two-player version should be simple to implement.

Variants: See Minotaurus, the next game.

18: Minotaurus

YouTube video showing gameplay.

Description: This game is essentially a more complex and multiplayer version of Quoridor, with a "Minotaur" monster added in that can attack players.

Variants: Add different level/wall designs instead of the standard board. Add teleports, or buttons that can activate doors and bridges.

19: Stratego

YouTube video explaining the rules and demonstrating gameplay. Wikipedia page explaining rules.

Description: Two players set up army units on the board and try to determine the strength of their opponent's units. Disinformation is an important aspect of the game.

20: Blackjack

Rules of Blackjack

Description: Blackjack is a classic card game that is simple enough to implement a dealer AI for.

Variants: Variants of Blackjack are listed on the Wikipedia page.

21: Scrabble

YouTube video explaining the rules

Description: Player form words from letter tiles on a board. Rare letters are worth more points. Some spaces on the board give letter or word bonuses. You will need a dictionary file for this program, which you can download from http://wordlist.sourceforge.net/.

Variants: There are too many to list here. See the Wikipedia entry for Scrabble Variants.

22: Grid Lock / Traffic Jam

YouTube video showing gameplay.

Description: The player must slide a target car through an exit, but other cars are blocking the way. Cars can only be moved vertically or horizontally depending on their starting orientation. Level designs can be copied from existing games.

23: Yahtzee

Yahtzee rules explained.

Description: Dice rolling game where the players try to achieve specific patterns of rolls.

Variants: Variants are listed on the Wikipedia page.

24: Risk

YouTube video of Dicewars gameplay.

Description: Each territory has a certain number of armies which can be used to attack adjacent territories. The player can attack as often as they want, but conquering too many territories stretches out their troops so that the territories can be reclaimed easily. Additional armies are given based on conquered territories, so not expanding fast enough will also lead to losing. A straight forward AI is relatively easy to produce.

Variants: Dice Wars is a high-speed Flash game that is similar to Risk.

25: Checkers / Draughts

YouTube link of a Checkers game.

Description: A player moves their pieces diagonally on a board and tries to "jump" the opponent's pieces.

Variants: Some variants are listed on the Wikipedia page for Draughts.

26: Chess

Description: Chess is a classic game, and the rules are explained on Wikipedia.

Variants: Some variants are listed on the Wikipedia page for Chess Variants.

27: Go

Rules explained YouTube video show

Description: Players take turns laying down stones and try to capture areas of the board. See the rules for full details. Even simple Go-playing AIs require deep levels of knowledge, but a two-player game is easy to create.

Action Games:

28: Asteroids

YouTube video showing gameplay

Description: The player rotates a ship to shoot asteroids, which break into two smaller asteroids when hit. The player must avoid being hit by the asteroids which slowly move around the screen. The player has no brakes, and can only slow or stop by using thrust in the opposite direction they are traveling.

Variants: Having different weapons and an occasional UFO that shoots directly at the player.

29: Space Invaders

YouTube video showing gameplay

Description: A few rows of enemies gradually makes they're way down to the player. The player must shoot them all before they reach the bottom.

30: Tron

YouTube video showing gameplay

Description: Players control a constantly moving object that leaves a trail of walls behind it. The player who avoids crashing into a wall longest wins.


31: Missile Command

YouTube video showing gameplay

Description: Missiles are shot up from the ground to hit falling meteors before they hit cities. The missiles must be timed so that they reach their target at the same time that the meteor is there.

Variants: See Rampart below. Different weapon types (the kind used in Scorched Earth) are also possible.

Python source code

32: Pong

YouTube video showing gameplay

Description: A tennis game where players bounce a ball passed the other.

Variants: Several of the same variations found in Arkanoid can be used in Pong. Obstacles can be placed on the map instead of just an open field.

33: Arkanoid

YouTube video showing gameplay

Description: The player controls a paddle that bounces a ball off of bricks in the level. The bricks break when the ball bounces off of them. The level is cleared when all the bricks are destroyed.

Variants: Power ups fall from smashed blocks, including: triple ball, longer paddle, ball breaks through bricks, a laser shoots out from the paddle.

Python sourceanother Python sourceand anotherand another.

34: Maze

Wikipedia entry on Maze Generation Algorithms

Description: Player runs through a maze to the exit. This is more of an exercise in writing maze-generation algorithms.

Variants: Teleports, buttons to control doors, keys to unlock doors, having multiple characters to move around that must work in sync to unblock each other's paths.

Python source codeand another.

35: Scorched Earth / Worms / Gorillas / Angry Birds

YouTube video showing gameplay

Description: Players control tanks on a 2D hilly terrain and enter the numeric angle and velocity of a cannonball shot. The object is hit the other player's tanks.

Variants: Angry Birds is a version of this game that adds a physics engine instead of hills. Different weapon types besides the standard cannonball can be added. Several UI improvements can be made over the original game (using the mouse to enter the angle and velocity, displaying the previous turn's angle and velocity, etc.) Destructible terrain and being able to move the tanks adds a new dimension to the game.

36: Lunar Lander

YouTube video showing gameplay

Description: The player controls a ship that must gently land on a flat surface of the moon. The ship has limited fuel, and using the thrusters affects the momentum of the ship (much like Asteroids).

37: Snood / Bust-a-Move

YouTube video showing gameplay of Snood YouTube video showing gameplay of Bust-a-Move

Description: The top of the board is filled with different colored bubbles. The player must shoot bubbles from the bottom to form a set of three bubbles of the same color in a row to make them disappear. The ceiling lowers over time. The player wins if the board is cleared of bubbles, and loses if the bubbles reach the bottom.

Variants: This is a similar game to Bejeweled, and the power ups used in that game could be used in this one.

38: Fruit Ninja

YouTube video showing gameplay

Description: Objects are thrown up over the screen and the player must drag the mouse over them.

Variants: Bonuses for combos. Some objects cause the player to lose if they are touched.

39: Last Stand

Link to the original Flash game

Description: On each round, a wave of zombies attacks a barricade while the player shoots from behind it. Several shots are needed to kill a zombie and accuracy counts. When the zombies reach the barricade they begin to damage it. The player loses if the barricade is destroyed. After each round, the player can spend actions on finding new weapons, finding other survivors to help defend, or repairing the barricade.

Variants: Different zombie types (armored, fast moving-dog zombies, etc.) and weapons can be used (mines, grenades, traps).

40: Duck Hunt

YouTube video showing gameplay

Description: Ducks fly around the screen and the player must click on them to shoot them. The player has limited ammo.

Variants: The flight patterns of the ducks/objects can be changed.

41: Rampart

YouTube video showing gameplay

Description: The player alternates between building fortifications (to house cannons) and shooting at incoming ships. This game is similar to Missile Command, with a building mechanic added in.

Variants: Different enemy types (slow moving, armored ships or fast moving airplanes) and weapons can be added. Add different strength walls to build.

42: Bloxorz

YouTube video showing gameplay

Description: A puzzle game where the player must roll over a 2x1 brick to an exit point on the map. The brick cannot be moved off the edge of the board, and since it can only be flipped end over end and not slid around, the 2x1 nature restricts the types of moves it can make.

43: Dr. Mario

YouTube video showing gameplay

Description: A Tetris-like game where two-colored pills fall on different colored germs. Forming four in a row of the same color germ/pills causes them to disappear. The player wins when all the germs are cleared from the board, and loses if the pills fill up the board.

Variants: Similar to Puyo Puyo.

44: Kirby's Avalanche / Puyo Puyo

YouTube video showing Kirby's Avalanche gameplay Wikipedia entry for Puyo Puyo

Description: Essentially like a two-player Dr. Mario without the germs.

45: Fire 'N' Ice

YouTube video showing gameplay

Description: A very original but obscure puzzle game on the NES. The player controls a wizard who can make and unmake ice cubes, which need to fall on all the fire in a level to clear it. The ice can also be used as platforms, and individual blocks of ice can be pushed around. (As a platformer, making a clone of this might be a bit more involved. But the concept is original enough where I think it'd be worth the effort.)

46: Typespeed

YouTube video showing gameplay

Description: A typing game where words slowly move to the right side of the screen. The player must type the word to make them disappear. The player loses after enough words hit the right side of the screen.

47: Diner Dash

YouTube video showing gameplay

Description: A game where several different tasks in sequence must be managed simultaneously. Diner Dash has a restaurant theme, but other themes could be applied.

Variants: Usually there are ways to streamline tasks by doing them in a certain order (e.g. the player can carry meals for two tables at the same time).

48: Pipe Dream

YouTube video showing gameplay

Description: The player must put down different shaped pipes on the board. The pipes cannot be rotated or moved after placement, but the player does get to see the next several pipes that will be used. A little after the start of the game, water begins to flow through the pipes.

49: Zoop

YouTube video showing gameplay

Description: Colored bubbles begin to appear from four sides of the board. The player can assume the color of the bubbles, and then destroy bubbles of a similar color. The game ends if the bubbles fill up one side of the board.

Click on "Edit on repl.it

Check this out