[mod] New Pathfinder [wip][pathfinder]

zorman2000
Member
 
Posts: 83
Joined: Tue Jul 26, 2016 18:18
GitHub: hkzorman
In-game: zorman2000

Re: [mod] New Pathfinder [wip][pathfinder]

by zorman2000 » Tue Jun 13, 2017 00:22

EDIT: Nevermind! I found out why. Turns out the original walkable() function returned false when actually walkable instead of true. When I replaced it with my function, it was returning true when node had walkable = false. Can find paths now! Will keep testing!
Also, Sokomine, you gave me idea with the snow. Plotmarkers have to be walkable=false in order for it to find paths to/from it! Thank you!

Sokomine wrote:I don't think that the pathfinder can handle slabs or other nodebox-like nodes. It does seem to have no trouble with stairs, but then it might just consider jumping to be an option. When trying to get paths for the mobs to leave their beds and go outside (dry-run only), snow turned out to be an obstacle which made it impossible to get a path. As the new, higher snow also makes it impossible to enter houses as a player in some situations, I changed the snow node's definition so that it presents no obstacle to anyone:
Code: Select all
minetest.override_item("default:snow", {walkable=false})


Some of my houses contain nodes that are very thin. Depending on param2, the very same node might either be floor, ceiling or a wall. Players can figure out where to walk, but for the pathfinding algorithm it's just a solid node, blocking movement in all directions.


I did change the definition of what walkable nodes are. I'm looking to get the list of nodes from a position to another, even if that means going through doors. To that end, I replaced the "walkable()" function in burli's pathfinder with this:

Code: Select all
local function walkable(node, exceptions)
   local exceptions = exceptions or {}
  local is_openable = false
  for _,node_prefix in pairs(pathfinder.nodes.openable_prefix) do
    local start_i,end_i = string.find(node.name, node_prefix)
    if start_i ~= nil then
      is_openable = true
      break
    end
  end
  if node ~= nil and node.name ~= nil and not minetest.registered_nodes[node.name].walkable then
    return true
  elseif is_openable then
    return true
  else
    for i = 1, #exceptions do
      if node.name == exceptions[i] then
        return true
      end
    end
    return false
  end
end


However, this still doesn't works. I get one-node paths. Here is an example:

Image

I'm trying to find the path from the door to the stone-like node (the one I'm pointing to in Minetest, which is the plotmarker for that plot). I start from the door node, as I have already scanned it and know its position (actually starting from the bottom pos of the door). The end node is the plotmarker. However, it doesn't work. On the left side you can see the path it is "finding", and it is only the start node. I tried also changing the nodebox to be flat instead of 2/16 and that still doesn't works. I also changed the node to be walkable = false, but still same thing.

Any ideas?
Attachments
Screenshot_2017-06-12_20-09-30.png
(401.01 KiB) Not downloaded yet
 

Sokomine
Member
 
Posts: 3874
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [mod] New Pathfinder [wip][pathfinder]

by Sokomine » Tue Jun 13, 2017 01:22

zorman2000 wrote:Plotmarkers have to be walkable=false in order for it to find paths to/from it!

Oh. You're right with that. I've plotted paths to the center of the front side of the house and not to the plotmarker. handle_schematics has a function for that now: handle_schematics.get_pos_in_front_of_house( bpos ) with bpos beeing the data about the plot (i.e. containing bpos.o and bpos.bsizex etc.)

zorman2000 wrote:However, this still doesn't works. I get one-node paths.

That can still happen in some rare situations when the pathfinder fails. Most of the time the path will be empty, but sometimes it's just a single position.

Please try this version of the walkable function. It works in many situations. The mob_door_handling table is currently defined in my fork of npcf, which you can find on github. Door handling is treated in npcf/mob_door_handling.lua.
Code: Select all
local function walkable(node)
        if( mob_door_handling ) then
                return mob_door_handling.walkable( node );
        end
        return minetest.registered_nodes[node.name].walkable
end


It's not ideal that the handling of doors is mixed up with npcf. It is far more general and of intrest to all npc-like mobs. Handling of beds is currently part of mobf_trader - not ideal either. Perhaps I ought to create a new mod, something like mob_world_interaction
A list of my mods can be found here.
 

