Search found 5 matches

by rando
Mon Jan 17, 2022 6:56 pm
Forum: Support and Development
Topic: Tile based collision, player catches on corners of tiles despite lack of downward velocity
Replies: 4
Views: 2436

Re: Tile based collision, player catches on corners of tiles despite lack of downward velocity

Thanks for the test case. I haven't looked in enough detail, but when the problem is happening, you are dividing 0/0. When the ray starts at the edge of the box (for example when e.x - ray.ox = 0) and the movement is parallel to the edge (ray.mx = 0), the division returns NaN and the algorithm is n...
by rando
Mon Jan 17, 2022 3:12 am
Forum: Support and Development
Topic: Tile based collision, player catches on corners of tiles despite lack of downward velocity
Replies: 4
Views: 2436

Re: Tile based collision, player catches on corners of tiles despite lack of downward velocity

pgimeno wrote: Mon Jan 17, 2022 12:32 am Can you give a full runnable example? Doesn't need to be your project, doesn't need to have graphics, just rectangles will do.
Here you go:
AABB Swept (1).zip
(2.88 KiB) Downloaded 62 times
by rando
Sun Jan 16, 2022 10:47 pm
Forum: Support and Development
Topic: Tile based collision, player catches on corners of tiles despite lack of downward velocity
Replies: 4
Views: 2436

Tile based collision, player catches on corners of tiles despite lack of downward velocity

I'm trying to make a tile based game, and I've been trying to make this collision system. What it does is it takes the player's velocity, checks for collisions between where it is and where it will be, and adjusts the velocity to prevent collision. It's almost working perfectly, but there's a bug th...
by rando
Sat Dec 04, 2021 10:36 pm
Forum: Support and Development
Topic: When using love.math.noise, either the program stops responding or I get some kind of expected results
Replies: 12
Views: 9423

Re: When using love.math.noise, either the program stops responding or I get some kind of expected results

I got this fixed on another website. The problem was 100% lag, because of drawing all those points every frame. What I needed to do was render the data onto a buffer and draw that buffer instead of each individual point every frame. One thing I experienced is that canvases didn't work well, and I'm ...
by rando
Fri Nov 26, 2021 10:22 pm
Forum: Support and Development
Topic: When using love.math.noise, either the program stops responding or I get some kind of expected results
Replies: 12
Views: 9423

When using love.math.noise, either the program stops responding or I get some kind of expected results

Hello, I'm trying to generate some terrain to make a game similar to Risk. To generate the terrain, I'm using love.math.noise. for x = 0, 800 do for y = 0, 600 do value[x] = value[x] or {} xCoord = x / 800 - 0.5 yCoord = y / 600 - 0.5 Noise = love.math.noise(xCoord, yCoord) value[x][y] = Noise end e...