Happy Pill Factory
A downloadable game for Windows, macOS, and Linux
This idle clicker prototype was created for a university data management assignment in 2021 (2nd year).
This project mainly showcases what I had learned so far about scripting UI and coding idle data management systems but I also coded my first save system. I don't have much to say about it now in 2023, but I'll include some notes and reflections I made back when I submitted the game.
Here are some notes and reflections I had back then:
The very first things I started thinking about at the beginning of this project were an adaptable currency system it could work off, whether it would need a scene manager script, and the type of buttons I would have other than the main clicker. I thought about what kind of tutorials I should look up such as idle game tutorials. However, I went straight into designing the UI because I felt that would be the best way to help mold the project. If I could start designing the objects and elements and putting them on the screen in front of me, I could start thinking about the code behind them that would bring them to life. I was trying to also think of a subtle theme for the game that I could base the design of the item and clicker on. I thought of the item first – the happy pill – and that’s what made me think of a stack of sad looking money to be the clicker. When I started paying attention to the clicker I thought about it randomising the amount of money a player could click for as this would be more of an incentive to buy the item instead. I started with Money Manager, Buy Manager and Pill Money Generator scripts. The first function I started with was the clicker because I realised that I could use Random.Range(int,int) to achieve what I had in mind for the clicker. Implementing the clicker was probably the easiest thing to do in the project because it was straight forward and helped define the main variables/datatypes I would be using (like playerMoney – a float, Texts and GameObjects). It also gave me the opportunity to easily piece together how all the variables and data types would tie in together and boosted my confidence when the code worked and ran smoothly. When I started feeling stuck on what to do next, I focused on designing the UI and creating an aesthetic and theme for the game.
One thing I am incredibly proud of is the save system I used for the game. It was based off one of Brackey’s (2018) tutorials but required extensive adjustments. His tutorial was based off one script that had three datatypes and ended with him assigning his save and load functions to buttons in his game. On top of having three scripts that all had more than 10 datatypes in them, I also knew that I could not have save and load buttons for each script (because that would just be far too confusing and frustrating for the player – having to save and load each item’s progress every time they closed and opened the game, would make the UI look bad, and most likely break the game if one part was saved and not another). I feel really proud that I understood the tutorial well enough to apply it in my own game. However, I do have to give credit to Erik whose input and help actually brought the code to life. I feel like this part of the project was a turning point for me because I fully understood what was going on in each script and how the information from each script was being used and/or transferred. It feels like a turning point because it proved that I am capable of firstly, getting far with writing code by myself and secondly, knowing what I am capable of understanding and achieving. I would have liked to make the factory “unlockable” after the player buys a certain number of pills because I feel this would have added a goal into the game which would give it a bit more depth. I also would have loved to have had animations and particle effects throughout the game – I wanted little happy faces to pump out of the factory’s chimney once it was bought and have a celebratory animation for every time the player spent money.
Wowwee. If you made it this far, well done.
Thank you for checking this project out. If you have anything thoughts or feedback, I would love to know!
Leave a comment
Log in with itch.io to leave a comment.