Search found 1448 matches

by pgimeno
Tue Jan 22, 2019 6:08 pm
Forum: Support and Development
Topic: Using a single return value of a fucntion
Replies: 6
Views: 86

Re: Using a single return value of a fucntion

Oh you can, with parentheses:

Code: Select all

two = ({foo()})[2]
But using that method implies creation and destruction of an object unnecessarily.
by pgimeno
Tue Jan 22, 2019 6:04 pm
Forum: Support and Development
Topic: Using a single return value of a fucntion
Replies: 6
Views: 86

Re: Using a single return value of a fucntion

Note that select() returns all values starting on the specified one, so in this case it would return 2, 3. If you don't want that, you can isolate the parameter by wrapping the select in parentheses: local function foo() return "a", "b", "c" end local table1 = { select(2, foo()) } local table2 = { (...
by pgimeno
Tue Jan 22, 2019 2:17 am
Forum: Support and Development
Topic: [SOLVED] Drawing on canvas works wrong
Replies: 4
Views: 74

Re: Drawing on canvas works wrong

You need to draw the canvas to the screen with white colour, otherwise you're tinting it :)

The last clear() isn't necessary, by the way.
by pgimeno
Mon Jan 21, 2019 5:18 pm
Forum: Support and Development
Topic: Fullscreen causes pixelation
Replies: 4
Views: 96

Re: Fullscreen causes pixelation

Maybe you're using "normal" (i.e. exclusive) mode for fullscreen and it's picking a low resolution? Try setting fullscreen mode to "desktop".
by pgimeno
Sun Jan 20, 2019 11:42 pm
Forum: Support and Development
Topic: [SOLVED] Canvas is crashing 11.2
Replies: 3
Views: 89

Re: Canvas is crashing 11.2

I've added a paragraph to love.graphics.setCanvas, feel free to correct it if you think the wording could be improved (wiki accounts use the same user/password as the forum). To prevent confusion: I'm not a Love2d dev.
by pgimeno
Sun Jan 20, 2019 10:52 pm
Forum: Support and Development
Topic: [SOLVED] Canvas is crashing 11.2
Replies: 3
Views: 89

Re: Canvas is crashing 11.2

When love.draw finishes, you need to have no canvas active, so you need to disable it at some point before the end of love.draw(). This works, for example: function love.draw() love.graphics.setCanvas(canvas_1) -- do stuff here love.graphics.setCanvas() end Of course, drawing only to a canvas in lov...
by pgimeno
Sat Jan 19, 2019 3:30 pm
Forum: General
Topic: Free starting guide Lua
Replies: 6
Views: 379

Re: Free starting guide Lua

Hope you don't mind if I chime in to comment on a few things. I have read the guide in diagonal, because I find it tiresome to read stuff that I already know. Still, I have to agree with Zorg that there's more than one wrong statement. I've found three from that very quick look, there are probably m...
by pgimeno
Fri Jan 18, 2019 3:02 pm
Forum: General
Topic: May love2d planned move to github?
Replies: 8
Views: 1892

Re: May love2d planned move to github?

I don't think MS will do some evil things to github user's repo, have a giant company may help github better. I do also use bitbucket and gitlab with my friends and colleagues. You can auto sync your git repo to gitlab or bitbucket, that's very convenience. MS is already doing evil things. https://...
by pgimeno
Mon Jan 14, 2019 6:04 pm
Forum: Support and Development
Topic: 0.9.2 to 11.2 drawing quads with alpha
Replies: 5
Views: 262

Re: 0.9.2 to 11.2 drawing quads with alpha

Without a complete self-contained example that reproduces the problem, I don't think anyone will be able to help.
by pgimeno
Mon Jan 14, 2019 3:34 pm
Forum: Support and Development
Topic: How can I make a loading screen?
Replies: 11
Views: 412

Re: How can I make a loading screen?

OK, thanks for the clarification. Then it's an unavoidable initialization glitch, but the loading screen still works the way it's designed to work.