GeoAsteroids
A 2D spaceship game, Geoasteroids.com
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
- 👯 Clone to your local machine using
Step 2
- HACK AWAY! 🔨🔨🔨
Step 3
- 🔃 Create a new pull request using
https://github.com/jsolly/GeoAsteroids/compare
.
Top Contributors
John Solly |
---|
github.com/jsolly |
Support
Reach out to me at one of the following places!
- Twitter at
@_jsolly