zorman2000
Member
 
Posts: 83
Joined: Tue Jul 26, 2016 18:18
GitHub: hkzorman
In-game: zorman2000

Re: [mod] New Pathfinder [wip][pathfinder]

by zorman2000 » Tue Jun 13, 2017 01:35

Sokomine wrote:Oh. You're right with that. I've plotted paths to the center of the front side of the house and not to the plotmarker. handle_schematics has a function for that now: handle_schematics.get_pos_in_front_of_house( bpos ) with bpos beeing the data about the plot (i.e. containing bpos.o and bpos.bsizex etc.)


Great! I will try to check this function as well.
I have functions to find the node just inside and node just outside door right now, but I will be checking this.
Also, it would be great if the entrance would be defined for every schematic. I do scans and most of the time find the correct node for the door, but sometimes I don't.

Sokomine wrote:Please try this version of the walkable function. It works in many situations. The mob_door_handling table is currently defined in my fork of npcf, which you can find on github. Door handling is treated in npcf/mob_door_handling.lua.
Code: Select all
local function walkable(node)
        if( mob_door_handling ) then
                return mob_door_handling.walkable( node );
        end
        return minetest.registered_nodes[node.name].walkable
end


Will try it! Thanks!
I have actually made it work with everything right now in the medieval villages - except the huts which have second floor, for which you use flat_wood as ceiling. I'm thinking of doing exceptions for these and treat them as walkable, to see if that is good enough.

Sokomine wrote:It's not ideal that the handling of doors is mixed up with npcf. It is far more general and of intrest to all npc-like mobs. Handling of beds is currently part of mobf_trader - not ideal either. Perhaps I ought to create a new mod, something like mob_world_interaction


You are right, it would be good to have a separate mod for all this. I intend my mod (advanced_npc) to be part of a modpack, so all the functions (dialogues, trading, places, actions, etc.) I have worked on can be used by other mods as well.
 

Sokomine
Member
 
Posts: 3874
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [mod] New Pathfinder [wip][pathfinder]

by Sokomine » Tue Jun 13, 2017 01:59

zorman2000 wrote:Also, it would be great if the entrance would be defined for every schematic. I do scans and most of the time find the correct node for the door, but sometimes I don't.

I'm aware of how intresting the entrance of a building is for this purpose here. However, I cannot guarantee that there will always be one. People can add their own houses, and those may follow a pattern - or not. I've used the following algorithm to test for front doors for now: The npc sleeps in a beds. Find a position next to the bed where it can stand. Find the central position in front of the house. Let the pathfinder plot a path from position next to bed to position in front of house. Iterate through the array the pathfinder returns and check for doors. The last door found will be the entrance.

zorman2000 wrote:I have actually made it work with everything right now in the medieval villages - except the huts which have second floor, for which you use flat_wood as ceiling. I'm thinking of doing exceptions for these and treat them as walkable, to see if that is good enough.

The huts are...not ideal for mobs. I'm afraid I'll either have to rebuild them or write code that takes param2 into account.

zorman2000 wrote:You are right, it would be good to have a separate mod for all this. I intend my mod (advanced_npc) to be part of a modpack, so all the functions (dialogues, trading, places, actions, etc.) I have worked on can be used by other mods as well.

For reusability it doesn't matter too much if it's a modpack or seperate files or any other good structure. Just make sure not to needlessly use local for things others might be intrested in using. minetest_game is very restrictive in that regard - which is very annoying. It would have saved me considerable time if I could have accessed the various tables in the doors mod instead of having to iterate over all the registered nodes and comparing them with string.sub.
A list of my mods can be found here.
 

User avatar
burli
Member
 
Posts: 1641
Joined: Fri Apr 10, 2015 13:18

Re: [mod] New Pathfinder [wip][pathfinder]

by burli » Tue Jun 13, 2017 05:31

I have a more advanced version of the PF on my disk. It can jump without stucking under obstacles and can find a target standing on a slab.

Will upload it soon, but it has an annoying little bug I didn't found yet
 

Sokomine
Member
 
Posts: 3874
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [mod] New Pathfinder [wip][pathfinder]

by Sokomine » Tue Jun 13, 2017 18:13

