Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Nodal pathfinding  (Read 1240 times)

Shakkara

  • Bay Watcher
    • View Profile
Nodal pathfinding
« on: April 05, 2009, 03:23:58 pm »

I'm noticing severe framerate problems if  built large U-shaped fortresses, especially if dwarves are in one end and have to go to the other end to go outside, a problem that gets even worse if there are many dead-end rooms in between and if they are required to climb up some stairs to get where they want to go.

It would be awesome if I could just put nodes in my main corridors similar to military control points, and link them together to form a nodal path. Dwarves would see which node is closest to them and their destination and use the path to get to their destination.
Logged

Foa

  • Bay Watcher
  • And I thought foxfire was stylish in winter.
    • View Profile
Re: Nodal pathfinding
« Reply #1 on: April 05, 2009, 04:05:16 pm »

Full Acceptance.

I'm tired of those idiots fucking up.

Example:
'I'll just run around the fort, for 14 Days, and through many forbidden areas, directly next to the chasms, and through forty armies, even though I could wait one hour to get onto said nearby elevator...'
Logged

alfie275

  • Bay Watcher
    • View Profile
Re: Nodal pathfinding
« Reply #2 on: April 05, 2009, 04:17:11 pm »

Also ability to add a lever to be pulled at each node so they can path through complex defenses.
Logged
I do LP of videogames!
See here:
http://www.youtube.com/user/MrAlfie275

Bricks

  • Bay Watcher
  • Because you never need one brick.
    • View Profile
Re: Nodal pathfinding
« Reply #3 on: April 05, 2009, 05:04:42 pm »

It seems like the same could be more or less accomplished with restricted zones, though nodes would sexy.

I think the boroughs in the new version will help a little.
Logged
EMPATHY - being able to feel other peoples' stuff.

Dakk

  • Bay Watcher
  • BLARAGLGLGL!
    • View Profile
Re: Nodal pathfinding
« Reply #4 on: April 05, 2009, 05:09:40 pm »

i think setting high traffic areas can help with that, though the only thing i know (or i think i know) that they do is that it'll make dwarves walk through those areas instead of taking stupid shortcuts through rooms and the like. I think it'll also keep them from standing around clogging the passage.
Logged
Code: [Select]
    ︠     ︡
 ノ          ﺍ
ლ(ಠ益ಠლ)  ┻━┻

Table flipping, singed style.

Foa

  • Bay Watcher
  • And I thought foxfire was stylish in winter.
    • View Profile
Re: Nodal pathfinding
« Reply #5 on: April 05, 2009, 05:21:51 pm »

Also ability to add a lever to be pulled at each node so they can path through complex defenses.
Pull a physical lever to change the invisible waypoint map, created by the omniscient user?
It seems like the same could be more or less accomplished with restricted zones, though nodes would sexy.

I think the boroughs in the new version will help a little.
The nodes are like spheres of influence, and if they are connected, areas of influence.
The areas of influence created by the nodes, and their links acts like gravity between entities, but traffic zones are zones of constant  influence.

So, your entities prefer to be close to the prioritized nodes, and they will branch off to other less prioritized nodes to go to their destination, then you could use the zones to slow down or speed up traffic in a specific area. ( like if your noble goes ballistic, in a high traffic node link )

At the Original Poster:

How about a way to connect the nodes, because they'd just swarm around the nodes.
Logged

Untelligent

  • Bay Watcher
  • I eat flesh!
    • View Profile
Re: Nodal pathfinding
« Reply #6 on: April 05, 2009, 07:24:11 pm »

It seems like the same could be more or less accomplished with restricted zones, though nodes would sexy.

Problem with that is that (I think) a restricted designation just causes the pathfinding to count throught that tile 25 times. Although the dwarf gets to the desired destination faster in terms of game time, it doesn't make the pathfinding faster at all, and might even slow it down considerably.

Better, how 'bout a new "forbidden" designation that dwarves can't pathfind through? I don't think it would be too hard to code, if I'm remembering Toady's pathfinding system correctly.
Logged
The World Without Knifebear — A much safer world indeed.
regardless, the slime shooter will be completed, come hell or high water, which are both entirely plausible setbacks at this point.

LegoLord

  • Bay Watcher
  • Can you see it now?
    • View Profile
Re: Nodal pathfinding
« Reply #7 on: April 05, 2009, 07:39:04 pm »

