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

 Running PostgreSQL Inside Your Browser With PGLite18/03/2024Thanks to WebAssembly we can now enjoy PostgreSQL inside the browser so that we can build reactive, realtime, local-first apps directly on Postgres. PGLite is about to make this even easier. + Full Story Grafana 11 Improves Metrics11/04/2024Grafana Labs, creators of the Grafana open-source metrics analytics and visualization suite, has announced the preview release of Grafana 11 with improvements to make it easier to view metrics, and ch [ ... ] + Full Story More News