---
canonical: "https://www.jsolly.com/blog/I-re-created-1979-Atari-game-asteroids-with-JS/"
title: "GeoAsteroids: Refactoring a JS Asteroids Clone Into a GIS Game"
description: "I've refactored my JavaScript Asteroids clone into a modular application and made it into a game for GIS nerds. Check out GeoAsteroids.com to play!"
author: "John Solly"
published: "2022-07-11T03:58:49.000Z"
updated: "2026-09-07T14:25:05.486Z"
---

<a id="geoasteroids-refactoring-a-js-asteroids-clone-into-a-gis-game"></a>

# GeoAsteroids: Refactoring a JS Asteroids Clone Into a GIS Game

![Screenshot of GeoAsteroids](https://d1d7p8ufhgz4ld.cloudfront.net/media/post_metaimgs/GeoAsteroids_screenshot.png)

After spending the last few months with Python and Django, I thought of a project to help sharpen my JavaScript skills. I found [this Youtube Tutorial](https://www.youtube.com/watch?v=H9CSWMxJx84) where you re-create Asteroids in 2 hours and 45 mins. After completing the tutorial, the whole app becomes a [single HTML file](https://drive.google.com/file/d/1tmjvMKxCcJeyTpi5pI6A8cgVxwWnyPXn/view) with a <script> that is about ~1000K lines long.

I wanted the application to be more modular, so I split it into 10 files [in this PR](https://github.com/jsolly/GeoAsteroids/pull/3/files). I think it looks and reads A LOT better. Instead of the code being one long file, I have separated out logic such as collisions, scoring, and sound effects. This way, adding new features will be much easier, and it's less of a maintenance nightmare. 

My goal for the project is to make it into a game for GIS nerds like me. You'll be able to upload your geospatial data and play the game with YOUR polygons. 

Stay tuned for more updates. If you want to log a bug/enhancements, check out [GeoAsteroid's Github repo](https://github.com/jsolly/GeoAsteroids).

The game is live at [GeoAsteroids.com](https://github.com/jsolly/GeoRoids)

July 11, 2022 in [Geo Dev](https://www.jsolly.com/blog/category/Geodev/)

Updated September 7, 2026
