The following project is a game made in Python using the tkinter module as a school project.
tkinter is used as it is mentioned in Appendix B of Computer Science with Python by Sumita Arora, Class XII
The following project is a farming game in which the player starts a small farm and then slowly builds it to an exotic green heaven. There is also a small market at the bottom left.
CONTROLS:
- W/A/S/D or Up/Left/Down/Right arrow keys to move
- Mouse Click to plant seeds, harvest etc.
- Escape key to escape to Main Menu
INSTRUCTIONS:
- Open pyRager/pyRager.py (needs Python 3.7)
- Go to market at bottom left to buy some seeds : Cost $1(in game money)
- Click on green land to make a farm plot
- Click again to plant seed(if available)
- Wait 10 seconds for seeds to grow to plant
- Click to harvest plant
- Go to market, Sell plant for $2
- Buy seeds again
- Buy banks
...
Inspired by the game Forager, by game developer hopfrog. Buy: https://store.steampowered.com/app/751780/Forager/ Demo: https://hopfrog.itch.io/forager-demo
ASSETS:
Character Images(Sprites) downloaded from https://jesse-m.itch.io/jungle-pack
All the other art and sound effects are self made.
FEATURES:
- Basic UI
- Movement and collsions
- Nearly 15 minutes long gameplay
- Saving highscore
CONCEPTS OF SYLLABUS USED:
- Python basics
- Recursion
- Importing modules
- Functions
- File handling
- 2-Dimensional arrays
- Error handling
CLARIFICATION:
This is an original project, and is not 'copy-pasted'. Help was taken from the internet to note basic tkinter
functions.
Searching for pyRager on google only gives the result of some Reddit user. This project is not related to that person in any way.
MODULES USED:
- tkinter (based heavily on it, installed on standard python. If not, reinstall python with tcl/tk selected)
- random (Used for starting quotes)
- winsound (only for Windows, error handling used if not found)
- math (only used once for fabs() and pow() functions)
SOFTWARE USED:
- IDLE
- Paint.net(since ms paint doesnt support transparent images) https://www.getpaint.net/index.html
- BFXR(Free software to generate algorithm driven sounds) https://www.bfxr.net/
I have tried to explain by comments all the tkinter functions used. Further help can be taken from http://effbot.org/tkinterbook/ and https://www.tutorialspoint.com/python/python_gui_programming.htm