Search found 71 matches

by grump
Thu Sep 21, 2017 11:40 pm
Forum: Support and Development
Topic: Window one pixel higher than expected
Replies: 4
Views: 91

Re: Window one pixel higher than expected

It's exactly what it should be for me too (Linux, LÖVE 10.2). In theory, coordinates for points and lines should be offset by 0.5 for correct rendering, because you're supposed to specify the pixel centers. As far as I understand, a line from (0, 767) to (1023, 767) should be drawn as love.graphics....
by grump
Thu Sep 21, 2017 9:47 pm
Forum: General
Topic: Love cutting rectangle
Replies: 6
Views: 128

Re: Love cutting rectangle

a) please describe your problem in more words
b) post the code that shows the actual problem
c) Image
by grump
Thu Sep 21, 2017 7:39 pm
Forum: Support and Development
Topic: Image bug
Replies: 8
Views: 162

Re: Image bug

Change all occurrences of woo.x and woo.y in the drawing part to math.floor(woo.x) and math.floor(woo.y). Simplify your draw function -- untested example code, may contain errors local anim = { idle = img.woo.idle, right = img.woo.sag, left = img.woo.sol, top = img.woo.top, bot = img.woo,bot, } lp.d...
by grump
Thu Sep 21, 2017 5:34 pm
Forum: Support and Development
Topic: Image bug
Replies: 8
Views: 162

Re: Image bug

zorg is right, it wouldn't work at lower speeds or very high frame rates. My bad.

Please show some code. Only the relevant code please: the part where you're moving your sprite and the part where you're drawing it.
by grump
Thu Sep 21, 2017 4:14 pm
Forum: Support and Development
Topic: Image bug
Replies: 8
Views: 162

Re: Image bug

Linear filtering happens because you're moving the image to sub-pixel positions. Use

Code: Select all

x = math.floor(x + 100 * dt)
by grump
Tue Sep 19, 2017 8:57 pm
Forum: Support and Development
Topic: Arg passed is nil
Replies: 7
Views: 382

Re: Arg passed is nil

Been using Java a lot again lately. :death: Oh, that's unfortunate. You have my deepest sympathy. Not having to use semicolons is the greatest thing in Lua, but I always forget to put them when writing inline shader code for LÖVE. I'm not capable of writing shader code in Lua that compiles on the f...
by grump
Tue Sep 19, 2017 5:51 pm
Forum: Support and Development
Topic: Arg passed is nil
Replies: 7
Views: 382

Re: Arg passed is nil

i wouldn't necessarily call people neither insane, nor masochistic to use either/or, just not mixed. I'm gonna quote myself here: When you declare the function with a colon, you have to use colon syntax when calling the function In other words: When you define the function with a colon, but use dot...
by grump
Tue Sep 19, 2017 1:36 pm
Forum: Support and Development
Topic: Arg passed is nil
Replies: 7
Views: 382

Re: Arg passed is nil

Beelz wrote:
Tue Sep 19, 2017 12:42 pm
You don't have to, it's just syntactic sugar.
No, you don't have to. If you're insane or masochistic, you can do it the other way.
semicolon
No.
by grump
Sun Sep 17, 2017 5:14 pm
Forum: Support and Development
Topic: Arg passed is nil
Replies: 7
Views: 382

Re: Arg passed is nil

When you declare the function with a colon, you have to use colon syntax when calling the function: input:HandleInput(key) If you use the dot syntax, the 'key' argument will be used as the 'self' table reference. Use the colon syntax with tables that will be instantiated, and the dot syntax for sing...
by grump
Sun Sep 17, 2017 12:12 pm
Forum: General
Topic: How to separate concerns?
Replies: 2
Views: 132

Re: How to separate concerns?

This is a good starting point.