Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,435 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 4 of 12 1 2 3 4 5 6 11 12
Re: ez_path -- for alpha testing! Simple Pathfind [Re: clone45] #44611
04/24/05 07:49
04/24/05 07:49
Joined: Aug 2003
Posts: 7,440
Red Dwarf
Michael_Schwarz Offline
Senior Expert
Michael_Schwarz  Offline
Senior Expert

Joined: Aug 2003
Posts: 7,440
Red Dwarf
And whats about an A5 version of the DLL?

I know i can bee very penetrating


"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
Re: ez_path -- for alpha testing! Simple Pathfind [Re: Michael_Schwarz] #44612
04/24/05 08:00
04/24/05 08:00
Joined: Mar 2002
Posts: 580
San Francisco
clone45 Offline OP
User
clone45  Offline OP
User

Joined: Mar 2002
Posts: 580
San Francisco

Hi Michael!

An A5 version is still unlikely in the near future. Sorry!!

Re: ez_path -- for alpha testing! Simple Pathfind [Re: clone45] #44613
04/24/05 10:20
04/24/05 10:20
Joined: Nov 2000
Posts: 1,534
hamburg
Samb Offline
Serious User
Samb  Offline
Serious User

Joined: Nov 2000
Posts: 1,534
hamburg
hey clone
can I set pf_set_ent_collision_distance(var dist) to zero so the enemy wouldn't go directly to the target if he find it?

Re: ez_path -- for alpha testing! Simple Pathfind [Re: Samb] #44614
04/24/05 18:52
04/24/05 18:52
Joined: Mar 2002
Posts: 580
San Francisco
clone45 Offline OP
User
clone45  Offline OP
User

Joined: Mar 2002
Posts: 580
San Francisco

Samb,

I guess that one of the benefits in helping test out is that you get your wish! I've added the ability to turn off the "line of sight" portion of the pathfinding. I can't imagine many times you'd want to turn this off, but a pacman game is a good example!

Here's how to turn it off:

pf_use_los(0);

Here's an example:

Code:

function main()
{
warn_level = 0; // This is necessary!

// Open the pathfinding .dll. Do this before the level loads so that entities
// can reference the pathfinding .dll in their actions. Otherwise, the entity
// actions can start running before the pathfinding .dll has loaded, resulting
// in an error.

pathfind_handle = dll_open("pathfind.dll");

wait(3);
level_load(level_str);
wait(2);

pf_use_los(0); // turn off LOS pathfinding step

// Initialized pathfinding nodes. Do this after the level loads. The
// .dll function pf_initialized() returns 1 when the pathfinding has completed
// initialization.

pf_init_nodes();

}



Also, I updated ez_path.wdl to contain the new .dll function prototypes.
You can get the new package at
http://www.gamebeep.com/freebies/ez_path_src.zip

Enjoy!
- Bret

Re: ez_path -- for alpha testing! Simple Pathfind [Re: clone45] #44615
04/24/05 20:55
04/24/05 20:55
Joined: Mar 2002
Posts: 580
San Francisco
clone45 Offline OP
User
clone45  Offline OP
User

Joined: Mar 2002
Posts: 580
San Francisco

Hello again!

If I have time in the future, I might attempt to add some optional dynamic A* pathfinding into the ez_path package. Basically, the logic would be:

Code:

if (path blocked)
{
switch to a* pathfinding to reach next destination
}



However, this would require that TONS of little pathfinding entities be added to the level. That's the only easy way I could think of implementing it. On the bright side, you wouldn't need to configure the nodes. Also, I'd use a radius of A* nodes in respect the player's position, which could keep the computations down to a reasonable amount.

For really basic levels, it would be possible to assume there's a flat 2d grid that A* could use. But for complicated levels (think Tomb Raider), I can't think of a way that the A* nodes could be determined at runtime. They would require manual placement.


(The node placement might not need to be this dense.)


Any feedback? Do you think this would be a good feature to add?

