Jump to content

Best way to traverse a "dungeon"


Recommended Posts

Posted
11 minutes ago, Explv said:

https://www.google.com/search?q=shortest+path+algorithm+java

https://www.google.com/search?q=shortest+path+algorithm+java

https://www.google.com/search?q=shortest+path+algorithm+java

 

Create a "graph" connecting rooms to each each other. Each node on the graph is a room, each link is an obstacle e.g. a Gate

When you want to walk from room A to room B, find the shortest path in your graph from room A to room B, then traverse the path.

 

Really didn't want to resolve to this, but Thanks!

Will be fun to mess around it with it. Gonna try Dijkstra

Posted
6 minutes ago, Explv said:

Well it would change something. lever would then be null, seeing as the player cannot reach it???

I'm not sure you understand the original question.

He wants to know how to navigate Draynor Manor Basement without web walking (as web walking does not support it)

Ah i understand, didn't recognize he was looking with specific lever name.

I thought he was just looking for the closest lever, and I figured the closest one wouldn't always be the one reachable.

Posted (edited)
4 minutes ago, HeyImJamie said:

Couldn't you do something like:


if (QuestConfig){
	if (levelName.isReachable()){
		//interact w/ lever
	} else {
		//generate path to lever
		if (obstacleInPath){
			handleObstacle
		} else
			walkThePath
	}
}

Could try using LocalPathFinder to generate the path

Don't think LocalPathFinder accounts for Doors? Think it only generates paths to reachable positions. Might be wrong though

Edited by Explv
Posted
On 1/10/2018 at 10:11 AM, Juggles said:

Shit coder method would be to code by areas and check if in an area and then code which doors to click. 

 

Considering its a specific niche puzzle, this would be the way to solve it. I was under the impression that this was for general application, not specifically for just the Draynor Mansion basement.

Posted
1 minute ago, Alek said:

Considering its a specific niche puzzle, this would be the way to solve it. I was under the impression that this was for general application, not specifically for just the Draynor Mansion basement.

The original question was about general application. 

10 minutes ago, El_Maestro said:

Have you considered standing the in the middle of the room and just monitoring all the objects to get the puzzles state?

For example: I know lever D down opens door and A. I check if its down, if it is then door A is a viable route. Do the same for the rest. From there generating a path shouldn't be hard on your own.

You can "know" the route by checking configs. Each pulled lever changes a config value so you can hardcode the path you want depending on the value. General idea was to make it universal regarding other areas that might need similar functionality.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...