burli wrote:I have a more advanced version of the PF on my disk. It can jump without stucking under obstacles and can find a target standing on a slab.

That sounds very fine :-) My latest attempts have been trying to get the pathfinder navigate through climbable nodes. For that purpose I didn't count those nodes when max jump height or max fall height are calculated. It might be necessary to insert extra steps into the path so that a mob following the path will know that he has to go up or down. Havn't checked if that's done already. Perhaps - for this particular purpose here - it might be good to store information like doors, gates, ladders etc. found on the path. That way the mob doesn't have to look for them manually, and front door calculation will get slightly easier.

burli wrote:Will upload it soon, but it has an annoying little bug I didn't found yet

Hope you'll find it soon and be able to eliminiate it. Your pathfinder is already a great help when teaching mobs how to walk around.

Handling of those tiny 1/16 slabs I love to build walls, floors and ceilings from would also be great. Maybe I'll try to integrate that if I have enough time.

Would it be ok for you if I put your pathfinder in a mob_world_interaction mod released under GPLv3? It'd be a bit easier that way then telling users to get your pathfinder and do some very tiny modifications for the door handling.
A list of my mods can be found here.
 

User avatar
burli
Member
 
Posts: 1641
Joined: Fri Apr 10, 2015 13:18

Re: [mod] New Pathfinder [wip][pathfinder]

by burli » Tue Jun 13, 2017 19:08

I pushed the updated version. There is a bug when cutting an edge. Before cutting the first edge the path is diagonal, after the path passes the first edge the path goes zigzag. Not sure why

Feel free to use it. I'll put it on DWTFPL licence
 

User avatar
azekill_DIABLO
Member
 
Posts: 7489
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

Sokomine
Member
 
Posts: 3874
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [mod] New Pathfinder [wip][pathfinder]

by Sokomine » Thu Jun 15, 2017 18:31

burli wrote:I pushed the updated version. There is a bug when cutting an edge. Before cutting the first edge the path is diagonal, after the path passes the first edge the path goes zigzag. Not sure why

Hm. As long as it plots a path...It seems to generate a slightly diffrent one though. For testing, I've switched back to the old version.

burli wrote:Feel free to use it. I'll put it on DWTFPL licence

Thank you!

I'm currently trying to teach the pathfinder to interact with slabs placed on ground and ceiling. Slabs up to 2/16 thinkness pose no obstacle to a player if one such slab acts as a floor and the other as a ceiling. For the pathfinder there would be no path through such nodes - while the player can move through. There are situations where nodebox-like blocks lead to even far more complicated physics Dealing with those thin slabs might be necessary for navigation inside some of my houses. I wonder if the pathfinder can be extended? Identifying potential slab-like nodes that will allow the player to pass through can be done easily (already wrote that part), and param2 is available when checking. I'm just not always sure (inside the pathfinding algorithm) if the block that's checked for walkable is at the head- or the foot position of the mob and weather that can be told by the algorithm in all situations.
A list of my mods can be found here.
 

leo_rockway
Member
 
Posts: 196
Joined: Tue Jul 31, 2012 20:37

Re: [mod] New Pathfinder [wip][pathfinder]

by leo_rockway » Fri Jun 30, 2017 03:22

