Skip to content

Latest commit

 

History

History
 
 

Star - Pusher Game

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Star Pusher Game

Aim

The main of the project is o create a game using pygame.

Purpose

The purpose of this project to make player to think logicallya and having fun.

Short description of package/script

  • If standalone script, short description of script explaining what it achieves.

    The player is in a room with several stars. There are star marks on the grounds of some of the tile sprites in the room. The player must figure out how to push the stars on top of the tiles with star marks. The player cannot push a star if there is a wall or another star behind it. The player cannot pull stars, so if a star gets pushed into a corner, the player will have to restart the level

  • List out the libraries imported.

    1. random
    2. sys
    3. copy
    4. os
    5. pygame

Setup instructions

Install Python 2.8 or above

Install pygame - pip install python

Download the code and extract the file

Keep the background images and code file in same folder.

Run the code by double clicking it.

Enjoy the game...

Workflow

  • Importing the required modules
  • Creating the Data Structures in Star Pusher
  • The “Game State” Data Structure
  • The “Map” Data Structure
  • The “Levels” Data Structure
  • Reading and Writing Text Files for different levels
  • Text Files and Binary Files
  • Writing to Files
  • Reading from Files
  • About the Star Pusher Map File Format
  • Recursive Functions
  • Stack Overflows
  • Preventing Stack Overflows with a Base Case
  • The Flood Fill Algorithm
  • Drawing the Map
  • Checking if the Level is Finished
  • Main loop to execute all functtions

Output

Author(s)

Rammya Dharshini K

Disclaimers, if any

None