/GeoAsteroids

Primary LanguageTypeScriptApache License 2.0Apache-2.0

GeoAsteroids

GeoAsteroidsTest Coverage Status License

A 2D spaceship game, Geoasteroids.com

GeoAsteroids_playthrough (3)


Table of Contents

Installation

1 - (Install Node.js 2 - (Install MongoDB) (Or use a cloud service like MongoDB Atlas)

    $ git clone git@github.com:jsolly/GeoAsteroids.git
    $ cd GeoAsteroids
    $ npm install

Setup

  $ cd <mongoDB_install_dir>/bin
  # Start MongoDB Server Locally (Or use a cloud service like MongoDB Atlas)
  $ ./mongod --dbpath <path to data directory>
  $ mongo # Or use a GUI like MongoDB Compass
  $ use geoasteroids
  $ db.createCollection("highscores")
  # Check src/database.ts for connection string
  $ vercel dev # Allows us to mock serverless functions locally

Features

Functional

  • Moving asteroids with variable jaggedness and size. Woah
  • Points, lives, and levels just like you'd expect
  • Spaceship with laser and thruster. Pew Pew
  • Global high scoreboard so you can compete with anyone in the world!

Non-Functional

  • Asteroid collisions detection, so you die when you're supposed to
  • Static code analysis using CodeQL so the code is less likely to have security vulnerabilities
  • NPM Dependency checking via Dependabot so you don't have to think about it
  • 100% linted with Eslint + additional rules for a more maintainable and consistent codebase
  • TypeScript under 'strict' mode with no errors, so you know we're following TS best practices
  • JS bundling with Vite for a super fast front-end
  • Serverless functions for API calls, so you don't have to worry too much about handling the backend
  • MongoDB database for high scores cause who wants to deal with flat files?
  • Custom logging library for fine-grained control of logging levels so you don't have to scratch your head about errors in production
  • Over 90% test coverage so you can refactor and add features with peace of mind

Coverage, Tests, Linting

Coverage

npm run coverage

Test

npm run test

Linting (with ESlint)

npm run lint

Contributing

Want to work on this with me? DM me on Twiiter @_jsolly

Step 1

  • Option 1

    • 🍴 Fork this repo!
  • Option 2

    • 👯 Clone to your local machine using git@github.com:jsolly/GeoAsteroids.git

Step 2

  • HACK AWAY! 🔨🔨🔨

Step 3


Top Contributors

John Solly
jsolly
github.com/jsolly

Support

Reach out to me at one of the following places!


UML Diagram

GeoAsteroids UML diagram


License

License