Thanks!!
- Bret

Re: ez_path -- for alpha testing! Simple Pathfind [Re: clone45] #44616
04/24/05 21:47
04/24/05 21:47
Joined: Mar 2003
Posts: 4,264
Wellington
Nems Offline

.
Nems  Offline

.

Joined: Mar 2003
Posts: 4,264
Wellington
Hi clone45,
I resolved the 'no acknex dll' prob.
I have versions 22 and 31.4 but .22 opens files bydefault when I click on them.
Manually opening in 31.4 opens and plays your demo with no probs.
Looks cool and simple and hopefully, usable for the likes of me.
Thanks.

Re: ez_path -- for alpha testing! Simple Pathfind [Re: clone45] #44617
04/25/05 01:36
04/25/05 01:36
Joined: Nov 2000
Posts: 1,534
hamburg
Samb Offline
Serious User
Samb  Offline
Serious User

Joined: Nov 2000
Posts: 1,534
hamburg
thanks clone
three things:
1. the engine freezes at start. if I reduce the node the engine doesn't freeze
2. If I move the target, the following guy is confused and go some werid ways
3. the engine can't find the new function

here's the level with a really simpel and useless movement script
http://www.sinn-los.de/level2.zip

Re: ez_path -- for alpha testing! Simple Pathfind [Re: Samb] #44618
04/25/05 01:57
04/25/05 01:57
Joined: Mar 2002
Posts: 580
San Francisco
clone45 Offline OP
User
clone45  Offline OP
User

Joined: Mar 2002
Posts: 580
San Francisco

Thanks for the feedback. Ok, I'm working on it!! It's possible that I didn't include the most up-to-date .dll. I think I did. But maybe I screwed up. In any case, even in the most recent version, you're bug #2 still exists:

2. If I move the target, the following guy is confused and go some werid ways

I'll work on this over the next day or two. Hopefully I'll be able to post a solution shortly. In the meantime, I've updated the .zip file to ensure it contains the new .dll.

One again, that's at: http://www.gamebeep.com/freebies/ez_path_src.zip

Sorry about the bugs. I didn't have the freezing issue on my machine. I'll try to figure out what's going on with that.

- Bret

Re: ez_path -- for alpha testing! Simple Pathfind [Re: clone45] #44619
04/25/05 06:30
04/25/05 06:30
Joined: Mar 2002
Posts: 580
San Francisco
clone45 Offline OP
User
clone45  Offline OP
User

Joined: Mar 2002
Posts: 580
San Francisco

Great news!!

Ok, I found two major bugs in the pathfinding routine and cleaned them up. The bugs were:

1. I was forgetting to clear one of the node "visited" flags, which caused the pathfinding to break down over time.

2. I had to introduce a more reasonable default for "maximum path search depth", as the nearly infinite search depth took a huge amount of time. The maximum search depth is now 9 nodes. This should speed things up considerably. It can be changed like this:

pf_set_max_path(15);

(Samb, I would suggest putting your search depth at around 16 for the pacman game.)

3. I simplified the routine that finds the "closes first node". I might have to revisit this portion of the code again later.

OK!! The new file is in place and ready for download! Again, sorry for all the bugs, but you know what they say: "Never let a coder test their own code." Let me say, too, if I ever sell a "professional version", everyone who's helping me out will get a free copy.

http://www.gamebeep.com/freebies/ez_path_src.zip

Cheers!
- Bret

Re: ez_path -- for alpha testing! Simple Pathfind [Re: clone45] #44620
04/25/05 16:55
04/25/05 16:55
Joined: Nov 2000
Posts: 1,534
hamburg
Samb Offline
Serious User
Samb  Offline
Serious User

Joined: Nov 2000
Posts: 1,534
hamburg
ok the engine don't crash but it can't finde the use_lost function again
at some start points the searching guy can't find the path
he go to a node and then go trough a node
then he hits a wall stands there

Page 4 of 12 1 2 3 4 5 6 11 12

Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1