Skip to content

edemaine/as-toroids

 
 

Repository files navigation

As-Toroids: Higher-Genus Asteroids

This game is a quick experiment to see what it's like to play the classic video game Asteroids on higher-genus surfaces, beyond the usual torus. Regular Asteroids is played on a rectangular screen where anything flying off the top side of the screen returns at the same coordinate on the bottom side of the screen, and similarly for the left and right sides. This usual connectivity describes the flat torus.

This game implements a more general boundary condition that defines a genus-g orientable surface for any g (not just 1). It all started when Jeff Erickson said (on June 20, 2019) "what we really need is Asteroids on a double torus", along with his favorite fundamental polygon for it. An early version of this implementation emerged less than an hour later, thanks to input from Erin Wolf Chambers, David Eppstein, and Jeff Erickson.

The code is a very light edit of the excellent Asteroids [Reloaded] developed by Kevin Roast. All credit for the gameplay, graphics, sound, etc. goes to him! The main purpose of this experiment is as an educational tool for teaching topology.

You can play the game online. If you want to run this code locally, run the game from within a local webserver for the sound/message file loading to work correctly. e.g. http://localhost:8000/Asteroids-Reloaded/index.html

All game graphics, all sounds, and most code is Copyright (c) 2014 Kevin Roast [email protected]. Some changes to the code are Copyright (c) 2019 Erik Demaine [email protected].

About

As-Toroids: Higher-Genus Asteroids

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages

  • JavaScript 92.2%
  • HTML 7.8%