• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Very simple path finding system?

Not open for further replies.
Level 15
Aug 7, 2013

Is there any system/library which does rect to rect path finding? That is, it finds a path from rect A to a location in rect B. But it is not truly a path in the traditional sense--I put an image below to explain.

In this image, suppose that each big square/box is its own disjoint rect (physically disjoint and also walkability wise too). The tiny little boxes in each rect are "teleports" that allow one to enter the rect of that color.

Thus to get from the black box to the green box, you need to simply travel to the tiny green box in the black box.

To get from the Red box to the black box, first go to the green box (via the tiny green box), then go to the tiny black box inside the green box, and voila, inside the black box.

(blue line indicates where to go)

Note I am not using waygates (rather arbitrary teleporters).

So basically my function would take as input the player's current rect, and then output which teleport they need to take incrementally.

So how would I do this? I would like to create this system without using arbitrary notions of reachablity, i.e. I should not have to stipulate somewhere that

(blackBox --> greenBox)

(greenBox --> blackBox or redBox)

(redBox --> greenBox).

Otherwise I'd then have to *arbitrarily* come up with each box, and *arbitrarily* define the relation between each one (i.e. whether it exists). And then do my favorite search.

Or is there no other solution?
Not open for further replies.