True Asteroids On A Torus
Written by Mike James
Friday, 20 March 2015

There may be life in old games done right. Asteroids is a classic, but have we been implementing it wrong all these years?

If you have played any of the classic games where moving off the edge of the screen brings you back on the other side and moving off the top brings you back on the bottom then you might have wondered what shape the playing surface actually was?

You might at first think that it was a sphere, but the answer is easy to see if you take a piece of paper and first glue two sides together. This produces a tube. Now glue the two ends of the tube together and you get a torus - OK. an inner-tube-like thing.

That's right, the game of Asteroids has been played on the surface of a torus for all these years without anyone really noticing - expect for Peter Musgrave, the programmer of interesing physics simulations like ThreeBody and author of the N-Body Physics blog. He wondered what Asteroids would be like if the game took account of the shape of the space it was being played in - Geodesic Asteroids.

There is the question of what is the appropriate geometry for a torus? You could argue that the original game picked a valid representation of a flat torus, but a more interesting idea is to take the curvature of the 2D torus that you get from its usual 3D embedding.

In fact you also have the choice of showing the motion on the 2D surface in 3D or map the torus to a 2D screen represenation.

The key idea is that the asteroids would move, not on straight lines, but on geodesics - the shortest path between two points taking the curvature into account.

If you would like to try the game out it is available for Android, iOS and Blackberry - just search for Geodesic Asteroids.

Are there any other games that could gain a second life by being played on curved 2D surfaces, or even curved 3D surfaces? If you are interested you will need to learn some differential geometry, which the app also explains a little bit.

http://nbodyphysics.com/blog/

#### Related Articles

Find N-Body Solutions In Your Browser

PhysicsJS - Physics In Pure JavaScript

The Magic Of N-Body Solutions

 Google Maps Adds New APIs04/09/2023Google is trying out new map styles and has added new environment APIs to its Maps Platform. The Google Maps Platform is a set of APIs and SDKs that can be used to embed Google Maps into mobile apps a [ ... ] + Full Story Learn About RISC-V From Linux Foundation on edX01/09/2023The Linux Foundation has a new free course on the edX platform for those who would like to learn about, and experiment with, RISC-V. A verified track, to earn a certificate of completion, is also [ ... ] + Full Story More News