Text Acting Like Particles

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
mitchellrivett
Prole
Posts: 9
Joined: Sat Mar 14, 2015 12:10 am
Location: Canada

Text Acting Like Particles

Post 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?
User avatar
zorg
Party member
Posts: 3470
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Text Acting Like Particles

Post by zorg »

you mean besides printing it with either love.graphics.print or love.graphics.printf?
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
mitchellrivett
Prole
Posts: 9
Joined: Sat Mar 14, 2015 12:10 am
Location: Canada

Re: Text Acting Like Particles

Post 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.
User avatar
MadByte
Party member
Posts: 533
Joined: Fri May 03, 2013 6:42 pm
Location: Braunschweig, Germany

Re: Text Acting Like Particles

Post 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.
Last edited by MadByte on Sun Apr 05, 2015 9:35 am, edited 1 time in total.
User avatar
mitchellrivett
Prole
Posts: 9
Joined: Sat Mar 14, 2015 12:10 am
Location: Canada

Re: Text Acting Like Particles

Post 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.
User avatar
MadByte
Party member
Posts: 533
Joined: Fri May 03, 2013 6:42 pm
Location: Braunschweig, Germany

Re: Text Acting Like Particles

Post 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.

Image

Demo:
TextEmitter.love
User avatar
mitchellrivett
Prole
Posts: 9
Joined: Sat Mar 14, 2015 12:10 am
Location: Canada

Re: Text Acting Like Particles

Post 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.

Image

Demo:
TextEmitter.love
Looking good! Maybe you could put it in the Projects and Demos forum?
User avatar
MadByte
Party member
Posts: 533
Joined: Fri May 03, 2013 6:42 pm
Location: Braunschweig, Germany

Re: Text Acting Like Particles

Post by MadByte »

this is not really a big deal. I may put it onto my own homepage ;)
Post Reply

Who is online

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