Inspiration

One of the main causes of stress is working for hours on end without taking enough breaks in between. Studies show that when stress becomes overpowering or is extended for long periods of time, we are increasingly at risk for mental health issues such as anxiety, depression, problems with sleep, and muscle tensions. This is why we decided to create Calmify, a program created using Python and the pygame module.

What it does

Calmify is a stress-relief application, designed to improve the mental health of users through a series of minigames. The program can be used as a timer for 25 minutes to motivate users to work. Once the timer finishes, the minigame becomes playable with a 5 minute timer. For demo purposes, we decided to create 1 of our 5 minigames called Coin Quest. In this game, the player has to collect as many coins until the timer ends, in order to reach a high score. Along with relaxing music and rewarding sound effects, the game serves as a great way to take a break from work. The 25 minute and 5 minute timers are both derived from something called the Pomodoro technique. It is an amazing way to focus on a task, while still regularly taking breaks to avoid the buildup of stress, anxiety, and medical issues. Overall, it thoroughly impacts people by encouraging them to maintain a positive and determined mindset while working by rewarding them with breaks, all of which contribute to a stronger mental health.

How we built it

We built Calmify using python's module, pygame. We programmed a player, button and coin class to keep everything organized and initialize instances with ease. We created various functions such as gameloop(), intro() to help keep things organized and easy to follow. Our main game loop is located in gameloop(). It holds all the code responsible for running Coin Quest. It contains the character movement, game timer and other features such as keeping count of the score. We have a function called intro(), which is exactly as it sounds, to make the intro screen of the game. In this function, we initialize the background image for the main menu and the controls page. Both buttons are also implemented in this function. When you click on start, it will open gameloop() and run through the code there. Eventually, the gameloop() will open up the intro() function and the process will repeat. Similarly the controls() function works the same way and they all connect together in an endless loop.

Challenges we ran into

Some challenges we ran into were implementing the timers. We kept running into bugs that prevented them from working as we envisioned. The main menu timer was meant to start after clicking start, but ended up starting as soon as the intro() function launched. Similarly with the game timer, the timer would not run when we wanted, so we had to manually start it with space bar.

Accomplishments that we're proud of

We are extremely proud of the UI. We think the design and graphics ended up looking very well. The colour theme and pictures complimented each other very well. Overall the game ran very smoothly and we are really proud of it.

What we learned

We learned how to organize our code in efficient ways by using more classes and functions. This way we can easily reference things throughout our code without having to go back and check each part line by line. Furthermore, we expanded our learning with using the pygame module. We learned and implanted various different pygame documentations to further enhance our code and make it run more efficiently. Looking back on previous projects, this one has taught us the most and really polished our programming skills.

What's next for Calmify

In the future, we plan on implementing various different mini games. For example, a breathing exercise, mini game, a challenging puzzle game, a satisfying clicker game, and a slingshot game. We also wanted to expand on the base game of Coin Quest by adding a shadow swapping feature, which involves the player leaving an after image behind and having the ability to switch positions with it, in order to make the game more interesting and unique. Also, we plan on improving the timers that we did not have time to fully complete.

Built With

Share this project:

Updates