Reputation
3,743
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
9 20
Newest
 Necromancer
Impact
~99k people reached

  • 0 posts edited
  • 0 helpful flags
  • 321 votes cast
19h
comment Special Pathfinding Algorithm
In your situation all the paths are the same length (6); that's part of why A* is overkill here. No path is shorter than any other. If you're using a graph search like Breadth First Search, to get a random path, you can either randomize the order of the neighbors function or randomly choose from the queue instead of always choosing the leftmost element of the queue.
2d
answered Special Pathfinding Algorithm
Aug
8
awarded  Necromancer
Jul
21
answered How can I improve the efficiency of my procedural terrain generation and smoothing?
Jul
16
comment Efficient parsing of text file to map
Best approach I've found for reading map files is to do the simplest thing at the beginning, and then revisit it later. A huge switch statement is fine. The engineering tradeoffs (especially with performance) aren't always apparent until I get farther into the project.
Jul
6
answered Finding the “Important” nodes of a grid path
Jul
4
comment Line of sight on a 2d grid
Here's a demo: redblobgames.com/grids/line-drawing.html
Jun
22
comment Diagonal movement behaving strangely when other key is pressed
Many keyboards can handle only some simultaneous key presses. I believe shift, ctrl, alt are more likely to work with other keys than space, but I am not certain. Also see en.wikipedia.org/wiki/Rollover_(key)
Jun
15
comment Short distances from reference point
I agree with Ali.S — BFS will work well here. It's simple and fast. It also works if you have multiple reference points (see demo), which is handy for figuring out which reference point is closest to where you are.
Jun
10
awarded  Civic Duty
Jun
6
comment Map coordinates system
I've written a little bit about hex coordinates here.
Apr
9
awarded  Nice Answer
Mar
20
comment A* pathfinding for grid with direction-dependent nodes?
Yes. A* considers whether you can move from A to B separately from whether you can move from B to A. You can have one or the other or both or neither. It also considers the cost of moving from A to B separately from the cost of moving from B to A, so climbing up could be slower than climbing down.
Mar
14
comment How to select random points within grid meeting min/max distance requirements from each other?
I'm guessing poisson discs will be useful for this. You can use a quad tree or sorted range data structure to help find the closest point to your new proposed point. Jason Davies has a demo of an efficient algorithm but it only handles M and not your L condition. Still might be a good starting point.
Mar
7
answered Estimate the time it takes for an object to travel from point A to point B
Mar
1
answered Finding neighboring coordinates on offset tile map
Feb
21
answered How to get more gentle (cloud like) noise?
Feb
17
comment Optimization of A* in Python
200 000 times per second is quite unusual. Can you describe more what you are trying to do here?
Feb
16
awarded  Revival
Feb
15
answered How to find all the possible places to go on a grid?