Click to See Complete Forum and Search --> : My 1st particle engine


thre3dee
August 9th, 2005, 03:30 AM
Hi,

after having retried doing OpenGL (even if it isn't truly 3D) i've made a 2D particle and gravity app. it uses a 'particle pool' to reduce the over head of deleting and creating new particles everytime a particle 'dies'.
The old particles are simply moved to the pool link list so that if a particle system needs a new particle it can just request one from the particle pool.

Unfortunately I haven't figured out how to draw fonts in opengl yet so there isn't HUD but at least the screen isn't cluttered.

download it here
http://www.freewebs.com/fleetcommander/release.rar
that fleetcommander thingo is some crappy webspace that i just use for files nowadays

The key commands are: (the rar file contains these)

Gravity Balls:
--------------
F1 - Add attracting gravity ball
F2 - Add repelling gravity ball
F3 - Toggle repel/attract on last created ball
F4 - Toggle falloff effect on last ball
F7 - Delete last created ball
F8 - Delete all gravity balls
Mouse Wheel - Increase/decrease last ball size

Particle Systems:
-----------------
F5 - Create new particle system
F6 - Delete last particle system
F9 - Delete all particle systems
Tab - Toggle mouse pointer gravity
F11 - Push particles to the left
F12 - Push particles to the right
Backspace - Delete all particle systems/particles completely from memory (including particle pool)

Erase-Mode:
-----------
Space - Toggle erase mode
Page Up/Down - Change eraser size
P - Toggle particles/particle system erasing
Left click - Erase particles/particle systems

Step-Mode: (manual animation)
----------
'M' - Toggle step mode
Enter - Step forward

Miscellaneous:
--------------
Esc - Quit
Numpad +/- - Change number of particles in particle systems
Arrow Up/Down - Increase/decrease gravity by 0.01
Arrow Left/Right - Increase/decrease gravity by 0.1
W - Toggle wall collision
S - Toggle slow motion

Save/Load State:
----------------
Numpad 0-9 - Save State
0-9 - Load State