hmm particle systems rule
i wanted to add a particle system to my sdl game. like an overlap...any tutorials on doing this or making a particle system? im new to open gl but i would rther stick to sdl, 400 lines of code to make a blank window and crazy math just isnt my cup of tea just yet... im only in 10th grade so the matrices and vertices look like babble. so anyways ide like to do a particle system, if i HAVE to do that math ill look it up but ide like to sway away from the math and sh*t
One of the GDNet members, "Robloach", has created this excellent particle system for SDL.NET, maybe it'll be of help to you.
Good luck.
Good luck.
Particle systems will be much easier once you take a Physics course and I'd caution to wait until then.
well it will be about 4 years until im taking a physics class lol....im looking more for a c++ particle engine.
Quote:Original post by Undeadlnsanity
One of the GDNet members, "Robloach", has created this excellent particle system for SDL.NET, maybe it'll be of help to you.
Good luck.
particles are easy if you understand the basics of whatever drawing API/library you're using, and dynamic memory allocation to a degree (to not overflow with undeleted particles of course) and a little bit of physics. You can definitely do something basic like snow with very little practice.
The tricky part is extensible engines. Anyway, what I was going to say was that the articles on this website, particularly NeHe's particle guide which can give you a good idea on physics and implementation of particles, and the Extensible particle system guide, were quite useful to me. Just study their code and implement it to draw in SDL, and you're good to go.
I can tell you though, that the basic beef of a particle will include position on the x and y, velocity on x and y is a good idae, a life cycle to keep track of when to delete them. When creating particles you'll prolly wanna spawn them with randomized start location, or else randomized velocities, and a good way to keep track of all your particles at once would be to store them all in a vector, which is why I do, and it works pretty well. On my website, you can download latest version of a demo im writing which has a simple particle engine, it's not extensible, but you can check it out if you like. good luck
The tricky part is extensible engines. Anyway, what I was going to say was that the articles on this website, particularly NeHe's particle guide which can give you a good idea on physics and implementation of particles, and the Extensible particle system guide, were quite useful to me. Just study their code and implement it to draw in SDL, and you're good to go.
I can tell you though, that the basic beef of a particle will include position on the x and y, velocity on x and y is a good idae, a life cycle to keep track of when to delete them. When creating particles you'll prolly wanna spawn them with randomized start location, or else randomized velocities, and a good way to keep track of all your particles at once would be to store them all in a vector, which is why I do, and it works pretty well. On my website, you can download latest version of a demo im writing which has a simple particle engine, it's not extensible, but you can check it out if you like. good luck
If you want a realistic explosion, a little more advanced physics may be necessary, or create different instances of expanding particle spheres... A little creativity and you can pull it off, but if you're new to something you should usually start small before trying to tackle something big and causing a lot of problems on accident
If you are using OpenGL, check this out:
http://www.codesampler.com/oglsrc/oglsrc_6.htm#ogl_particle_system
It's also very easy to initialize an OpenGL window with SDL
see http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=01
There is a link at the bottom with Linux/SDL code for initializing a window- It should probably also with with OSX and Windows, as SDL and OpenGL are cross platform.
http://www.codesampler.com/oglsrc/oglsrc_6.htm#ogl_particle_system
It's also very easy to initialize an OpenGL window with SDL
see http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=01
There is a link at the bottom with Linux/SDL code for initializing a window- It should probably also with with OSX and Windows, as SDL and OpenGL are cross platform.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement