Zakwayda said:
Did the graphics come with any metadata that could be used for this? It seems like a graphics pack of this sort would include such metadata, as otherwise it could be difficult to use effectively.
What do you mean by 'graphing' and 'pretend 8x8 tiles' exactly? Maybe it's clear from context what you mean, but some clarification might help.
Just based on the image, it looks like the paths might be comprised only of axis-aligned line segments and quarter circles. If you don't have any metadata available, you could probably create such data yourself by identifying node positions and constructing paths manually and/or procedurally.
Hello,
I don't see any metadata for it. It looks like they have Unity stuff in it, which probably has something (AI folder). I'm doing this in C++ using SFML. What I mean by graphing is creating zones where they follow the nodes laid out along the path and make the node the width and height of the road. I can''t recall off the top of my head what that concept is called, but I briefly was reading about it back when I was learning A*. It was some type of zoning behavior.
What I mean by "pretend 8x8 (or whatever size)" is setting it up with tile data behind it (for this example 8x8) and setting the tiles around the border of the road "solid" and create a zone so the A* only reads within the road. The reason I said 8x8, is I assumed it would be easier to have smaller tiles to be able to get closer to the roads (since they curve).
I could manually put "directions" in, but not all the maps have the same pattern and the maps all come with single image objects to create your own if you wish too. It looks like they have some Tiled examples, which I briefly looked at and that's what gave me the idea of putting collision tiles around the road.
EDIT: I just made a fast example, but hopefully this gives a better idea. The red would be tiles (nodes, whatever the best size is), which would zone off and keep the pathfinding to the road. The enemies spawn on the green, A* is performed, and it goes to the orange circle where it decides to go left or right and continues A*. Ignore the fact that these are obviously random sizes and visualize them all the same.
PS: I realized I accidentally made a collision box green, that would be red as well haha. Thanks