[C++] GFX, Allegro and about Particles

Results 1 to 4 of 4
  1. #1
    Omega penihop is offline
    MemberRank
    Sep 2006 Join Date
    SpamzoneLocation
    5,569Posts

    [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]
    Last edited by penihop; 21-07-10 at 10:27 PM.


  2. #2
    Ginger by design. jMerliN is offline
    MemberRank
    Feb 2007 Join Date
    2,497Posts

    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.

  3. #3
    Omega penihop is offline
    MemberRank
    Sep 2006 Join Date
    SpamzoneLocation
    5,569Posts

    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
    Last edited by penihop; 01-08-10 at 03:00 PM.

  4. #4
    Just Me iceman4154 is offline
    MemberRank
    Oct 2007 Join Date
    Columbus, OhioLocation
    217Posts

    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.



Advertisement