We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionExhibition › Asteroids
Page Index Toggle Pages: 1
Asteroids (Read 1624 times)
Asteroids
Nov 24th, 2009, 3:01pm
 
I know it's been done to death but I thought it would make a nice little project:

http://www.blindfish.co.uk/code/processing/asteroids01/

Very much a work in progress, but feedback is welcomed Smiley
Re: Asteroids
Reply #1 - Nov 24th, 2009, 5:46pm
 
I like the way you layouted the processing export page Smiley
Re: Asteroids
Reply #2 - Nov 25th, 2009, 1:13am
 
Very good, your physics implementation works great, you keep the look and feel of the original, and the little details like the explosions, is great!

rS
Re: Asteroids
Reply #3 - Nov 25th, 2009, 1:50am
 
Nice and smooth.  But I don't see any shots, or explosions (Java 1.5, PPC Mac).
Re: Asteroids
Reply #4 - Nov 25th, 2009, 1:59am
 
Sad

I saw that there was a problem with 'Point' on Macs so I used a single vertex for bullets/particles...

Edited:
Though in actual fact the Point bug looks like it's resolved and not likely to be the cause of this problem


Any suggestions for an alternative  Otherwise I'll fire up the Mac mini this evening (sorry - it doesn't get a great deal of use) and figure out a solution.
Re: Asteroids
Reply #5 - Nov 25th, 2009, 3:33am
 
Great work!!

Shots working perfectly on my Intel Macbook!
Re: Asteroids
Reply #6 - Nov 25th, 2009, 3:33am
 
hmm, I've never had a problem with point, but a rect with size 1 and no stroke should do it...re: intel, it may be a distinction between Java versions; Apple has stopped updating Java for PPC...
Re: Asteroids
Reply #7 - Nov 25th, 2009, 10:45am
 
Great job blindfish! Very retro-feeling (although I never played the original). Control is smooth and responsive. I think millis() has a large grain like 16ms but you can try System.nanoTime(). It returns a long integer with nano seconds. (my computer: WinXp 32-bit 1G ram 3.4GHz Pentium D)
Re: Asteroids
Reply #8 - Nov 25th, 2009, 10:53am
 
For some reason I thought a rect might be more 'expensive'... But you're right: it seems to work just fine and I can then change the size of the particles in the explosions Smiley
Re: Asteroids
Reply #9 - Nov 25th, 2009, 11:11am
 
I had the same mac issue, on another note, just notice how nicely the game is pixelated

rS
Re: Asteroids
Reply #10 - Nov 25th, 2009, 11:19am
 
I've updated it with rects so you should now see the bullets/explosions etc...

I made a conscious decision not to use smooth().  It runs perfectly well with it on, but I liked the retro pixelated look.  I'll probably hack around with it a bit more and add some 'rendering options' before I get bored with it and move on to something 'sensible'...

Thanks Smiley
Page Index Toggle Pages: 1