Jump to content

Best way to traverse a "dungeon"


Butters

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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