I've put together a new experiment that involves a whole bunch of circles with a high restitution (meaning they maintain speed for quite a while before slowing down). You can place individual particles, particle spawners, adjust speed (done by multiplying the delta time), and send a shockwave from the mouse's position to get things moving again. This includes the motion blur effect like last time, though implemented in a module of sorts.
Controls (copied from main.lua):
LMB to spawn a new particle at the mouse position
RMB to add an automatic particle spawner at the mouse position
Scroll to adjust the speed at which the world updates
Spacebar to create an outward explosion of force from the mouse position
M to toggle motion blur
Experiment: Physical "Particles"
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Experiment: Physical "Particles"
- Attachments
-
- particles.love
- (3.12 KiB) Downloaded 262 times
- silver_hawk
- Prole
- Posts: 36
- Joined: Mon Feb 27, 2012 2:19 pm
Re: Experiment: Physical "Particles"
This is nice, I get around 170 FPS with 500 particles
Re: Experiment: Physical "Particles"
Once again you show mastery over box2d. This reminds me of that awesome PS2 game Fantavision.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Re: Experiment: Physical "Particles"
Thanks guys.
I wouldn't call it mastery though; I haven't even used joints yet!
I wouldn't call it mastery though; I haven't even used joints yet!
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Experiment: Physical "Particles"
Nice. When I get to 1000 particles, it still runs 60 FPS for me (just like it does at 500), and when I get to 1400 it runs at 50 FPS. At 1700, I get 40 FPS, I think I'll stop there.
Help us help you: attach a .love.
Re: Experiment: Physical "Particles"
At 370 I had around 20 FPS (without motion blur), I pressed space and it froze...
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Re: Experiment: Physical "Particles"
Yeah, it's not very efficient (especially the force push thing; I'm pretty sure that could be done better).
Who is online
Users browsing this forum: No registered users and 23 guests