https://github.com/jsolly/geoasteroids
https://github.com/jsolly/geoasteroids
asteroids game typescript
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/jsolly/geoasteroids
- Owner: jsolly
- License: apache-2.0
- Created: 2022-06-30T15:42:34.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-02-08T17:38:01.000Z (over 1 year ago)
- Last Synced: 2025-04-10T00:46:49.874Z (about 1 year ago)
- Topics: asteroids, game, typescript
- Language: TypeScript
- Homepage: https://www.geoasteroids.com
- Size: 7.62 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# GeoAsteroids
[](https://github.com/jsolly/GeoAsteroids/actions/workflows/GeoAsteroidsTest.yml)
[](https://coveralls.io/github/jsolly/GeoAsteroids?branch=main)
[](http://badges.mit-license.org)
A 2D spaceship game, Geoasteroids.com

---
## Table of Contents
- [Installation](#installation)
- [Features](#features)
- [Contributing](#contributing)
- [Support](#support)
- [License](#license)
## Installation
1 - (Install Node.js
2 - (Install MongoDB) (Or use a cloud service like MongoDB Atlas)
```shell
$ git clone git@github.com:jsolly/GeoAsteroids.git
$ cd GeoAsteroids
$ npm install
```
## Setup
```shell
$ cd /bin
# Start MongoDB Server Locally (Or use a cloud service like MongoDB Atlas)
$ ./mongod --dbpath
$ 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
```shell
npm run coverage
```
### Test
```shell
npm run test
```
### Linting (with ESlint)
```shell
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
- 🔃 Create a new pull request using `https://github.com/jsolly/GeoAsteroids/compare`.
---
## UML Diagram

---
## License
[](http://badges.mit-license.org)
- **[MIT license](http://opensource.org/licenses/mit-license.php)**