Tag Archives: projects

Python || Aku Aku Snake Game Using Pygame

The following is another homework assignment which was presented in an Introduction to Game Design and Production class. This project is an implementation of the classic “Snake” game using Python 3.2 and Pygame 1.9.2a0.

REQUIRED KNOWLEDGE FOR THIS PROGRAM

Pygame - How To Install
Pygame - Download Here
How To Use Pygame
How To Create Executable Python Programs
Aku Aku Snake! Source Code - Click Here To Download
Aku Aku Snake! Executable File - Click Here To Download

==== 1. DESCRIPTION ====

Aku Aku Snake is a new take on the classic “snake” game. It features ten levels, with characters and sounds taken from the PlayStation hit: “Crash Bandicoot 2: Cortex Strikes Back.” The purpose of this game is to successfully complete all ten levels in the fewest amount of retries possible.

To advance in the game, each round the player must consume a specified number of fruit items. Once the required score is obtained during each round, a new one is started. This process is repeated until the player finishes all ten levels. But watch out! The game gets harder as the game progresses.

==== 2. USAGE ====

This game utilizes the python “pygame” module. To play this game, it is assumed that the user already has python 3 and pygame installed on their computer. If that is not the case, here are documents explaining how to obtain the necessary resources for play.

How to install Python:


Install Python

How to install Pygame:


Pygame - How To Install
Pygame - Download Here

After the required resources are obtained, to start the game, the easiest way this to do would be to extract the entire .zip file into the directory of your choice, and to simply run the “main.py” source file through the python interpreter. Once the “main.py” source file is ran through the python interpreter, the game should automatically start.

NOTE: Python and Pygame are not needed to play the executable file!

==== 3. EXTERNAL DEPENDENCIES ====

Other than the pygame module and the “main.py” file mentioned above, there are eight other source files this program depends on. The additional source files should be saved within the “libs” folder, which is located in the directory: “data -> libs”

The following is a brief description of each additional source file.

• “gameBoard.py” sets up the game board and background images for display. This class also reads files (images/fonts) from the “img” & “fnt” directory for use within this program.

• “gameMusic.py” sets up the game sounds and music. This class also reads files (.ogg) from the “snd” directory for use within this program.

• “gameSave.py” sets up the game to have the ability to save its current status. This class uses the “pickle” module to save the players current progress to a file.

• “snake.py” sets up the snake for display on the game board. This class also reads files (images) from the “img” directory for use within this program.

• “fruit.py” sets up the fruit for display on the game board. This class also reads files (images) from the “img” directory for use within this program.

• “enemy.py” sets up the enemies for display on the game board. This class also reads files (images) from the “img” directory, and uses the “spriteStripAnim” class for use within this program.

• “spriteSheet.py” handles sprite sheet animations.

• “spriteStripAnim.py” extends the spriteSheet.py module, providing an iterator (iter() and next() methods), and a __add__() method for joining strips, which comes in handy when a strip wraps to the next row.

These additional files are located within the directory: “data -> libs” folder.

==== 4. FEATURES ====

This game features various colorful images and background music which are taken from the original Crash Bandicoot game. Each level in this game features background music that are unique to each level.

The most useful feature implemented in this game is the “save game” element, which allows a player to save their current progress at any moment during gameplay. This allows a player to save their current status and continue playing the game at a later date if they desire.

To save the game, during gameplay simply click on the boss image in the upper right corner. Once the save is complete, a sound jingle will play confirming the successful save.

This game also features two modes of operation: “Easy” and “Hard” mode. When easy mode is selected, the game saves the user’s current game progress every time they die, but when hard mode is selected, that feature is turned off and the user HAS to save their current progress manually, or else it will be lost after each death.

Here are screenshots of the game during play. (on all images, click to enlarge)

Aku Aku Snake! Screenshots SelectShow

==== 5. DOWNLOAD AND PLAY ====

Aku Aku Snake! Source Code - Click Here To Download
Aku Aku Snake! Executable File - Click Here To Download

NOTE: Python and Pygame are not needed to play the executable file!

Python || Brainy Memory Game Using Pygame

The following is another homework assignment which was presented in an Introduction to Game Design and Production class. This project is an implementation of the classic “Memory” game using Python 3.2 and Pygame 1.9.2a0.

REQUIRED KNOWLEDGE FOR THIS PROGRAM

Pygame - How To Install
Pygame - Download Here
How To Use Pygame
How To Create Executable Python Programs
Brainy Memory Game Source Code - Click Here To Download
Brainy Memory Game Executable File - Click Here To Download

==== 1. DESCRIPTION ====

Brainy Memory Game is a mind stimulating educational card game in which an assortment of cards are laid face down on a surface, and the player tries to find and uncover two identical pairs. If the two selected cards match, they are removed from gameplay. If the two selected cards do not match, both of the cards are turned back over, and the process repeats until all identical matching cards have been uncovered! The object of this game is to find identical pairs of two matching cards in the fewest number of turns possible. This game can be played alone or with multiple players, and is especially challenging for children and adults alike.

==== 2. USAGE ====

This game utilizes the python “pygame” module. To play this game, it is assumed that the user already has python and pygame installed on their computer. If that is not the case, here are documents explaining how to obtain the necessary resources for play.

How to install Python:


Install Python

How to install Pygame:


Pygame - How To Install
Pygame - Download Here

After the required resources are obtained, to start the game, the easiest way to do this would be to extract the entire .zip file into the directory of your choice, and to simply run the “memory.py” source file through the python interpreter. Once the “memory.py” source file is ran through the python interpreter, the game should automatically start.

NOTE: Python and Pygame are not needed to play the executable file!

==== 3. EXTERNAL DEPENDENCIES ====

Other than the pygame module and the memory.py file mentioned above, there are two other source files this program depends on. They are named “gameBoard.py” and “gameMusic.py.”

• “gameBoard.py” sets up the game board and playing cards for display. It also reads files (images/fonts) from the “img” & “fnt “directory for use within this program.

• “gameMusic.py” sets up the game sounds and music. It also reads files (.ogg/.wav) from the “snd” directory for use within this program.

Both of these source files should be located in the same directory as “memory.py”

==== 4. FEATURES ====

This game features various colorful images and sounds for a pleasant user experience. By default, there are 27 playing cards (image size: 80×80) for use located in the “img” folder, and more can be added by the player in the future if they desire.

There are four attainable memory ranks available in this game, with two of them being displayed below. Play the full game to discover the rest!

Here are screenshots of the game during play. (on all images, click to enlarge)

Brainy Memory Game Screenshots SelectShow

==== 5. DOWNLOAD AND PLAY ====


Brainy Memory Game Source Code - Click Here To Download
Brainy Memory Game Executable File - Click Here To Download

NOTE: Python and Pygame are not needed to play the executable file!