Nathaniel3W
Rockwell Studios
Lance Treiber does UE5 no longer have decals? Could you not turn a hex-shaped decal on and off when you select a character?
No, a decal would've been easy. It's just an artistic decision, I feel strongly against the cursor distorting itself on the ground. It's a cursor, it shouldn't do that.Lance Treiber does UE5 no longer have decals? Could you not turn a hex-shaped decal on and off when you select a character?
Yes, checking for distance between Next hex and Goal hex is the "heuristic" part of A*.Lance Treiber when evaluating each hex, you should calculate the actual straight-line distance from that hex to the destination and use that to determine the preferred hex. I think a hex 2 spaces away by zig-zag should be slight closer than a hex 2 spaces away in a straight line.
Sorry if I am teaching you to suck eggs but....in the cost function couldnt you simply override to use euclidean distance, so the for the evaluation of diagonal nodes its using the physical distance (which of course is greater), not equal grid distance.Yes, checking for distance between Next hex and Goal hex is the "heuristic" part of A*.Lance Treiber when evaluating each hex, you should calculate the actual straight-line distance from that hex to the destination and use that to determine the preferred hex. I think a hex 2 spaces away by zig-zag should be slight closer than a hex 2 spaces away in a straight line.
What I didn't show on the screen when the ugly path happens is that the Goal is hidden behind the wall:
So naturally the path is being drawn towards that coordinate in this particular case, due to the heuristic.
It's this particular case that's annoying. In most other cases, the zig-zagging occurs, which I like.
The hex layout:
Already using euclidean. Because of that, it prefers the path that it prefers, since those points (the ones on the arrow-like shape) are closer to the goal hex in the world.in the cost function couldnt you simply override to use euclidean distance
Maybe something is messed up when you generate the nav mesh, or somewhere. Because as a proof, you can do a print out of the cumulative distances, positions of all the centre points of the actual closest path and then the distances, positions of centre points of that calculated path, and you could demonstrate they are not equal.Already using euclidean. Because of that, it prefers the path that it prefers, since those points (the ones on the arrow-like shape) are closer to the goal hex in the world.in the cost function couldnt you simply override to use euclidean distance
Ah, you want to use cumulative distances as a way of reconstructing the path, instead of move cost.Because as a proof, you can do a print out of the cumulative distances
when you are calculating the cost of moving to the adjacent tile, you do that either clockwise or counterclockwise starting from the same coordinate in relation to the agent, right? (if you are saving the full path)Never worked with pathfinding before. Implemented A*.
Okay:
Same cost, but ugly:
Ugh.
In certain situations, ugly paths come up sometimes. Not a lot, but it happens.
String pulling algo would work on a navmesh, but in hexes I don't see how. Unless we recalculate a lot, lot, lot.
Checkboard neighbor order hack also doesn't seem doable, because hexes aren't like square grid where going up or right is same move cost when you're going North-East. In Hexes, there's always one hex better than another for heuristics.
Leaving it like this for the moment. Now got to make the character actually run on the hexes.
This website is amazing, by the way https://www.redblobgames.com/pathfinding/a-star/introduction.html
Synced hex size, man size, man speed. The animation is not quite right (needs larger paces). Everything is too smooth. Feels weird and off.
Point being that it's inauthentic?Isn't the Fallout one based on sprites?
Synced hex size, man size, man speed. The animation is not quite right (needs larger paces). Everything is too smooth. Feels weird and off.
It is bad. Each of the "Tiles" are a uniform size meaning you can just use simple position values instead of individual objects. You'd only ever draw the objects for debug.When I think of making an RPG with tiles, I think of having like 1000 game objects each representing individual tiles, and that seems bad.
Even ticking 1000 tiles isnt so bad if they arent doing much.So long as the tile isn't being ticked, I don't see why having it there would be any problem. If it's not even being drawn, then the only downside is file size and loading time. After that, having it sit there doesn't cost you anything.
I have this problem with programing, I feel like if we have 1000 objects, it's already too much and things will take longer to run. I keep forgetting I'm not working on a MSX anymore.Why would 1000 tiles be bad?