D
D
dollar2019-07-18 14:21:34
Algorithms
dollar, 2019-07-18 14:21:34

What is the best way to find a path among circles?

- On a flat space there are a huge number of circles of two types:
a) impassable
b) slow down the movement 3 times inside themselves
- Circles are not constant, i.e. may appear or disappear over time (the option with a level designer and manual construction of the graph for A* is no longer needed)
- Circles can intersect.
- Circles have any radius, both small and very large.
- The character represents a dimensionless point.
- All dimensions (coordinates, radii) are real.
How to find an almost optimal path from point A to point B for a specific point in time, consisting of segments (broken line)?

spoiler
5d3065f8052e6757471186.png
spoiler
5d306725c7d17420219801.png
spoiler
5d3067e5d6d5f185264322.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
tsarevfs, 2019-07-18
@dollar

It is easy enough to prove that the paths will lie along common tangents and arcs between tangent points for impassable spheres. You can build a dynamic graph and use A*.
With braking circles it can be more difficult. If they cannot intersect with obstacles, then it is more profitable to bypass them along an arc that is no more than pi/2 (~1.5) longer than the chord.
If they can, then if it is difficult to find an analytical solution, I would add a few points on the boundary of the slow zones to the graph and look for an approximate solution.
About impassable circles: https://redblobgames.github.io/circular-obstacle-p...

S
Slavik KENNY, 2019-07-18
@Slavik_Kenny

- Circles are not constant, i.e. may appear or disappear over time

Are there options that a circle may appear around the character, and he will not be able to move at all?
Or will a group of circles create an impenetrable contour around the character?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question