It seems like the same could be more or less accomplished with restricted zones, though nodes would sexy.

Problem with that is that (I think) a restricted designation just causes the pathfinding to count throught that tile 25 times. Although the dwarf gets to the desired destination faster in terms of game time, it doesn't make the pathfinding faster at all, and might even slow it down considerably.
I thought that the tile was counted as 25 tiles, not counted 25 times.
Logged
"Oh look there is a dragon my clothes might burn let me take them off and only wear steel plate."
And this is how tinned food was invented.
Alternately: The Brick Testament. It's a really fun look at what the bible would look like if interpreted literally. With Legos.
Just so I remember

irmo

  • Bay Watcher
    • View Profile
Re: Nodal pathfinding
« Reply #8 on: April 05, 2009, 07:40:15 pm »

Better, how 'bout a new "forbidden" designation that dwarves can't pathfind through? I don't think it would be too hard to code, if I'm remembering Toady's pathfinding system correctly.

You mean a WALL?
Logged

Untelligent

  • Bay Watcher
  • I eat flesh!
    • View Profile
Re: Nodal pathfinding
« Reply #9 on: April 05, 2009, 07:52:33 pm »

It seems like the same could be more or less accomplished with restricted zones, though nodes would sexy.

Problem with that is that (I think) a restricted designation just causes the pathfinding to count throught that tile 25 times. Although the dwarf gets to the desired destination faster in terms of game time, it doesn't make the pathfinding faster at all, and might even slow it down considerably.
I thought that the tile was counted as 25 tiles, not counted 25 times.

That may be, but I think it's been confirmed that high (low number) traffic designations help the game run faster (and the other way around, too). If you have a link to a topic where it was confirmed that traffic had no effect on FPS, show it to me so I can stop preaching what may be complete nonsense. I don't like it when I preach complete nonsense. =(

You mean a WALL?

Yes, exactly like a wall. This just proves my point, that it should be fairly easy to code.
Logged
The World Without Knifebear — A much safer world indeed.
regardless, the slime shooter will be completed, come hell or high water, which are both entirely plausible setbacks at this point.

Heron TSG

  • Bay Watcher
  • The Seal Goddess
    • View Profile
Re: Nodal pathfinding
« Reply #10 on: April 05, 2009, 07:52:48 pm »

Also ability to add a lever to be pulled at each node so they can path through complex defenses.
Pull a physical lever to change the invisible waypoint map, created by the omniscient user?

not necessarily. the lever could let them move through an airlock-type complex maze, bypassing the labyrinth other creatures without thumbs must cross.
Logged

Est Sularus Oth Mithas
The Artist Formerly Known as Barbarossa TSG

LegoLord

  • Bay Watcher
  • Can you see it now?
    • View Profile
Re: Nodal pathfinding
« Reply #11 on: April 05, 2009, 07:58:34 pm »

There was a thread in general discussion, "Major FPS improvement, Over 2x!!" (or something to that effect), in which that was brought up and what I said was one of the things concluded on it before I started ignoring the thread.

At least that's what I understood of it.  Half of the things on there, I didn't have the faintest inkling what they were about.

I can look for the thread later; right now I have succession game to do.
Logged
"Oh look there is a dragon my clothes might burn let me take them off and only wear steel plate."
And this is how tinned food was invented.
Alternately: The Brick Testament. It's a really fun look at what the bible would look like if interpreted literally. With Legos.
Just so I remember

Draco18s

  • Bay Watcher
    • View Profile
Re: Nodal pathfinding
« Reply #12 on: April 05, 2009, 11:37:26 pm »

You mean a WALL?

Yes, exactly like a wall. This just proves my point, that it should be fairly easy to code.

b-C-w
Logged

irmo

  • Bay Watcher
    • View Profile
Re: Nodal pathfinding
« Reply #13 on: April 06, 2009, 10:05:44 am »

Yes, exactly like a wall. This just proves my point, that it should be fairly easy to code.

We already have walls.
Logged

alfie275

  • Bay Watcher
    • View Profile
Re: Nodal pathfinding
« Reply #14 on: April 06, 2009, 12:11:16 pm »

No I meant just telling them they need to pull the lever to get from on node to the other, if there is a drawbridge for example.
Logged
I do LP of videogames!
See here:
http://www.youtube.com/user/MrAlfie275
Pages: [1] 2