Skip to content

⚛️ A multi-round sketching game built using ReactJS, which utilises @googlecreativelab/quickdraw-dataset ML dataset to recognise the user's drawings

License

Notifications You must be signed in to change notification settings

jv-k/react-sketchgame

Repository files navigation

react-sketchgame ⚛️✍️

CodeQL CodeFactor

A Multi-round Sketching Game ✏️

This is a multi-round sketching game built using ReactJS, and uses @googlecreativelab/quickdraw-dataset machine learning dataset to recognize the user's drawings.

Game view

Quick Start 🎬

This app has been tested and working with node 10.16.0 - 14.17.0 on MacOS, please ensure you have a version installed within this range.

To install:

npm install   # Install dependencies
npm run start # Run game

Timed Drawing ⏳

Each round is timed with a 20-second countdown. If the player successfully sketches a recognizable drawing within the time limit, they are awarded a point and advance to the next round. If the time runs out before a passable sketch is drawn, no points are awarded, and the game proceeds to the next round.

Winning or losing 🏆

The final screen displays the total score and a message indicating whether the player won or lost.

Simple navigation between views ↔️

This app uses React-Router to navigate between the start screen and game-play.

Demonstrating knowledge of ReactJS 🎓

This project demonstrates the following React features and patterns:

  • Class-based and functional components
  • Custom hooks
  • State management with useReducer
  • Side-effect management (e.g., useEffect, lifecycle methods)
  • Context API to avoid prop-drilling
  • Unit testing for UI components

TODO – A future version 🚧

  • Create & add gameplay GIFs to docs
  • Add more integration / unit tests for game & results views
  • Make the score a factor in the time allowed per round ("hard" mode)
  • Improve / expand detection and no. of recognised things
  • Move styles out of JSX and use styled-components
  • Improve / polish the window size + mobile platform usability

About

⚛️ A multi-round sketching game built using ReactJS, which utilises @googlecreativelab/quickdraw-dataset ML dataset to recognise the user's drawings

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages