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. 

torus

 

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.

 

torus3d

 

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. 

 

torusicon

 

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. 

 

torus

 

More Information

http://nbodyphysics.com/blog/

Related Articles

Find N-Body Solutions In Your Browser       

PhysicsJS - Physics In Pure JavaScript       

The Magic Of N-Body Solutions       

 

To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, FacebookGoogle+ or Linkedin,  or sign up for our weekly newsletter.

 

Banner


New MSDN Blogs Broken
22/03/2019

Attention was drawn yesterday to the mess that Microsoft is making migrating the MSDN blogs to their new platform, when Eric Lippert tweeted that his blog had been taken down. Although his blog has no [ ... ]



World Wide Web's 30th Anniversary
12/03/2019

Sir Tim Berners-Lee used the occasion of the World Wide Web's 30th anniversary to reflect on how the web has transformed the world and to acknowledge the problems that need to be tackled. 


More News

 

Python

 



 

Comments




or email your comment to: comments@i-programmer.info

 

 

 

Last Updated ( Friday, 20 March 2015 )