Inspiration

Yonden Sawyers and I (Alissa Wu) have seen a lot of fake news about public health nowadays, and believe that misinformation is an extremely dangerous problem we would like to combat. We created this game to inform people about various aspects of public health, including nutrition, exercise, and more.

What it does

It's a run-and-jump game. Colliding with a hand sanitizer gives you a lifesaver effect. Colliding with a mask gives you a lifesaver effect and launches you into the air, but only if you get the prompted question right -- otherwise, you die. There's more info on the instructions page.

How we built it

We built it with HTML for displaying our game (using canvas) & other resources, JavaScript for the game logic, and CSS to add stylings. We also used Axios, which is a popular easy to use library that allows clients to make requests to an API. To generate questions, we send a get request to our API to fetch the questions we then use in the game.

Challenges we ran into

We had to rewrite the game code because our initial code made the game laggy due to a large amount of data being streamed. We also had some struggles with overshooting the y-value of the Player after it fell from its launch. There were also some issues with displaying the score, but it worked out decently in the end.

Accomplishments that we're proud of

We're proud of finishing this whole thing in less than a day because a lot of debugging went on due to Javascript being a language that isn't too good at handling lots of data. We really like how clean the website looks, and the creativity involved in this project -- incorporating trivia questions into a continuous game. We also think it's cool how our menu bar is MHS themed :)

What we learned

We improved our knowledge about how to import sprites into games, how to continuously spawn objects within a game board, how to create multi-page navigatable websites, and more.

What's next for Staying Healthy

We want to figure out how to create a leaderboard, and maybe add coins into the game. Also, we want to figure out how to make the game start once a button is clicked, rather than once the page loads, just so it's easier to navigate. We hope to create a game menu too. We want to fix the lag that happens when playing this game while on another high-data site, such as Zoom or Discord.

Built With

Share this project:

Updates