Instructions:
Left and Right Arrows: Rotate ship
Up Arrow: Thrust
SPACE: Fire main weapon(s)
Z: Fire bomb weapon (area effect, uses energy)
Down Arrow or SHIFT: Shield (will recharge...)
G: Increase genus (add handle)
F: Decrease genus (remove handle)
S: Enable or disable sound effects
R: Switch between Modern and Retro graphics
Escape: Pause the game
As-Toroids DEBUG page (cheats, etc.)
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, or genus 1. This game starts in that mode.
This game implements a more general boundary condition that defines a genus-g orientable surface for any g (not just 1): just press "G" to increase genus, and "F" to decrease it again. 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.