Search found 105 matches

by PGUp
Wed Feb 28, 2018 10:57 am
Forum: General
Topic: iterating through a list for PolygonShape:getPoints()
Replies: 6
Views: 4016

Re: iterating through a list for PolygonShape:getPoints()

it seems like you are not trying to make a physics polygon, PolygonShape:getPoints() is for physics polygon only.. using it on a table like that wont work

Code: Select all

function love.draw()
local points = {0, 0, 250, 250, 0, 500}
love.graphics.polygon("line", points)
end
by PGUp
Sun Feb 25, 2018 12:42 pm
Forum: Support and Development
Topic: Is there something like Canvas:overwriteOldImageData() ?
Replies: 12
Views: 6930

Re: Is there something like Canvas:overwriteOldImageData() ?

Canvas:clear()
Then set the canvas and draw things to it again
by PGUp
Sun Feb 25, 2018 12:33 pm
Forum: Support and Development
Topic: Drawing order not working properly, could use some help!
Replies: 6
Views: 3370

Re: Drawing order not working properly, could use some help!

Alright, this is weird.. why don't you just use 1 love.draw(), love.update() and love.load() function ? Or if you don't want it to be a mess do things in separated files. For your player movement problem, if you do things like this function love.update() if love.keyboard.isDown("right") th...
by PGUp
Fri Feb 23, 2018 10:08 am
Forum: Support and Development
Topic: Mobile screen size adaption
Replies: 9
Views: 8659

Re: Mobile screen size adaption

Put CScreen.update() after CScreen.init() and it should be working
by PGUp
Fri Feb 23, 2018 6:53 am
Forum: Support and Development
Topic: Ellipsis not working?
Replies: 9
Views: 5830

Re: Ellipsis not working?

Like this ?

Code: Select all

function aFunction(...)
local arg = {...}
love.graphics.print(arg[1] .. arg[2] .. arg[3])
end

function love.draw(dir, flags) 
aFunction("Foo", "Bar", "123")
end
by PGUp
Thu Feb 22, 2018 7:50 am
Forum: Support and Development
Topic: Collision detection problem
Replies: 4
Views: 3440

Re: Collision detection problem

Spot it! Look at your code again.. it should be table.remove(enemy, a) instead of table.remove(enemy, i) in collision check between player and enemy, since the variable for the index is a, Also iterate backward so you won't see the glitchy enemy movement
by PGUp
Wed Feb 21, 2018 11:40 am
Forum: Support and Development
Topic: Apply noise to bounce
Replies: 4
Views: 3466

Re: Apply noise to bounce

pong without physics.. its much better
by PGUp
Tue Feb 20, 2018 9:17 am
Forum: Support and Development
Topic: Rotating a shape?
Replies: 8
Views: 8092

Re: Rotating a shape?

function love.draw() love.graphics.translate(rectangleX, rectangleY) love.graphics.rotate(math.rad(rectangleAngle)) love.graphics.rectangle("fill", -rectangleWidth()/2, -rectangleHeight()/2, rectangleWidth, rectangleHeight) end Add love.graphics.push() before translate and love.graphics.p...
by PGUp
Wed Jan 31, 2018 3:15 pm
Forum: Support and Development
Topic: Weird bug ?
Replies: 2
Views: 1991

Re: Weird bug ?

Hey, I ran this on Android and I just see the line appear where I touch, like you described, no black sections leading to the corner like in the screenshot. Seems to work fine for me on Moto g5 when run using love2d app. What device are you using? Actually, I do see one spaz line going off, nothing...