Inspiration

I got the inspiration from the Pac-Man game which is a very famous game and this game is quite similar to the Pac-Man where we have a dog and then we use our arrow keys to help the dog to get the bones.

What it does

Welcome to 'Dog Wants Bone,' a delightful and engaging React-based game that brings together the excitement of an adventure and the heartwarming charm of our furry friend, the dog. In this interactive game, players take on the role of a friendly canine with a single-minded goal – to fetch as many bones as possible! The game features a field where the dog resides, and bones are randomly scattered throughout the play area.

The gameplay involves navigating the dog to the bones using arrow keys or keyboard controls. The dog's movements are smooth and responsive, allowing players to precisely guide their virtual companion. As the game progresses, the challenge intensifies, making it an excellent way to test your reflexes and decision-making skills.

How we built it

  • This application is based on React js.
  • The whole frontend part is running on React js.
  • To make the development process more reliable and error-free, I used Typescript.
  • For icons I have used lucid icons.

Challenges we ran into

The major challenge I faced was a bug and the bug was when I tried to change the state variable inside the setInterval. As it created a very huge problem in the UI part and the dog stopped moving and that took a lot of time to understand and resolve the issue.

Accomplishments that we're proud of

  • After investing a lot of time and effort the dog starts running and also collecting the bones.

What we learned

  • Understood React in a much better way.
  • Understand how to use useRef.
  • Understand what is the difference between useEffect and useLayout hooks.
Share this project:

Updates