Search found 46 matches

by RunningGamesStudios
Wed Jun 05, 2013 1:53 am
Forum: Support and Development
Topic: Weird error
Replies: 3
Views: 2098

Weird error

function love.load() home = love.filesystem:getWorkingDirectory() w = love.graphics.getWidth() h = love.graphics.getHeight() paX = 10 paY = h / 2 + 50 paxB = 10 payB = h / 2 - 50 pbX = 0 pbY = 0 pbxB = 0 pbyX = 0 x = 200 y = 200 angle = 0 speed = 100 anglespeed = 4 end function love.update(dt) x = ...
by RunningGamesStudios
Sun Jun 02, 2013 5:17 pm
Forum: Support and Development
Topic: Move an object based on an angle?
Replies: 5
Views: 3455

Re: Move an object based on an angle?

Trigonometry. So if you're trying to move 10 pixels (c) at some angle, you just need to solve for a and b. Then translate the moving object by a and b. So, like this? function love.load() x = 200 y = 200 angle = 1 angleS = math.sin(angle) angleC = math.cos(angle) end function love.update(dt) angleS...
by RunningGamesStudios
Sun Jun 02, 2013 5:06 pm
Forum: Support and Development
Topic: Move an object based on an angle?
Replies: 5
Views: 3455

Re: Move an object based on an angle?

this is what I got so far function love.load() x = 200 y = 200 angle = 1 end function love.update(dt) x = x + math.cos(angle) * 1 y = y +math.sin(angle) * 1 if love.keyboard.isDown("up") then angle = (angle + 1) * dt end if love.keyboard.isDown("down") then angle = (angle - 1) * ...
by RunningGamesStudios
Sun Jun 02, 2013 4:59 pm
Forum: Support and Development
Topic: Move an object based on an angle?
Replies: 5
Views: 3455

Move an object based on an angle?

How would one do that?
by RunningGamesStudios
Sat Jun 01, 2013 2:00 pm
Forum: Support and Development
Topic: New to love
Replies: 3
Views: 3825

Re: New to love

Thank you very much!
by RunningGamesStudios
Fri May 31, 2013 9:45 pm
Forum: Support and Development
Topic: New to love
Replies: 3
Views: 3825

New to love

trying to make it so test.png will glide to where ever i click the screen. this is what i got so far --int function love.load() home = love.filesystem.getWorkingDirectory() img = love.graphics.newImage("test.png") key = "" imgx = 100 imgy = 100 end --int END --main function love....