Author |
Message |
zero-impact
|
Posted: Thu Apr 30, 2009 3:13 pm Post subject: 2d Particle Engine |
|
|
I wanted to start off with graphics programming in c++ with SDL so I decided to port one of my old Turing projects found here.
Basically this was a quick and dirty excersize with terrible coding. I'm still learning c++ so I know I probably did a LOT wrong. If anyone dares to look at the code I would be very happy to hear some feedback, no matter how harsh.
There is only a linux executable included but you can compile it with code: | g++ main.cpp -Wall -o particle `sdl-config --cflags --libs` -lSDL -lSDL_image -lSDL_ttf | if you have all the right SDL files.
If I have time I will post a windows executable later.
Screenshot is below.
The controls are left click and spacebar.
Description: |
|
Filesize: |
63.49 KB |
Viewed: |
453 Time(s) |
|
Description: |
|
Download |
Filename: |
Particle.zip |
Filesize: |
23.84 KB |
Downloaded: |
645 Time(s) |
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
saltpro15
|
Posted: Thu Apr 30, 2009 3:46 pm Post subject: RE:2d Particle Engine |
|
|
nice job! I don't see fps limiting in here anywhere, did you do it?
|
|
|
|
|
|
zero-impact
|
Posted: Thu Apr 30, 2009 3:58 pm Post subject: RE:2d Particle Engine |
|
|
No. I think the fps timing code is fundamentally flawed.
|
|
|
|
|
|
saltpro15
|
Posted: Thu Apr 30, 2009 7:35 pm Post subject: RE:2d Particle Engine |
|
|
hmm, worked for me. your program works fine on my computer at least, compiled under ubuntu of course now go practice for Provincials :p
|
|
|
|
|
|
zero-impact
|
Posted: Thu Apr 30, 2009 7:41 pm Post subject: RE:2d Particle Engine |
|
|
Well it works, it just isn't accurate I think.. I tried to limit the fps but it just got buggy.
I should have used a timestep based off of an actual timer to do the physics.
|
|
|
|
|
|
saltpro15
|
Posted: Thu Apr 30, 2009 7:46 pm Post subject: RE:2d Particle Engine |
|
|
hmm, odd. It still can't compare to my pong we still doing pac-man next?
|
|
|
|
|
|
zero-impact
|
Posted: Thu Apr 30, 2009 7:53 pm Post subject: RE:2d Particle Engine |
|
|
I think I remember you saying you would never post your pong game on compsci..
Anyways back on topic!
|
|
|
|
|
|
saltpro15
|
Posted: Thu Apr 30, 2009 8:00 pm Post subject: RE:2d Particle Engine |
|
|
hmm, true :p but I really don't have anything to say on topic, so I think i'll just ramble on in this thread for a while until I decide it's time for a coke.
it's time!
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
zero-impact
|
Posted: Thu Apr 30, 2009 8:01 pm Post subject: RE:2d Particle Engine |
|
|
>.<
|
|
|
|
|
|
zero-impact
|
Posted: Sat May 02, 2009 3:45 pm Post subject: Re: 2d Particle Engine |
|
|
Ok I finally got the time to compile a windows version.
So here it is for anyone who is interested.
Description: |
|
Filesize: |
72.91 KB |
Viewed: |
436 Time(s) |
|
Description: |
|
Download |
Filename: |
ParticleWindows.zip |
Filesize: |
540.36 KB |
Downloaded: |
534 Time(s) |
|
|
|
|
|
|
ecookman
|
Posted: Mon Jun 01, 2009 7:17 am Post subject: RE:2d Particle Engine |
|
|
Blah this is soo fun to play with...too fun DUN Dun Dunnn
|
|
|
|
|
|
|