Inspiration

What it does

This is a simple yet engaging side-scrolling game where players control a horse to dodge hurdles by jumping. The score increases as the player survives longer, and the game ends upon collision. After each game, the score is displayed and submitted to a server for tracking. Players can quickly restart for another round by clicking the restart button.

How we built it

Back End

Front End The frontend of this project uses React and the HTML element to render the game visuals. The game loop is managed using requestAnimationFrame, allowing smooth updates to the background, obstacles, and the horse. Key game states such as the score and player actions are managed with React's useState and useRef. User interactions (i.e. jumping) are handled through event listeners for keyboard and mouse inputs. Animations are implemented by switching between different sprites for the horse, while a collision detection system ensures gameplay logic, ending the game if the horse runs into a hurdle. At the end of the game, the player's score is submitted to an AWS server via the storeHighScore function, and a restart button allows players to quickly retry. This setup provides a smooth and interactive gaming experience.

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for Seasonal Hazards

Share this project:

Updates