Particles
Monkey Archive Forums/Monkey Projects/Particles
| ||
Spent some time this evening working on some code for my game/engine. Got some nice particle and quadtree stuff coded! http://www.skn3.com/junk/codefun/particles/v001/MonkeyGame.html Particles w00t :D It doesn't currently kill particles that come to a stop and it might crash randomly...lol The particle scene is setup like this: 'create particle container particles = Skn3EntityParticles.Create("particles_1", 5000) particles.debug = True layer.AddChild(particles) 'create particle group particleGroup = particles.AddGroup(0, 0, scene.width, scene.height) 'add forces to the group particleGroup.AddForce(Skn3ParticleForceConstant.Create(0, 200)) 'add zones to the group particleGroup.AddZone("stay_in", 50, 50, scene.width - 100, scene.height - 100, False) 'add solids to the group particleGroup.AddSolidRect(70, 10, 16, 500) particleGroup.AddSolidRect(80, 80, 50, 50) particleGroup.AddSolidRect(90, 100, 30, 70) particleGroup.AddSolidPoly([100.0, 100.0, 500.0, 80.0, 300.0, 200.0, 400.0, 400.0, 350.0, 500.0, 200.0, 550.0]) particleGroup.AddSolidPoly([500.0, 400.0, 500.0, 300.0, 600.0, 500.0]) And particles are currently added using: I will eventually add some kind of particleBlueprint that lets me specify various animation aspects for a particle such as scale, rotation, color, fade, etc Anyway thought it was a cool toy to play with so posted it. |
| ||
As you noted it did freeze my chrome a few times, but I like the bouncy-ness of the partials. Some one needs to make an angle-grinder game. |