I'm fairly new to LÖVE and just started learning Lua in the past couple of days using the Wiki and searching the forums. So far I've got a few things going that I'm happy with but finally bumped into a topic I can't find a solution for.
Currently all I've got is a circle moving towards the mouse cursor and making a kind of dashing movement when pressing the right mouse button.
Now I'd like to add a little trail to the circle when dashing and can't find a proper solution.
The most straight forward approach would be to use a particle system, but it seems like I need to load an image to be able to display something. So far I'm just using the draw function to display basic shapes and I'd like to keep it that way for now, especially since I might want to change the radius of my player circle later on and I like the aesthetic of basic geometry. So my first question is:
Is it possible to use shapes like rectangles, circles, etc. in particle systems?
I've tried something like this, but it just throws an error (can the circle function only be called from within the draw function?):
Code: Select all
g = love.graphics
circle = g.circle( "fill", player.x, player.y, player.radius )
player.trail = g.newParticleSystem(circle, 5)
Isn't there a simple way to create a player trail?
I've attached my current script in case you are interested.
Thanks for taking the time and helping out a n00b.