[C++] GFX, Allegro and about Particles
yo, been a while since i posted here :))
so here is what i have created:
Download testparticle.zip
it is a C++ program using Allegro, testing particles, its my first code ever with particles (my own), i have tried creating lightning (which later i want to use for my game) there are no images, you can test it with keys 1,2,3,4,5,6 (explained inside the program)
does anyone know where i can get a good and free particles library?
AIM: something as cool as this: [ame=http://www.youtube.com/watch?v=F5xwSLdG9n0&feature=related]YouTube - 30 000 Particles in real time, OpenGL game engine, particle system[/ame]
Re: [C++] GFX, Allegro and about Particles
It's more about math, not about graphics.
Check out nehe, I think he had a basic example of particles. And google for [ame=http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=particle+engine]particle engines[/ame], people spend a LOT of time writing thousands of lines of code to produce powerful and flexible particle emission libraries.
Re: [C++] GFX, Allegro and about Particles
second attempt, this time with my own 10K particles code and OpenGL :)
i'm getting closer :P
DL: Download GLTests.zip -> (hit Space to trigger motion) i made it the way it is by accidentally adding 3 lines of code :P the colors were easy :)
some code:
Code:
//able to control color of each particle
glColor3ub(myParticles[i].redc,myParticles[i].greenc,myParticles[i].bluec);
//draw the pixel particle
glVertex2f(myParticles[i].px, yyget(myParticles[i].py));
actually there is not much of a code, the rest is just OGL stuff and 30-40 lines for color and position, all looks so easy :P
Re: [C++] GFX, Allegro and about Particles
This looks pretty cool, I think I might take some time to try making something like this but make it based on certain areas the mouse is located and direction and speed of mouse movements.