Skip to content

thelong0705/typer

 
 

Repository files navigation

The 10-second typing game

Made with Deno Make a PR MIT Buy Me A Coffee

demo

🎮 How to play

  1. Visit https://typerapp.now.sh/
  2. To start a game, type "start"

You now have 10 seconds to type out all the words displayed. For every word you type correctly, your score increases, and you also get 1 extra second. Can you beat my highscore of 16? (you probably can)

🚀 Features

  • 10 seconds to type
    • Get an extra second for each word typed (small change of getting 2 seconds)
    • Randomly get a password field to spice the game up (1/6 chance)
  • Save your highscore locally
  • Save your highscore in the leaderboards to compete with others
    • leaderboards should reset every 2 weeks (not implemented yet)

🛠 Build setup

Clone or fork the repository, then run the commands to start the development server:

npm i
npm run dev

To build the app, run

npm run build

Firebase

First go to the Firebase console and create a new project. In src/scripts/, add firebase.js and paste the following:

import firebase from 'firebase/app';

const firebaseConfig = {
  apiKey: '',
  authDomain: '',
  databaseURL: '',
  projectId: '',
  storageBucket: '',
  messagingSenderId: '',
  appId: '',
  measurementId: ''
};

export const app = firebase.initializeApp(firebaseConfig);

firebase.auth().signInAnonymously().then(() => {
  console.log('anonymous sign in successful');
}).catch((err) => {
  console.log('error in sign in: ', err);
});

Fill up your details accordingly. Find these details on the Firebase console.

After this, go to the "Authentication" tab and enable anonymous sign in. Authentication is required to read and write the database.

Hosting

The game is hosted with Vercel. To host a debug version of the app, run

now

To host the production version of the app, run

now --prod

♥️ Support

If you liked this project, consider supporting by

  • ⭐️ Starring the repository
  • 🎒 Checking out my other projects
  • ☕️ Buying me coffee

📜 License

MIT

About

⌨️ The 10-second typing game

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 57.4%
  • HTML 23.0%
  • CSS 19.6%