"# Cast Your Heart Out! - 112-Term-Project"
Dependencies: pyaudio, numpy, scipy.signal
This project is a wizard game that uses voice input to cast spells *Please use headphones for a proper experience with the game/pitch detection
Your main objective in this game is to survive against hordes of zombies in a confined room. To survive, you must cast spells to either run away, heal yourself, or kill the zombies
Please start in Learning Mode, as the controls for this game are relatively complicated. PAY ATTENTION TO THE INSTRUCTIONS. YOU CANNOT PLAY THE GAME OFF OF INTUITION.
To learn the spells in Learn Mode, you must go around the map and interact with the objects around you. They will give you clues as to what the spells are. Interact with the right ones to unlock spells.
There are minor threats in Learn Mode, as that mode is made to help players learn The bulk of the game is contained in the Wave Mode. That's where the challenge begins. If you ever forget the spells while playing Wave Mode, on the pause menu you can access the combinations for the spells.
These are the instructions in-game:
'Pay attention to these instructions. Press right arrow key to move to next. To skip (not recommended), press "E".', 'Your objective as of right now is to discover all the color combinations for the spells around this apartment', 'You can do so by interacting with objects in this environment, which will give you clues as to what those color combinations are', 'Pressing "E" on your keyboard will allow you to interact with these objects', 'Interacting with the right objects will give you access to specific spells (but right now you don't have access to any)', 'To cast spells, you must record a specific combination of colors', 'Notice, there's a cooldown bar for the spells you cast on the top left corner', 'To begin recording your color input, press "C", and to finish giving color input, press "C" again. If that combination corresponds to a spell, it will be cast.', 'After pressing "C" to record, you must switch between colors to record a specific color combination. In pressing "C" once more, the combination recorded will be evaluated.', 'You can switch between colors with your voice. The higher your voice goes, the further up in the color meter it will go (top left corner of screen) and vice versa.', 'It is recommended to sing in falsetto and around the note G4 and above to get more accurate voice detections', 'To open/close microphone, press "R". Try it', 'There are two circles on the bottom right of the screen. The left circle shows if mic is open/closed (red/gray). The one on the right shows if a note was detected (green if yes, red if no)', 'If you are having difficulties with the voice detection, close your microphone and use the arrow keys to give your color input (more info in controls screen)', 'For more information about controls, press "esc" to pause and access controls screen.', 'Good Luck!'
Instructions on how to run the game:
Install dependencies pyaudio, numpy, and scipy.signal by typing in your terminal (ignore quotes): "pip install pyaudio", "pip install numpy", "pip install scipy".To run, in your terminal, access the path to the folder containing the main.py file. Then, run "python main.py". If you're using an editor, just run the main.py file.
Shortcut Commands:
There are none! The game should already display most of what it has to offer right off the bat (in case you are struggling to learn spells in the begginning, you can skip to Wave Mode, where all the spells are already unlocked and you can access all the spell combinations in the pause menu).
CREDITS:
9 Lines of code from Chat GPT in frequencyDetection.py (lines 18-34)
I used a spritesheet to make the map for the game. Credit link: https://limezu.itch.io/
Credit for the zombie animation sprites: https://mesiiue.itch.io/simple-topdown-zombie
Credit for the blood (when zombies take damage) sprites: https://xyezawr.itch.io/gif-free-pixel-effects-pack-5-blood-effects
I did not write the loadSound.py file (Made by TA. Posted on ED)
As for the rest of the art, including UI and character sprite, I made them all myself with Piskel
I also made all the sounds (As you probably noticed).