Reputation
3,963
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
11 21
Newest
 Revival
Impact
~118k people reached

  • 0 posts edited
  • 0 helpful flags
  • 346 votes cast
Feb
11
comment Possible A* Optimizations
Does the profiler tell you which lines are slowest?
Feb
9
comment How can I use graph traversal to generate a round region?
I'm curious — why do you want to use cellular automata for this?
Feb
4
comment Backtracking in A Star
The open list is not where you are actually moving. It is where you are considering moving. A human is able to "jump around" when considering possible moves, and A* does that too. If you really want to backtrack then consider the Depth First Search algorithm instead of A*.
Jan
28
awarded  Talkative
Jan
28
answered Simplify paths when a user builds
Jan
4
answered Storing walls that are between tiles
Dec
14
comment Tetris rotation without using arrays
You should use whatever's easiest. This doesn't seem like it's worth optimizing, unless the profiler tells you you're spending a lot of time there. O(n^2) hardly matters when n is 4.
Nov
29
answered Why is 2D light ray collision result getting inverted at specyfic angle
Nov
17
comment How to draw the contour of a hexagon area, like in Civ 5
If you really need to build polylines, each edge endpoint is connected to two more edges. Only one of those two edges is the one you need to follow. There is a hex to your left, a hex to your right, and a hex in front of you. If the hex in front matches the one to the left, you need to follow the edge to the right; otherwise follow the edge to the left.
Oct
30
comment Required number of images for octagonal tiles
While looking for something else unrelated, I found this page that has a visualization of the patterns: jasondavies.com/necklaces ; it shows that once mirrors are taken into account, the number drops from 36 to 30.
Oct
27
revised Required number of images for octagonal tiles
removed redundant sentence
Oct
26
answered Required number of images for octagonal tiles
Oct
16
comment isometric movement
Whatever you end up picking for movement, I recommend doing it in the game world coordinates, not the isometric view. See the diagram on this post. Things are simpler if you do all the game logic in the game world coordinates and then apply isometric only for rendering.
Oct
13
answered How to calculate left/right oriented angle between two 2D vectors?
Oct
11
awarded  Yearling
Oct
10
comment Artificial Intelligence - when to update pathfind?
If you're precalculating for every node, use Floyd-Warshall instead.
Oct
9
answered Why does my A* implementation overflow the stack?
Oct
7
comment Random Placement of Objects on a Tilemap
Some noise functions (including Perlin Noise) will let you generate any portion without generating the whole thing. For storage, you can use a hash table that uses (x,y) as the index. In C++, that could be std::unordered_map<pair<int, int>>. That way, you can store only the parts of the map you generate, and you also get to use negative indices. In practice, you'll probably generate a chunk at a time instead of one tile at a time.
Oct
7
answered Random Placement of Objects on a Tilemap
Oct
4
reviewed Approve Why is it bad to hard-code content?