Make ParticleSystem start immediately + fog effect

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
Tabaqui
Prole
Posts: 34
Joined: Tue Mar 24, 2020 2:47 pm
Location: Italy

Make ParticleSystem start immediately + fog effect

Post by Tabaqui »

Hi all! I was able to replicate snow and rain effects using love's ParticleSystem, but I can't make them start immediately. As you can see in the demo there's a little delay before they actually start running at full speed. How can I do this?

And since I'm not very skilled with particles, is there any tutorial on how to implement a fog effect using love2d?
Attachments
Tester.love.zip
(3.24 KiB) Downloaded 123 times
User avatar
ReFreezed
Party member
Posts: 612
Joined: Sun Oct 25, 2015 11:32 pm
Location: Sweden
Contact:

Re: Make ParticleSystem start immediately + fog effect

Post by ReFreezed »

You'll have to kickstart the particles. Do something like this in love.load:

Code: Select all

local dt = .1
for time = 0, 2, dt do
	r:update(dt)
	s:update(dt)
end
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
User avatar
Tabaqui
Prole
Posts: 34
Joined: Tue Mar 24, 2020 2:47 pm
Location: Italy

Re: Make ParticleSystem start immediately + fog effect

Post by Tabaqui »

Thank you, ReFreezed. This morning i've tried calling update passing 1 as dt but it didn't work. Your solution works perfectly!
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 229 guests