
-----------------------------------
zero-impact
Thu Apr 30, 2009 3:13 pm

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 [url=http://compsci.ca/v3/viewtopic.php?t=20093&highlight=particle+engine]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[/code] 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.

-----------------------------------
saltpro15
Thu Apr 30, 2009 3:46 pm

RE:2d Particle Engine
-----------------------------------
nice job! I don't see fps limiting in here anywhere, did you do it?

-----------------------------------
zero-impact
Thu Apr 30, 2009 3:58 pm

RE:2d Particle Engine
-----------------------------------
No. I think the fps timing code is fundamentally flawed.

-----------------------------------
saltpro15
Thu Apr 30, 2009 7:35 pm

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
Thu Apr 30, 2009 7:41 pm

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
Thu Apr 30, 2009 7:46 pm

RE:2d Particle Engine
-----------------------------------
hmm, odd.  It still can't compare to my pong ;) we still doing pac-man next?

-----------------------------------
zero-impact
Thu Apr 30, 2009 7:53 pm

RE:2d Particle Engine
-----------------------------------
I think I remember you saying you would never post your pong game on compsci..

Anyways back on topic!

-----------------------------------
saltpro15
Thu Apr 30, 2009 8:00 pm

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!

-----------------------------------
zero-impact
Thu Apr 30, 2009 8:01 pm

RE:2d Particle Engine
-----------------------------------
>.<

-----------------------------------
zero-impact
Sat May 02, 2009 3:45 pm

Re: 2d Particle Engine
-----------------------------------
Ok I finally got the time to compile a windows version. 
So here it is for anyone who is interested.

-----------------------------------
ecookman
Mon Jun 01, 2009 7:17 am

RE:2d Particle Engine
-----------------------------------
Blah this is soo fun to play with...too fun DUN Dun Dunnn
