Skip to main content

All Questions

Filter by
Sorted by
Tagged with
2 votes
0 answers
2k views

Z-order curve — how to query all nearest neighbors?

TLDR: How to query all nearest neighbors with the least effort? (Iterating over a bigger neighboring area that's continuous and filtering out elements that are not immediate neighbors?) Suppose the ...
sarasvati's user avatar
  • 121
3 votes
0 answers
315 views

Check if a point is touching a user drawn curve in HTML5 canvas

I am having trouble detecting whether a ball is colliding with a red curve. The curve below is an example of what a user may draw on to the canvas. I can't think of any fast ways to detect collision ...
Thomasfb15's user avatar
0 votes
1 answer
336 views

How to calculate rect-moving-in-a-curved-path collision detection

I'm trying to find the best way to use collision detection for a rect moving in a curved path: here is example of what i have I found few methods and I have hard time to find what is the best way. I ...
user3689's user avatar
  • 847
12 votes
1 answer
3k views

How do I make a curved surface out of rectangular blocks?

For a Peggle-like game, I want to make blocks that follow a curve, like this: The blocks would then disappear as the ball hits them. I managed to draw some horizontally, but I'm having trouble ...
Moerin's user avatar
  • 171
1 vote
1 answer
3k views

How do I detect the intersection of a curve with itself?

I'm developing a game in which the player can draw a line. I want to detect if that line intersects with itself. How would I do this?
Dilip Kumar Chaudhary's user avatar
7 votes
3 answers
4k views

Best system for creating a 2d racing track

I am working a 2D racing game and I'm trying to figure out what is the best way to define the track. At the very least, I need to be able to create a closed circuit with any amount of turns at any ...
tesselode's user avatar
  • 777