2
votes
Accepted
How to find words on a hex grid
I once wrote a word finder that worked with a precomputed list. Basically each letter knows which next letter is valid. You can exit the search if there is no valid letter anymore. A flag indicated ...
2
votes
Determine if a triangle is on the screen
There are three kinds of positional relationship between two plane figures: disjoint, one inside the other, partial intersection. You need to check for partial intersection and one inside the other.
...
1
vote
Accepted
Find closest open space in grid of rectangles?
I did some tests and found that this method does work.
First you need to find the nearest grid coordinates to the position of the dragged block (blue box). Then do a grid-based BFS on the target ...
1
vote
Accepted
Determine if a static mesh is lit by directional light
Here's a wild solution:
Step.1
backup your scene.
Step.2
Gives all meshes in the scene a new material, it will just return the set color. the shader just like:
...
1
vote
How to find words on a hex grid
You can do this with a series of depth-first searches, starting from each cell.
Your starting cell's letter forms the initial word prefix. In each iteration, you check if some word in your dictionary ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
algorithm × 1116path-finding × 136
mathematics × 127
2d × 87
ai × 87
procedural-generation × 84
c# × 74
c++ × 69
unity × 67
java × 63
game-design × 58
collision-detection × 55
3d × 50
random × 49
geometry × 46
grid × 41
physics × 36
xna × 31
javascript × 31
maps × 31
game-mechanics × 28
tilemap × 26
tiles × 25
terrain × 25
data-structure × 25