The main of the project is o create a game using pygame.
The purpose of this project to make player to think logicallya and having fun.
-
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.
- random
- sys
- copy
- os
- pygame
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...
- 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
Rammya Dharshini K
None