# My first cool OpenGL project

This topic is 4710 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

It's just a simple particle shooter thing that looks neat. I have binaries for OS X and Linux (thanks to Ravuya for hosting) There it is. Up/down adjust randomness, left/right adjust particles per loop, C clears all particles, S and A double and half the number of particles per loop, respectively. Escape quits. The packages are at OS X zip (2.5 MB, contains app and the Xcode files) Linux bz2 (Linux i386, contains binary and source) Linux needs to have the SDL library installed, you probably already have that and OGL. Compile with sdl-config --cflags --libs -lGL -lGLU OS X needs to have the SDL framework in /Users/you/Library/Frameworks/, or in the system frameworks directory. Windows users, sorry. My windows box won't build OGL for some reason, but there's no reason that the code wouldn't compile if you have the ability, so if you like, download the Linux one and give it a shot. Anyone that looks a the code, please keep in mind that it's code I wrote 3 weeks ago for a "triangle shooter" thing, and then hacked until it got to this. So it's really messy :) [Edited by - Foobar of Integers on June 30, 2005 5:14:39 PM]

##### Share on other sites
Cool man, runs great. One bug I ran into though was I accidentally set it to 0 particles/loop and couldn't get it back up. Kudos for writing linux stuff!

##### Share on other sites
If you set it to 0 accidently, just hit the right arrow and it should go to 1 again.

Also, I modified it to do spirals:

##### Share on other sites
Looks sweet man, how do I get the spirals working?

I had a fiddle around with it in windows, didn't need any changes except linking to the correct libraries DaveGL-win. Messy is an understatement though :-P

##### Share on other sites
I'll upload the code for the spiral one in a little bit, if you want. It has some changes and I got rid of the 200 lines of comments :)

Same idea, just a rotating angle and sinf/cosf instead of varying the gap between the particle streams. The particles also change color, the R G B values are decreased, and when one == 0, it changes it to 1.0 (GL colors from 0 to 1.0) The final effect looks neat.

Edit: Thanks for the Windows port, by the way

• 9
• 13
• 40
• 15
• 11