Search found 1495 matches

by pgimeno
Sat Feb 16, 2019 10:58 am
Forum: Support and Development
Topic: Question about shader and camera
Replies: 11
Views: 267

Re: Question about shader and camera

I have to apologize. I screwed up big time when I told you about what to do with the camera, because I didn't really think it through. To make it up to you, here's the full corrected camera.lua. I've renamed some functions so their names express more accurately what they actually do. That's because ...
by pgimeno
Sat Feb 16, 2019 3:05 am
Forum: General
Topic: How to count how many times a number generates
Replies: 1
Views: 44

Re: How to count how many times a number generates

Hi, and welcome to the forums :) You just need to create a table with an entry for each possible number from 0 to 32, initially all zeros. That's easily done with a loop from 0 to 32. These are the counters, one for each number. Then you run the other loop, the one that repeats a million times, wher...
by pgimeno
Sat Feb 16, 2019 12:57 am
Forum: General
Topic: May love2d planned move to github?
Replies: 20
Views: 3009

Re: May love2d planned move to github?

ingsoc451 wrote:
Fri Feb 15, 2019 11:17 pm
Microsoft gets rid of some open source extremists without doing anything
Calling people who are opposed to monopolies and favour consumer choice, "extremists", is not nice.

It also has nothing to do with open source.
by pgimeno
Fri Feb 15, 2019 11:40 pm
Forum: Support and Development
Topic: Question about shader and camera
Replies: 11
Views: 267

Re: Question about shader and camera

My confusion came from your use of screen coordinates for the light position. I think that just needs to be ditched, and lights need to be expressed in world coordinates (the coordinates of the objects in the game's world), which in your case seem to match pixel coordinates (the coordinates of each ...
by pgimeno
Fri Feb 15, 2019 6:40 pm
Forum: Support and Development
Topic: Question about shader and camera
Replies: 11
Views: 267

Re: Question about shader and camera

Thanks for the test case, that really helps! So I believe that the problem here is that you're relying on autobatching, and that makes the caveat in TransformMatrix (in Shader_Variables ) to apply to your case. Possible solution 1: Don't rely on autobatching: create a spritebatch with the tiles inst...
by pgimeno
Fri Feb 15, 2019 11:58 am
Forum: Support and Development
Topic: Question about shader and camera
Replies: 11
Views: 267

Re: Question about shader and camera

Well, I haven't ever tried to use TransformProjectionMatrix for this usage. Probably you only need TransformMatrix though. You basically need to transform (i.e. multiply) the coordinates of the lights by that matrix. PS. Sorry for not replying earlier. Sometimes some posts aren't marked as unread by...
by pgimeno
Fri Feb 15, 2019 11:45 am
Forum: Support and Development
Topic: Quad vs SpriteBatch
Replies: 6
Views: 169

Re: Quad vs SpriteBatch

Ahh okay, thanks for the clarification. Switching canvas is slow, so I would expect that drawing to a canvas first will be a bit slower than drawing the spritebatch directly.

Note that LÖVE 11+ automatically creates spritebatches when you draw things without changing texture.
by pgimeno
Thu Feb 14, 2019 7:55 pm
Forum: Support and Development
Topic: Quad vs SpriteBatch
Replies: 6
Views: 169

Re: Quad vs SpriteBatch

Can you rephrase the question, please?
by pgimeno
Thu Feb 14, 2019 2:14 am
Forum: General
Topic: May love2d planned move to github?
Replies: 20
Views: 3009

Re: May love2d planned move to github?

I suppose your argument would be that Microsoft would seek the termination of alternatives like GitLab and Bitbucket. If this is the case, then how would LÖVE, a project using the Bitbucket platform for free, help prevent this monopoly? What is the level of opposition we can reasonably expect to mo...
by pgimeno
Thu Feb 14, 2019 2:00 am
Forum: Games and Creations
Topic: Tower Climb
Replies: 11
Views: 449

Re: Tower Climb

P.S: Do I have to multiply dt every time some sort of variable that influences the player's movement somehow in any form increases? Not necessarily, but since you're implementing custom physics, the velocity changes at a rate that depends on the time step and the current acceleration, just as the p...