Search found 3566 matches

by pgimeno
Sat May 11, 2024 8:45 am
Forum: Support and Development
Topic: Rectangle collision resolution only works on one axis
Replies: 2
Views: 199

Re: Rectangle collision resolution only works on one axis

Once the shapes are interpenetrating, both wasHorizontalAligned and wasVerticalAligned are going to be true, because they only check for interpenetration in one axis, and the shapes are known to be interpenetrating anyway, and the interpenetration affects both axes, so both checks will be true. This...
by pgimeno
Sat May 11, 2024 7:51 am
Forum: Support and Development
Topic: Garbage Collector and FFI
Replies: 8
Views: 342

Re: Garbage Collector and FFI

You haven't provided a runnable version that can be used to debug. I've made your code runnable by applying this patch: --- ffiorig.lua 2024-05-11 09:47:53.683996392 +0200 +++ ffimod.lua 2024-05-11 09:49:00.158667324 +0200 @@ -1,7 +1,23 @@ -local vec3 = require("math/vec3") -local mat4 = r...
by pgimeno
Sat May 11, 2024 6:56 am
Forum: General
Topic: [Help] Techniques for scaling
Replies: 21
Views: 789

Re: [Help] Techniques for scaling

glass2d wrote: Sat May 11, 2024 2:29 am When you say it "works for you" did you add this with no other rounding (Such as the player's physics body)
That's right. The character seems to jitter due to rounding problems and animation problems, but these are unrelated to the movement.
by pgimeno
Fri May 10, 2024 8:12 am
Forum: General
Topic: [Help] Techniques for scaling
Replies: 21
Views: 789

Re: [Help] Techniques for scaling

The idea is to round to screen pixels. It works for me, besides the obvious problems inherent to not using an integer scale, which cause image deformation.
by pgimeno
Thu May 09, 2024 6:31 pm
Forum: General
Topic: [Help] Techniques for scaling
Replies: 21
Views: 789

Re: [Help] Techniques for scaling

OK, try this and see whether it helps: function PlayerCamera:update(dt) local camX = Player.x local camY = Player.y local mapW = Map.width * Map.tilewidth local mapH = Map.height * Map.tileheight camX, camY = self:setBorders(camX, camY, mapW, mapH) camX = math.floor(camX*self.scale + 0.5) / self.sca...
by pgimeno
Thu May 09, 2024 12:36 pm
Forum: General
Topic: [Help] Techniques for scaling
Replies: 21
Views: 789

Re: [Help] Techniques for scaling

I wanted to have a look at the issue, but RL is keeping me quite busy these days. Could you please indicate what kind of movement you want? Specifically, my understanding is that you have a virtual resolution of 480x270 which is the underlying resolution, and you zoom it e.g. by 4 to get 1920x1080 i...
by pgimeno
Tue May 07, 2024 11:20 am
Forum: General
Topic: Love2D should look into its android capabilities
Replies: 2
Views: 228

Re: Love2D should look into its android capabilities

Gunroar:Cannon() wrote: Tue May 07, 2024 10:43 am Could we just ... try to fix these problems, especially the jit?
No, we couldn't. Different projects, different devs.
by pgimeno
Mon May 06, 2024 6:51 pm
Forum: General
Topic: [Help] Techniques for scaling
Replies: 21
Views: 789

Re: [Help] Techniques for scaling

What do you mean by jittery? Do you mean it snaps to virtual 480x270 pixels, and you want it to have screen-pixel movement as opposed to virtual-pixel movement? I find it hard to imagine what can be producing the tearing with the data you've provided. If you can, posting a .gif animation would help ...
by pgimeno
Sat May 04, 2024 8:18 pm
Forum: Libraries and Tools
Topic: error explorer - an interactive error screen for love
Replies: 3
Views: 807

Re: error explorer - an interactive error screen for love

Why is this not part of Löve already? :D

Great job. This could be especially helpful to novices who aren't familiar with error reports.
by pgimeno
Sat May 04, 2024 8:10 pm
Forum: Support and Development
Topic: Question about breakout - ball and paddle collison
Replies: 3
Views: 778

Re: Question about breakout - ball and paddle collison

Many people use trig where none is needed. This problem does not need to involve angles at all. The solution in the post you've quoted is simple and elegant.