First time with LÖVE
Posted: Tue Jul 14, 2015 11:21 pm
New to the forum here, so hello everyone. I've been coding for awhile (year perhaps, just a hobby, nothing serious) in C++, and I've decided to create a game using SDL library, resulting in a enormous mess, and loads of unexplainable errors . Instead of giving up I moved into LUA because of it's simplicity and usage in scripts, with "LÖVE" framework just yesterday ago, since a simple 2d platformer does not need to be this complex. I've read some of the tutorials, got that hamster one working fine, but mine attempts of "juicing" it up kind of failed, and I was wondering if I would find some help on this forum.
For instance, a trace of the .png whenever hamster is moving at any direction, in random colors then disappearing in a short time. I made a variable in love.load() called:
put the setColor command, in the update function in every input:
and it just doesn't work. Should it create a new png file instead and delete it if the alpha hits zero? If yes then how do I implement that? Complete newbie here, i just have no idea. I was thinking about setting up boundaries too, by detecting if upper, lower, left or right side of the screen is either at 0 or maximum, but I just don't know how.
Yes, English is my second language, in case I messes up some grammar or didn't made any sense.
I would be very thankful if anyone could help.
For instance, a trace of the .png whenever hamster is moving at any direction, in random colors then disappearing in a short time. I made a variable in love.load() called:
Code: Select all
rand = math.rand(1,255)
Code: Select all
if love.keyboard.isDown("direction") then
love.graphics.setColor(rand,rand,rand,255)
love.graphics.draw(ham, x, y)
x or y = x or y + (speed*dt)
end
Yes, English is my second language, in case I messes up some grammar or didn't made any sense.
I would be very thankful if anyone could help.