Visualize full range of movement for characters in turn-based RPG

I’m developing a turn-based RPG where characters can only move so far in a given turn. They all have different stats that affect how fast they can move and there are areas with higher costs of movement than others, so the total distance they can move can vary quite a bit.

I’d like to show the bounds of the range of movement on a given turn if the player wants to move the character, so that they can select a place within the bounds to move the character. I was thinking using a ConstantPath would give the information necessary to do that, but I’m not sure how to visualize it. Is it possible to do something like generate a mesh using the nodes inside the ConstantPath range, or get the positions of the nodes on the perimeter of the ConstantPath area and create a line renderer?

Also, is it possible to check if an object (like a cursor or pointer indicating where the player could move the character) is located inside the ConstantPath area?

It’s good that I visit here from time to time. I also make such a game and I would be interested in how this could be implemented. I did not plan to do this in my project, but if there is a good ready-made solution, then you can think about using it.
When I tested pathfinding, I did something similar to visualize the available nodes. Just created a projector in every available node.

@Derek ) How far have you progressed with your project? What role system are you using?

Hi

There’s an example of this in the PathTypes example scene, as well as in the Turn Based example scene. Both instantiate prefabs over each reachable node.

You can also pass the nodes to the GraphUtilities.GetContours function to get a contour if you want that: GraphUtilities - A* Pathfinding Project

2 Likes

The example in the PathTypes scene is exactly what I was looking for, thank you so much! Apologies for not finding it before, I didn’t realize it was actually drawing a mesh there when I went through all the examples.

It’s a 3D turn-based thing that’s more on the tactical side, I think. I’ve sketched out a good chunk of the battle system mechanics, a lot of my work lately has been getting character movement to work the way I want it to. It’s been slow going but things are starting to get going again. Are you working on a similar game?

Not exactly like that. I will prioritize role-playing elements, meaning character development, social interaction and interaction with the environment will be just as important as combat. The role-playing system is DnD 3.5. View 2.5D. Now it looks like a clone of an old masterpiece with a few changes.
I have already made dialogues, movement, turn-based combat, inventory, introduced a role-playing system, a localization system into different languages, I myself do it in three languages.
In the topic header it is written that you have an RPG, but you still did not answer what kind of role-playing system you use. It’s a secret?