I just wanted to leave a quick comment to say that while the Minetest pathfinder freezes the game for me (I can't open or close doors, I can't interact with formspecs, I can't pick up items, etc), this pathfinder doesn't. I'm liking this pathfinder quite a bit just for that. It also allows mobs to walk through doors, which default pathfinder doesn't seem to be good at.
 

User avatar
Wuzzy
Member
 
Posts: 3616
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: [mod] New Pathfinder [wip][pathfinder]

by Wuzzy » Fri Jun 30, 2017 09:36

… and another mod which only exists because a core Minetest feature is broken. :-(

Is such a pathfinding algorithm out there?

Yes. It's A*. This is generally the recommended algorithm for pathfinding.

Other features I wish from a pathfinder for Minetest:

Cost
What I mean with that is, that each node type gets a cost value which is 1 by default. Currently, all nodes are treated equally, only the distance matters.
Passing through a node has a cost of 1, normally. I propose to alter this cost for each node type. The cost will then be added to the full distance. E.g. for a node with cost 1, the distance passed through the node will be unchanged. But with a node with cost 7, the distance will be multiplied with 7. For calculating the best path, it's no longer the shortest distance which counts, but the path with the lowest cost.
By default, non-walkable nodes have a cost of 1 and walkable nodes have a cost of -1. A cost of -1 means the node will never be passed and it is considered an obstacle.

To keep it simple for now, only consider the node directly above the node on which the entity will stand and ignore the rest. Because this is tricky enough. Later, this may be extended to consider multiple nodes. This is still important because players are larger than 1 node.

Use cases:
- Give water a higher cost because of reduced movement speed
- Give lava a cost of -1 to avoid finding paths through lava altogehter
- Use this to mark nodeboxes as passable (1) or not (-1). Useful for doors.

Maybe the cost could even be added to the node definition itself. I'm not sure about this, however.

Cost, part 2
The previous cost suggestion only considered the nodes through which the entity must walk *through*, i.e. non-walkable nodes. What might also need consideration considered is the floor on which the entity will stand.
This is another cost which can be added on top of the previous cost.
By default, all walkable, climbable and liquid nodes have a cost of 1 while non-walkable non-climbable non-liquid nodes have a cost of -1 (because you can't stand on them).

Use cases:
- Set cost to 3 for a floor which makes the player walk slower than usual
- Set cost to -1 for a floor which hurts the player when stepping on it


Other considerations for pathfinders
- The pathfinder must know that you can't jump from nodes with the disable_jump=1 group
- You can move up and down freely on climbable nodes
- Liquids should be treated like climbable nodes
- A pathfinder should be completely unaware of the underlying thing which wants to find a path. Instead just tell it the requirements by hand. I don't like the strong coupling with Mobs Redo. Just let the user specify the max. drop height, etc. manually
- But optional (!) convenience functions are OK
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

User avatar
burli
Member
 
Posts: 1641
Joined: Fri Apr 10, 2015 13:18

Re: [mod] New Pathfinder [wip][pathfinder]

by burli » Fri Jun 30, 2017 11:09

The default cost to walk straight over a node is 10, if you walk diagonally it is 14. I also add a cost for jumping and falling. Mobs can walk around an obstacle even if the direct way is shorter.

For nodes like water you hat to increase the cost, e.g. double for water and much more for lava.

A* doesn't know negative costs (afaik)
 

User avatar
Wuzzy
Member
 
Posts: 3616
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: [mod] New Pathfinder [wip][pathfinder]

by Wuzzy » Fri Jun 30, 2017 16:35

Oh, the “-1” is just a special value which means the node should be treated as an obstacle and the pathfinder does not need to bother to even attempt to find a way through it. It must not be used in any calculation. This could maybe be implemented in another way if you insist. It does not matter. What's important that there is at least some way to distinguish between obstacles and non-obstacles.

The default cost to walk straight over a node is 10, if you walk diagonally it is 14.

Sounds OK, but shouldn't the diagonal cost be closer to math.sqrt(2)*10?

Otherwise, this sounds sensible to me. In this case, my cost proposal can be applied as a multiplier to the “normal” cost.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

leo_rockway
Member
 
Posts: 196
Joined: Tue Jul 31, 2012 20:37

Re: [mod] New Pathfinder [wip][pathfinder]

by leo_rockway » Fri Jun 30, 2017 18:28

Wuzzy wrote:- A pathfinder should be completely unaware of the underlying thing which wants to find a path. Instead just tell it the requirements by hand. I don't like the strong coupling with Mobs Redo. Just let the user specify the max. drop height, etc. manually

I like this, because right now a mob like MC's spiders use this pathfinder that returns a path that's not useful for it (because it doesn't conform to the specifications of what the mob should look like). I believe the same is true for enderman-like mobs (taller than the norm).
 

User avatar
burli
Member
 
Posts: 1641
Joined: Fri Apr 10, 2015 13:18

Re: [mod] New Pathfinder [wip][pathfinder]

by burli » Fri Jun 30, 2017 18:58

Taller mobs are handled by my pathfinder, but the base must be 1x1. To get paths for wider mobs you need to use clearance to the next obstacle
 

Sokomine
Member
 
Posts: 3874
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [mod] New Pathfinder [wip][pathfinder]

by Sokomine » Fri Jun 30, 2017 22:49

leo_rockway wrote:I just wanted to leave a quick comment to say that while the Minetest pathfinder freezes the game for me (I can't open or close doors, I can't interact with formspecs, I can't pick up items, etc), this pathfinder doesn't. I'm liking this pathfinder quite a bit just for that. It also allows mobs to walk through doors, which default pathfinder doesn't seem to be good at.

That sounds odd. The pathfinder in MT ought to be good enough for most situations - at least for those where a mob wants to follow/hunt a player. Those paths do require constant adjustment. In theory burlis implementation ought to be slower than the one directly in the engine - not due to the algorithm but due to the overhead of using the lua api.

Wuzzy wrote:- Give water a higher cost because of reduced movement speed
- Give lava a cost of -1 to avoid finding paths through lava altogehter
- Use this to mark nodeboxes as passable (1) or not (-1). Useful for doors.

Sounds like a good idea. But please don't treat doors that way. They're already covered. A path using doors could of course be considered slightly more expensive than a path without doors (walking around), but that ought to be a rather small factor. Better don't count it at all.

Wuzzy wrote:- Set cost to 3 for a floor which makes the player walk slower than usual
- Set cost to -1 for a floor which hurts the player when stepping on it

Sounds good as well.

Wuzzy wrote:- The pathfinder must know that you can't jump from nodes with the disable_jump=1 group

Currently not covered as those nodes are rare. Didn't think of them yet. But you're right. It's a point that needs to be taken into consideration.

Wuzzy wrote:- You can move up and down freely on climbable nodes

I hope I've covered that part in my small modification of burlis algorithm. Still, the mob that follows the path needs to know what to do. The mobs have no idea yet how to use ladders. Thus, a path may work in one direction ("fall" down the ladder without getting damage or fearing the height), but not in reverse (Ladders? What are those good for? Can you eat it? Or stare at it all day?).

Wuzzy wrote: A pathfinder should be completely unaware of the underlying thing which wants to find a path. Instead just tell it the requirements by hand. I don't like the strong coupling with Mobs Redo. Just let the user specify the max. drop height, etc. manually

That's not really a problem. The height of the mob, its jump- and fall capabilities can be supplied as a table. That table doesn't have to be a mobs_redo entity. It can be customly constructed as I did when using the pathfinder for npcf.

Another aspect are benches, tables, beds and the like. Moving above them in upright position seldom works. When trying to find a position to stand next to the bed, I assume that the mob is able to glide/climb through these nodes as would happen in reality. The pathfinder still does not consider those nodes as "mob can get through" because the mob will - when following the path - use the normal MT physics and collusion mechanism.

The current version of mob_world_interaction is modified so that it can work on the data handle_schematics read from the .mts (or .we) file.
A list of my mods can be found here.
 

leo_rockway
Member
 
Posts: 196
Joined: Tue Jul 31, 2012 20:37

Re: [mod] New Pathfinder [wip][pathfinder]

by leo_rockway » Sun Jul 02, 2017 01:27

Sokomine wrote:
leo_rockway wrote:I just wanted to leave a quick comment to say that while the Minetest pathfinder freezes the game for me (I can't open or close doors, I can't interact with formspecs, I can't pick up items, etc), this pathfinder doesn't. I'm liking this pathfinder quite a bit just for that. It also allows mobs to walk through doors, which default pathfinder doesn't seem to be good at.

That sounds odd. The pathfinder in MT ought to be good enough for most situations - at least for those where a mob wants to follow/hunt a player. Those paths do require constant adjustment. In theory burlis implementation ought to be slower than the one directly in the engine - not due to the algorithm but due to the overhead of using the lua api.

A pathfinder in Lua ought to be slower, that's for sure. However, for some reason Minetest's pathfinder seems to be blocking any other interaction until it's done doing its thing, and my laptop is 7 years old so sometimes it fails to calculate pathfinder for a while. That means I can't move inventory, use doors, chests, furnaces, pick up items (I use the drop item mod), etc until pathfinder finishes. The pathfinder on this thread doesn't block anything for me. It seems to slow the game down a bit, though (I see animals moving forward, then they are teleported backwards, for instance). I do get plenty of timeouts from this mod too, as output in my terminal.
 

User avatar
burli
Member
 
Posts: 1641
Joined: Fri Apr 10, 2015 13:18

Re: [mod] New Pathfinder [wip][pathfinder]

by burli » Sun Jul 02, 2017 06:31

The timeouts are intended to prevent too much lag

@Sokominre: the builtin pathfinder isn't good enough for anything. Look at this video and notice the torches appearing in the background

https://youtu.be/OUsW2M85oYg
 

User avatar
azekill_DIABLO
Member
 
Posts: 7489
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

leo_rockway
Member
 
Posts: 196
Joined: Tue Jul 31, 2012 20:37

Re: [mod] New Pathfinder [wip][pathfinder]

by leo_rockway » Mon Jul 03, 2017 03:21

burli wrote:The timeouts are intended to prevent too much lag

Yup and it makes perfect sense.
 

User avatar
burli
Member
 
Posts: 1641
Joined: Fri Apr 10, 2015 13:18

Re: [mod] New Pathfinder [wip][pathfinder]

by burli » Fri Dec 01, 2017 15:14

I continued my pathfinder. I was able to fix a bug, but this makes the algorithm a bit slower. But I don't care because a C++ implementation would still be fast enough.

Also I was able to detect if a door is open or closed. If a door is open I can find a path through it, if the door is closed no path could be found.

Again, because some people ask for: it is not the job of a pathfinder to find or interact with doors or other nodes. He should just find a path.

Will upload a video soon
https://youtu.be/bPQho87uMh4
 

User avatar
burli
Member
 
Posts: 1641
Joined: Fri Apr 10, 2015 13:18

Re: [mod] New Pathfinder [wip][pathfinder]

by burli » Fri Dec 01, 2017 15:42

burli wrote:I think, doors should be ignored by the pathfinder. The path should be generated through the door, even if it is closed. The mob has to handle the door by itself. Anything else doesn't make sense.

The reason I changed my decision is, that I think the "intelligence" should be in the mob code, not in the pathfinder.

Lets assume a mob follows a target. The target goes into a building and close the door. The mob can't find a path. The next step a mob could do is to find a door, maybe near it's target instead of himself. Than the mob should try to find a path to that door and open it.

Instead of find the nearest door it would be possible to find all doors near the target and try to reach and open them one after the other.

If all doors are passable for the pathfinder a mob would never be able to find an alternative path because the pathfinder will always try the same
 

Sokomine
Member
 
Posts: 3874
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [mod] New Pathfinder [wip][pathfinder]

by Sokomine » Mon Dec 04, 2017 05:38

burli wrote:If all doors are passable for the pathfinder a mob would never be able to find an alternative path because the pathfinder will always try the same

When analyzing buildings for mg_villages, I let your pathfinder work on the data structure containing the building instead of on the map itself. If a path through a door is found, that path is stored, a (temporal) node set to block the door, and then alternate paths are searched for. In the end the temporal blocking nodes are removed from the data structure.

The question of weather a door is open or closed cannot be determined that easily. Doors might have been placed and stored either in closed or opened state - whatever was more convenient for the builder. While doors can still somehow be analyzed, trapdoors/hatches are very nasty and are not really handled by my modifications yet.
A list of my mods can be found here.
 

User avatar
TumeniNodes
Member
 
Posts: 2826
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: [mod] New Pathfinder [wip][pathfinder]

by TumeniNodes » Mon Dec 04, 2017 05:52

burli, that only makes sense to me.
Leave handling doors to each mob. It makes sense because, some mobs simply should not be able to open doors, etc..
The player needs to be able to be safe (or just be able to get away from mobs)in some places (on the other side of doors).
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am
 

Sokomine
Member
 
Posts: 3874
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [mod] New Pathfinder [wip][pathfinder]

by Sokomine » Mon Dec 04, 2017 06:04

There's a huge difference between mobs hunting a player and mobs trying to navigate inside a village. Those villagers have no need to recalculate as their target will usually be a fixed location. On the other hand it's important for them to reach their target. Hunting mobs need to check much more often as players on the run tend to move around.
A list of my mods can be found here.
 

PreviousNext

Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 4 guests