Giter VIP home page Giter VIP logo

michaelkolesidis / scratch-bonanza Goto Github PK

View Code? Open in Web Editor NEW
12.0 1.0 9.0 5.27 MB

An online scratchcard game. Do you feel lucky?

Home Page: https://scratch-bonanza.vercel.app

License: GNU Affero General Public License v3.0

JavaScript 1.55% HTML 3.99% TypeScript 72.21% CSS 22.25%
animation gambling gambling-game lottery lottery-game lottery-ticket online-game react react-game scratch

scratch-bonanza's Introduction

Scratch Bonanza Logo

An online scratchcard game. Do you feel lucky?

Buy Me a Coffee at ko-fi.com

There are five different rewards with different sounds, 1๐Ÿช™, 10๐Ÿช™, 100๐Ÿช™, 1000๐Ÿช™ or 0๐ŸŒ. It is a full-stack implementation, with the rewards generated on the server.

Instructions

In order to run the project locally you need to start both the client (this repository) and the server, that can be found in its own repository, Scratch Bonanza Server.

1. Start the server.

2. Install the project dependencies:

yarn

3. Start Vite:

yarn dev

Demo

There is also an online deployment of Scratch Bonanza that can be found in here. The online version is deployed in Vercel and is configured to use an online deployment of the server, deployed in Render.

When using the online version, you should note that loading the first scratchcard will usually take around 30-50 seconds, as the project is hosted using the free tier of Render, thus the server sleeps when inactive. On rare occasions, the server might take up to 5 minutes to respond to the first call.

Features

Architecture

  • Three game phases: ready, playing, ended
  • Total number of coins won saved both in state and in local storage
  • Number of scratchcards used saved both in state and in local storage
  • Clear data functionality

Gameplay

  • Each scratchcard features four scratchable areas that have a reward hidden underneath
  • Five different reward options: 1๐Ÿช™, 10๐Ÿช™, 100๐Ÿช™, 1000๐Ÿช™ or 0๐ŸŒ

UI/UX

  • New game and restart functionality
  • Stats bar at the bottom displaying total coins won and total scratchcards used
  • New button is active only when all four areas have been scratched
  • Help modal available in all screens
  • Responsive for mobile (iPhone 13 Pro and iPhone SE) and desktop
  • Animated logo

Sound

  • Scratching sound while scratching implemented both on touch and on non-touch devices
  • Four different sounds when revealing an award (a sound for 0 bananas, a sound for 1 coin, another sound for 10 coins, and another sound for 100 and 1000 coins)
  • Sound when a new card loads

Screenshots

Demo

Home screen

Play screen idle

Play screen scratched

Help

Technologies

The core technologies of Scratch Bonanza are JavaScript, CSS and the Canvas API. The following libraries and tools are used:

Name License Description
TypeScript MIT A strongly typed language that builds on JavaScript
React MIT Component-based, front-end interface library
React Router MIT Declarative routing for React web applications
React Scratchcard MIT A scratchcard component for React
Zustand MIT State management
Vite MIT Frontend development tooling
Vitest (Planned) MIT Unit test framework powered by Vite
React Testing Library (Planned) MIT Testing utility

Roadmap

  • Testing
  • Different game modes with different sets of awards
  • Credits
  • Translations

Software Used

A non-exhaustive list of all the software that was used during the development of Scratch Bonanza.

  • Visual Studio Code
  • Inkscape
  • Audacity
  • Google Chrome
  • Microsoft Edge
  • Mozilla Firefox

๐Ÿ’– Support the Project

Thank you so much for your interest in my project! If you want to go a step further and support my open source work, buy me a coffee:

Buy Me a Coffee at ko-fi.com

See Also

License

Copyright (c) 2023 Michael Kolesidis
Licensed under the GNU Affero General Public License v3.0.

scratch-bonanza's People

Contributors

dependabot[bot] avatar michaelkolesidis avatar mihailgaberov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.