PathFinder status
#32
(09-10-2014, 10:33 PM)xoft Wrote: The interface has no idea where to do the pathfinding. You need to get a cChunk instance in it somehow so that it can query blocks. Note that you don't normally have access to a cChunk object unless you do a cWorld::DoWithChunk() - so your interface should get a cWorld instance, call DoWithChunk() on it internally and then do the actual pathfinding. See the cLineBlockTracer for a similar example (didn't I write this already?)

Also the usage of the class is somewhat unintuitive now - if you want to do pathfinding, you first create an instance, feed a few params to it, and then call one of its methods, only to destroy the instance afterwards. Can't it all be wrapped into a static function that would create the instance internally with all the data it needs?

Hold on! The instance does not get destroyed after you use it to create a single path! If it were that way, I would have created a static class.

The idea here is that a mob is supposed to store his Pathfinder instance for as long as the mob exists. Why? Because that saves lots of memory allocations. internally, the instance will be reusing stuff when generating different paths. I hope to achieve zero dynamic allocations after the first path is generated.

Edit: I still haven't added the cChunk thing, yet.

Edit2: Well, not exactly zero. The cPath which is spat out will have some size.
Reply
Thanks given by:


Messages In This Thread
PathFinder status - by LogicParrot - 09-08-2014, 02:20 AM
RE: Implementing Pathfinding - by xoft - 09-08-2014, 03:25 AM
RE: Implementing Pathfinding - by LogicParrot - 09-08-2014, 03:49 AM
RE: Implementing Pathfinding - by xoft - 09-08-2014, 04:09 AM
RE: Implementing Pathfinding - by LogicParrot - 09-08-2014, 04:37 AM
RE: Implementing Pathfinding - by LogicParrot - 09-08-2014, 05:52 AM
RE: Implementing Pathfinding - by sphinxc0re - 09-08-2014, 05:57 AM
RE: Implementing Pathfinding - by xoft - 09-08-2014, 06:21 AM
RE: Implementing Pathfinding - by LogicParrot - 09-08-2014, 06:28 AM
RE: Implementing Pathfinding - by LogicParrot - 09-08-2014, 08:14 PM
RE: Implementing Pathfinding - by NiLSPACE - 09-08-2014, 08:26 PM
RE: Implementing Pathfinding - by LogicParrot - 09-08-2014, 08:45 PM
RE: Implementing Pathfinding - by LogicParrot - 09-08-2014, 09:58 PM
RE: Implementing Pathfinding - by xoft - 09-08-2014, 10:55 PM
RE: Implementing Pathfinding - by worktycho - 09-09-2014, 12:10 AM
RE: Implementing Pathfinding - by jan64 - 09-09-2014, 02:09 AM
RE: Implementing Pathfinding - by LogicParrot - 09-09-2014, 05:16 AM
RE: Implementing Pathfinding - by NiLSPACE - 09-09-2014, 02:10 AM
RE: Implementing Pathfinding - by SamJBarney - 09-09-2014, 06:44 AM
RE: Implementing Pathfinding - by jan64 - 09-09-2014, 06:47 AM
RE: Implementing Pathfinding - by LogicParrot - 09-09-2014, 09:24 PM
RE: Implementing Pathfinding - by SamJBarney - 09-10-2014, 03:08 AM
RE: Implementing Pathfinding - by sphinxc0re - 09-10-2014, 03:18 AM
RE: Implementing Pathfinding - by LogicParrot - 09-10-2014, 03:22 AM
RE: Implementing Pathfinding - by jan64 - 09-10-2014, 03:56 AM
RE: Implementing Pathfinding - by LogicParrot - 09-10-2014, 04:02 AM
RE: Implementing Pathfinding - by LogicParrot - 09-10-2014, 03:58 PM
RE: Implementing Pathfinding - by archshift - 09-13-2014, 08:54 AM
RE: Implementing Pathfinding - by xoft - 09-10-2014, 04:32 PM
RE: Implementing Pathfinding - by LogicParrot - 09-10-2014, 10:22 PM
RE: Implementing Pathfinding - by xoft - 09-10-2014, 10:33 PM
RE: Implementing Pathfinding - by LogicParrot - 09-10-2014, 11:44 PM
RE: Implementing Pathfinding - by worktycho - 09-10-2014, 11:43 PM
RE: Implementing Pathfinding - by xoft - 09-11-2014, 12:37 AM
RE: Implementing Pathfinding - by LogicParrot - 09-11-2014, 01:12 AM
RE: Implementing Pathfinding - by LogicParrot - 09-11-2014, 03:47 AM
RE: Implementing Pathfinding - by LogicParrot - 09-11-2014, 08:27 PM
RE: Implementing Pathfinding - by xoft - 09-13-2014, 09:08 PM
RE: Implementing Pathfinding - by wudles - 01-31-2015, 03:02 AM
RE: Implementing Pathfinding - by LogicParrot - 02-16-2015, 04:45 AM
RE: Implementing Pathfinding - by NiLSPACE - 02-16-2015, 04:50 AM
RE: Implementing Pathfinding - by LogicParrot - 04-22-2015, 07:20 AM
RE: Implementing Pathfinding - by LogicParrot - 04-22-2015, 03:39 PM
RE: Implementing Pathfinding - by xoft - 04-22-2015, 03:59 PM
RE: Implementing Pathfinding - by LogicParrot - 04-22-2015, 04:01 PM
RE: Implementing Pathfinding - by LogicParrot - 04-22-2015, 04:28 PM
RE: Implementing Pathfinding - by LogicParrot - 04-22-2015, 06:21 PM
RE: Implementing Pathfinding - by NiLSPACE - 04-22-2015, 06:53 PM
RE: Implementing Pathfinding - by Jammet - 04-22-2015, 09:53 PM
RE: Implementing Pathfinding - by LogicParrot - 04-23-2015, 05:34 AM
RE: Implementing Pathfinding - by xoft - 04-22-2015, 08:22 PM
RE: Implementing Pathfinding - by LogicParrot - 04-22-2015, 09:04 PM
RE: Implementing Pathfinding - by xoft - 04-22-2015, 09:21 PM
RE: Implementing Pathfinding - by worktycho - 04-22-2015, 09:35 PM
RE: Implementing Pathfinding - by LogicParrot - 04-22-2015, 09:40 PM
RE: Implementing Pathfinding - by worktycho - 04-22-2015, 09:59 PM
Example updated - by LogicParrot - 04-22-2015, 10:10 PM
Compiling issue - by LogicParrot - 04-22-2015, 10:35 PM
RE: Implementing Pathfinding - by NiLSPACE - 04-22-2015, 10:45 PM
RE: Implementing Pathfinding - by worktycho - 04-22-2015, 10:46 PM
RE: Implementing Pathfinding - by LogicParrot - 04-22-2015, 10:53 PM
RE: Implementing Pathfinding - by worktycho - 04-22-2015, 10:54 PM
RE: Implementing Pathfinding - by LogicParrot - 04-23-2015, 03:49 AM
Caching - by LogicParrot - 04-23-2015, 04:13 AM
RE: Implementing Pathfinding - by jan64 - 04-23-2015, 04:56 AM
RE: Implementing Pathfinding - by NiLSPACE - 04-23-2015, 05:20 AM
RE: Implementing Pathfinding - by LogicParrot - 04-23-2015, 06:21 AM
RE: Implementing Pathfinding - by xoft - 04-23-2015, 08:50 AM
Code cleaned - by LogicParrot - 04-23-2015, 06:47 PM
RE: Implementing Pathfinding - by LogicParrot - 04-23-2015, 07:36 PM
RE: Implementing Pathfinding - by LogicParrot - 04-23-2015, 08:02 PM
RE: Implementing Pathfinding - by jan64 - 04-23-2015, 08:41 PM
RE: Implementing Pathfinding - by LogicParrot - 04-23-2015, 08:48 PM
RE: Implementing Pathfinding - by worktycho - 04-24-2015, 07:33 AM
RE: Implementing Pathfinding - by LogicParrot - 04-24-2015, 05:55 PM
RE: Implementing Pathfinding - by LogicParrot - 04-24-2015, 06:10 PM
RE: Implementing Pathfinding - by xoft - 04-24-2015, 06:19 PM
RE: Implementing Pathfinding - by LogicParrot - 04-24-2015, 06:24 PM
RE: Implementing Pathfinding - by worktycho - 04-24-2015, 06:47 PM
RE: Implementing Pathfinding - by xoft - 04-24-2015, 06:49 PM
RE: Implementing Pathfinding - by worktycho - 04-24-2015, 06:56 PM
RE: Implementing Pathfinding - by xoft - 04-24-2015, 08:34 PM
RE: Implementing Pathfinding - by LogicParrot - 04-24-2015, 10:35 PM
RE: Implementing Pathfinding - by worktycho - 04-24-2015, 09:32 PM
RE: Implementing Pathfinding - by LogicParrot - 04-25-2015, 06:11 AM
RE: Implementing Pathfinding - by xoft - 04-24-2015, 09:55 PM
RE: Implementing Pathfinding - by worktycho - 04-24-2015, 10:15 PM
RE: Implementing Pathfinding - by xoft - 04-24-2015, 10:29 PM
RE: Implementing Pathfinding - by LogicParrot - 04-25-2015, 05:52 AM
RE: Implementing Pathfinding - by worktycho - 04-24-2015, 10:34 PM
RE: Implementing Pathfinding - by LogicParrot - 04-24-2015, 11:46 PM
RE: Implementing Pathfinding - by worktycho - 04-25-2015, 12:01 AM
RE: Implementing Pathfinding - by LogicParrot - 04-25-2015, 05:41 AM
RE: Implementing Pathfinding - by LogicParrot - 04-25-2015, 06:34 AM
Codestyle fixed? - by LogicParrot - 04-25-2015, 06:53 AM
RE: Implementing Pathfinding - by sphinxc0re - 04-26-2015, 12:06 AM
RE: Implementing Pathfinding - by LogicParrot - 04-26-2015, 12:41 AM
RE: Implementing Pathfinding - by LogicParrot - 04-26-2015, 02:54 AM
RE: Implementing Pathfinding - by worktycho - 04-26-2015, 03:16 AM
RE: Implementing Pathfinding - by xoft - 04-26-2015, 03:26 AM
cPathFinder and cPath merged - by LogicParrot - 04-26-2015, 08:16 PM
RE: Implementing Pathfinding - by worktycho - 04-26-2015, 08:28 PM
CheckBasicStyle.lua wrapper - by LogicParrot - 04-26-2015, 11:50 PM
RE: Implementing Pathfinding - by xoft - 04-26-2015, 11:05 PM
RE: Implementing Pathfinding - by xoft - 04-27-2015, 12:36 AM
RE: Implementing Pathfinding - by LogicParrot - 04-27-2015, 07:15 AM
World.h - by LogicParrot - 04-28-2015, 06:00 AM
RE: Implementing Pathfinding - by worktycho - 04-28-2015, 06:14 AM
RE: Implementing Pathfinding - by LogicParrot - 04-28-2015, 07:22 AM
RE: Implementing Pathfinding - by NiLSPACE - 04-28-2015, 07:35 AM
RE: Implementing Pathfinding - by LogicParrot - 04-28-2015, 07:41 AM
RE: Implementing Pathfinding - by LogicParrot - 04-28-2015, 03:15 PM
RE: Implementing Pathfinding - by LogicParrot - 04-28-2015, 04:07 PM
RE: Implementing Pathfinding - by LogicParrot - 04-28-2015, 04:37 PM
Working PathFinder.cpp - by LogicParrot - 04-28-2015, 05:59 PM
RE: Implementing Pathfinding - by LogicParrot - 04-28-2015, 06:24 PM
RE: Implementing Pathfinding - by LogicParrot - 04-28-2015, 06:35 PM
RE: Implementing Pathfinding - by LogicParrot - 04-28-2015, 07:19 PM
RE: Implementing Pathfinding - by xoft - 04-28-2015, 08:17 PM
RE: Implementing Pathfinding - by NiLSPACE - 04-28-2015, 08:51 PM
RE: Implementing Pathfinding - by LogicParrot - 04-28-2015, 09:55 PM
RE: Implementing Pathfinding - by LogicParrot - 04-29-2015, 04:41 AM
RE: Implementing Pathfinding - by LogicParrot - 04-29-2015, 05:36 AM
RE: Implementing Pathfinding - by worktycho - 04-29-2015, 05:36 AM
RE: Implementing Pathfinding - by LogicParrot - 04-29-2015, 05:41 AM
RE: Implementing Pathfinding - by NiLSPACE - 04-29-2015, 05:50 AM
RE: Implementing Pathfinding - by LogicParrot - 04-29-2015, 05:55 AM
RE: Implementing Pathfinding - by NiLSPACE - 04-29-2015, 06:05 AM
RE: Implementing Pathfinding - by LogicParrot - 04-29-2015, 06:32 AM
RE: Implementing Pathfinding - by NiLSPACE - 04-29-2015, 06:36 AM
RE: Implementing Pathfinding - by LogicParrot - 04-29-2015, 07:12 AM
RE: Implementing Pathfinding - by LogicParrot - 04-29-2015, 07:28 AM
RE: Implementing Pathfinding - by LogicParrot - 04-29-2015, 07:43 AM
RE: Implementing Pathfinding - by LogicParrot - 04-29-2015, 08:09 AM
RE: Implementing Pathfinding - by jan64 - 04-29-2015, 08:17 AM
RE: Implementing Pathfinding - by LogicParrot - 04-29-2015, 06:30 PM
RE: Implementing Pathfinding - by xoft - 04-29-2015, 07:26 PM
RE: Implementing Pathfinding - by LogicParrot - 04-30-2015, 01:46 AM
RE: Implementing Pathfinding - by NiLSPACE - 04-30-2015, 04:05 AM
RE: Implementing Pathfinding - by LogicParrot - 04-30-2015, 05:07 AM
RE: Implementing Pathfinding - by LogicParrot - 04-30-2015, 06:22 PM
RE: Implementing Pathfinding - by LogicParrot - 04-30-2015, 06:36 PM
RE: Implementing Pathfinding - by LogicParrot - 04-30-2015, 06:49 PM
RE: Implementing Pathfinding - by NiLSPACE - 04-30-2015, 08:32 PM
RE: Implementing Pathfinding - by NiLSPACE - 05-01-2015, 12:31 AM
RE: Implementing Pathfinding - by LogicParrot - 05-01-2015, 01:50 AM
RE: Implementing Pathfinding - by LogicParrot - 05-01-2015, 02:36 AM
RE: Implementing Pathfinding - by NiLSPACE - 05-01-2015, 02:41 AM
RE: Implementing Pathfinding - by LogicParrot - 05-01-2015, 04:20 AM
RE: Implementing Pathfinding - by LogicParrot - 05-01-2015, 04:36 AM
RE: Implementing Pathfinding - by LogicParrot - 05-01-2015, 06:54 AM
RE: Implementing PathFinding - by jan64 - 05-01-2015, 08:06 PM
Merged! - by LogicParrot - 05-01-2015, 10:33 PM
DoWithChunk - by LogicParrot - 05-01-2015, 11:31 PM
RE: Implementing PathFinding - by worktycho - 05-02-2015, 12:32 AM
RE: Implementing PathFinding - by LogicParrot - 05-02-2015, 01:55 AM
RE: Implementing PathFinding - by xoft - 05-02-2015, 02:03 AM
RE: Implementing PathFinding - by LogicParrot - 05-02-2015, 02:12 AM
RE: Implementing PathFinding - by xoft - 05-02-2015, 02:48 AM
RE: Implementing PathFinding - by tonibm19 - 05-02-2015, 05:34 AM
RE: Implementing PathFinding - by LogicParrot - 05-02-2015, 05:47 AM
RE: Implementing PathFinding - by LogicParrot - 05-02-2015, 06:18 AM
RE: Implementing PathFinding - by LogicParrot - 05-02-2015, 04:20 PM
RE: Implementing PathFinding - by NiLSPACE - 05-03-2015, 03:26 AM
RE: Implementing PathFinding - by LogicParrot - 05-03-2015, 04:58 AM
RE: Implementing PathFinding - by Howaner - 05-03-2015, 08:42 AM
RE: Implementing PathFinding - by LogicParrot - 05-03-2015, 04:51 PM
RE: PathFinder status - by NiLSPACE - 05-05-2015, 06:32 AM
RE: PathFinder status - by xoft - 05-05-2015, 07:26 AM
RE: PathFinder status - by LogicParrot - 05-05-2015, 03:58 PM
RE: PathFinder status - by LogicParrot - 05-06-2015, 02:48 AM
RE: PathFinder status - by tigerw - 05-06-2015, 03:44 AM
RE: PathFinder status - by NiLSPACE - 05-07-2015, 06:04 AM
RE: PathFinder status - by NiLSPACE - 05-08-2015, 08:37 AM
RE: PathFinder status - by worktycho - 05-08-2015, 08:43 AM
RE: PathFinder status - by Jammet - 05-08-2015, 09:03 AM
RE: PathFinder status - by xoft - 05-08-2015, 05:00 PM
RE: PathFinder status - by LogicParrot - 05-08-2015, 05:07 PM
RE: PathFinder status - by Jammet - 05-08-2015, 09:45 PM
RE: PathFinder status - by LogicParrot - 05-08-2015, 10:18 PM
RE: PathFinder status - by LogicParrot - 05-08-2015, 10:32 PM
RE: PathFinder status - by xoft - 05-08-2015, 10:33 PM
RE: PathFinder status - by LogicParrot - 05-08-2015, 11:00 PM
RE: PathFinder status - by tigerw - 05-09-2015, 02:54 AM
RE: PathFinder status - by LogicParrot - 05-09-2015, 03:13 AM
RE: PathFinder status - by NiLSPACE - 05-09-2015, 11:14 PM
RE: PathFinder status - by worktycho - 05-09-2015, 11:33 PM
RE: PathFinder status - by Jammet - 05-11-2015, 10:37 AM
RE: PathFinder status - by LogicParrot - 05-24-2015, 01:35 AM
RE: PathFinder status - by Shadowraix - 05-24-2015, 02:41 AM
RE: PathFinder status - by tigerw - 05-24-2015, 04:00 AM
RE: PathFinder status - by LogicParrot - 05-24-2015, 04:12 AM
RE: PathFinder status - by Jammet - 05-24-2015, 06:43 PM
RE: PathFinder status - by ThuGie - 05-24-2015, 06:42 AM
RE: PathFinder status - by LogicParrot - 05-24-2015, 04:41 PM
RE: PathFinder status - by NiLSPACE - 06-01-2015, 03:14 AM
RE: PathFinder status - by LogicParrot - 06-01-2015, 03:41 PM
RE: PathFinder status - by NiLSPACE - 06-01-2015, 06:18 PM
RE: PathFinder status - by LogicParrot - 06-02-2015, 05:36 PM
RE: PathFinder status - by NiLSPACE - 06-02-2015, 06:03 PM
RE: PathFinder status - by jan64 - 06-03-2015, 01:03 AM
RE: PathFinder status - by LogicParrot - 06-05-2015, 05:34 PM
RE: PathFinder status - by LogicParrot - 08-06-2015, 04:21 AM
RE: PathFinder status - by DiamondToaster - 08-06-2015, 04:39 AM
RE: PathFinder status - by worktycho - 09-30-2015, 11:43 PM
D* is for static goals - by LogicParrot - 10-02-2015, 06:52 PM
RE: PathFinder status - by NiLSPACE - 10-02-2015, 07:28 PM
We have BFS - by LogicParrot - 10-02-2015, 08:03 PM
RE: PathFinder status - by NiLSPACE - 10-02-2015, 08:10 PM
RE: PathFinder status - by LogicParrot - 10-02-2015, 08:18 PM
RE: PathFinder status - by NiLSPACE - 10-02-2015, 08:19 PM
RE: PathFinder status - by LogicParrot - 10-02-2015, 08:24 PM
RE: PathFinder status - by LogicParrot - 10-02-2015, 09:05 PM
RE: PathFinder status - by xoft - 10-03-2015, 01:10 AM
Agree - by LogicParrot - 10-03-2015, 06:28 PM
RE: PathFinder status - by LogicParrot - 10-05-2015, 06:53 PM
RE: PathFinder status - by NiLSPACE - 10-08-2015, 05:29 AM
RE: PathFinder status - by LogicParrot - 10-22-2015, 03:54 PM
RE: PathFinder status - by LogicParrot - 12-13-2015, 05:19 PM
RE: PathFinder status - by LogicParrot - 12-23-2015, 08:24 AM
RE: PathFinder status - by Jammet - 12-23-2015, 09:07 AM
Update: Swimming done right - by LogicParrot - 12-26-2015, 12:36 AM
RE: PathFinder status - by tonibm19 - 12-26-2015, 12:42 AM
RE: PathFinder status - by LogicParrot - 12-26-2015, 01:03 AM
RE: PathFinder status - by LogicParrot - 01-12-2016, 07:20 PM



Users browsing this thread: 7 Guest(s)