Page 1 of 1
Text Acting Like Particles
Posted: Sat Apr 04, 2015 6:14 pm
by mitchellrivett
When the player gets points, I'd like text to spawn that reads "+x points" where x would vary depending on the amount of points they receive, and fade out shortly after.
My first thought was to use a particlesystem, however Love's particlesystem does not support text. Does anyone know of any alternatives to do this?
Re: Text Acting Like Particles
Posted: Sat Apr 04, 2015 7:16 pm
by zorg
you mean besides printing it with either love.graphics.print or love.graphics.printf?
Re: Text Acting Like Particles
Posted: Sat Apr 04, 2015 7:31 pm
by mitchellrivett
zorg wrote:you mean besides printing it with either love.graphics.print or love.graphics.printf?
Specifically the fading out is what makes using that difficult. The player can potentially get lots of points from different sources in a short amount of time, which would trigger multiple instances of "+x points".
Keeping track of all the values for all the transparency, and motion of the points is a huge pain. The effects I want are easily accessible in the particle system that Love offers, so I was wondering if there is any alternative for text.
Re: Text Acting Like Particles
Posted: Sat Apr 04, 2015 7:33 pm
by MadByte
Do your own "Text Particle System".
Here is a basic emitter I just wrote to demonstrate.
(
Edit : updated file)
TextEmitter.love
(just smash your left mouse button to see what it does)
Maybe this gives you an idea of what you need to do.
Re: Text Acting Like Particles
Posted: Sat Apr 04, 2015 7:38 pm
by mitchellrivett
MadByte wrote:Do your own "Text Particle System".
Here is a basic emitter I just wrote to demonstrate.
TextEmitter.love
(just smash your left mouse button to see what it does)
Maybe this gives you an idea of what you need to do.
That's exactly what I was looking for! Thank you.
Re: Text Acting Like Particles
Posted: Sun Apr 05, 2015 7:11 am
by MadByte
I just cleaned up the text emitter demo and added basic font support.
Also the usage changed a bit because the previous way to manipulate particle variables wasn't that great.
Edit
I added another method to add a bounce effect to the text. looks pretty cool. Maybe you
can use it somehow.
Demo:
TextEmitter.love
Re: Text Acting Like Particles
Posted: Sun May 10, 2015 11:25 pm
by mitchellrivett
MadByte wrote:I just cleaned up the text emitter demo and added basic font support.
Also the usage changed a bit because the previous way to manipulate particle variables wasn't that great.
Edit
I added another method to add a bounce effect to the text. looks pretty cool. Maybe you
can use it somehow.
Demo:
TextEmitter.love
Looking good! Maybe you could put it in the Projects and Demos forum?
Re: Text Acting Like Particles
Posted: Mon May 11, 2015 4:05 pm
by MadByte
this is not really a big deal. I may put it onto my own homepage