Search found 1271 matches

by pgimeno
Mon Oct 22, 2018 6:45 pm
Forum: Support and Development
Topic: What was the reasoning for changing setColor from RGB 0-255 to 0-1 interval?
Replies: 30
Views: 469

Re: What was the reasoning for changing setColor from RGB 0-255 to 0-1 interval?

Well, I hope that setColor won't change in few months to #FF00FF format. Back to the topic, I think I read somewhere that it was because of the different texture formats in OpenGL, and not just because of shaders. Several texture formats use floats and these use normalized values (i.e. in the range...
by pgimeno
Mon Oct 22, 2018 3:11 pm
Forum: Support and Development
Topic: Rendering a canvas to itself?
Replies: 3
Views: 86

Re: Rendering a canvas to itself?

Works for me: local canvas1 = love.graphics.newCanvas() local canvas2 = love.graphics.newCanvas() function love.draw() love.graphics.setCanvas(canvas1) love.graphics.clear() love.graphics.rectangle("fill", 10, 20, 30, 40) canvas1, canvas2 = canvas2, canvas1 love.graphics.setCanvas(canvas1) love.grap...
by pgimeno
Mon Oct 22, 2018 3:00 pm
Forum: Support and Development
Topic: setCanvas() expects a number argument?
Replies: 2
Views: 93

Re: setCanvas() expects a number argument?

Works for me.

Code: Select all

local canvas1 = love.graphics.newCanvas()
local canvas2 = love.graphics.newCanvas()
love.graphics.setCanvas(canvas1, canvas2)
love.graphics.setCanvas()
You'll need to provide more information.
by pgimeno
Mon Oct 22, 2018 2:12 pm
Forum: Support and Development
Topic: Advice on Networking Physics State between Client/Server
Replies: 3
Views: 64

Re: Advice on Networking Physics State between Client/Server

The client then continues to use the socket.gettime() method to calculate dt and perform its local world:update(dt) call the server does the same. This is a major problem. If you want the same physics, the clients must use the same dt as the server. Even then, there's risk of desync due to differen...
by pgimeno
Mon Oct 22, 2018 12:41 am
Forum: Support and Development
Topic: What was the reasoning for changing setColor from RGB 0-255 to 0-1 interval?
Replies: 30
Views: 469

Re: What was the reasoning for changing setColor from RGB 0-255 to 0-1 interval?

Piece of cake. On Windows, that is. On Linux, I would use containers, but I don't think I'll make a Linux version. I've thrown this quick-and-dirty code together: #!/bin/bash ver=$(luajit <<'EOF' local love = {} pcall(require, 'conf') local c = {modules={}, window={}, screen={}} if love.conf then p...
by pgimeno
Sun Oct 21, 2018 8:55 pm
Forum: Support and Development
Topic: What was the reasoning for changing setColor from RGB 0-255 to 0-1 interval?
Replies: 30
Views: 469

Re: What was the reasoning for changing setColor from RGB 0-255 to 0-1 interval?

Yeah and I am not surprised, it's just lazy to distribute a .love rather than distributing the game with the right version. .love files should really only be distributed on these forums and among devs, no other real use for them For Linux, it's not lazy, it's kind of necessary. There are appimages ...
by pgimeno
Sun Oct 21, 2018 8:15 pm
Forum: Support and Development
Topic: What was the reasoning for changing setColor from RGB 0-255 to 0-1 interval?
Replies: 30
Views: 469

Re: What was the reasoning for changing setColor from RGB 0-255 to 0-1 interval?

Here's an old discussion on LÖVE versioning, for reference: https://love2d.org/forums/viewtopic.php?f=4&t=81130 (It happens to be my first post on the forums) I made some progress on an old version emulation library, but after I managed to have all versions compiled as separate executables, and seei...
by pgimeno
Sat Oct 20, 2018 4:59 am
Forum: Support and Development
Topic: How to export PNG screenshot with transparency?
Replies: 1
Views: 81

Re: How to export PNG screenshot with transparency?

You can try drawing to a canvas instead of the screen, and saving via Canvas:newImageData . Note however that OpenGL does not support proper alpha compositing without a custom shader, so if you use normal blending mode, the PNG you will obtain will have premultiplied alpha, which is not supported by...
by pgimeno
Thu Oct 18, 2018 12:47 am
Forum: Support and Development
Topic: Mousepressed not working?
Replies: 27
Views: 739

Re: Mousepressed not working?

I'll tell you it's just as frustrating on my end. If I am not giving you something you think you need to see to solve the issue then ask away, I am not an experienced coder so I can't guess what you need to hear. I have to say that I don't get what you mean with "two mousepressed events" if you cou...
by pgimeno
Wed Oct 17, 2018 4:37 pm
Forum: Support and Development
Topic: Mousepressed not working?
Replies: 27
Views: 739

Re: Mousepressed not working?

Thanks for your help. Where do I start to analyse why my mousepressed event isn't working? I am pretty clueless at this point. You may have two mousepressed events. You may be declaring it somewhere where it does not execute. The print may be working but not being shown in the output for some reaso...