Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, VoroneTZ), 396 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 5 1 2 3 4 5
Tip of the Week #10: New Pathfinding Solution! #435118
01/03/14 06:27
01/03/14 06:27
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline OP
Senior Expert
Superku  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
A new tip of the week has arrived which is basically just a contribution. It's a new pathfinding solution written from scratch - although similar to my last one from the goodies.zip archive it has many advantages such that it does not need to pre-calculate all paths in a level (and store all those nasty text files in your game folder), that those paths can be changed dynamically (for example when a gate opens), that you don't have to attach a path manually to the entity and that it is in general much more flexible.

See here, TotW #10 (fixed link): http://opserver.de/swik10/index.php?title=Pathfinding

Originally Posted By: TotW #10
The idea behind this pathfinding script is to use regions (optional but highly recommended!) and WED paths and to divide the level into small logical segments. Those segments can be corridors, houses, hangars and so on. See the following screenshot:




The usage is as simple as follows:

Code:
action enemy()
{
	while(1)
	{
		VECTOR temp;
		hpf_region_get_target(temp,my,player.x,HPF_XYZ);
		turn to temp;
		move to temp;
		wait(1);
	}
}



It is just the first version of the script completed minutes ago so please notify me of any bugs that you may find.

There is a newer version/ update which you can find below.

Last edited by Superku; 08/08/15 08:29.

"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Tip of the Week #10: New Pathfinding Solution! [Re: Superku] #435312
01/06/14 08:27
01/06/14 08:27
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Thank you very much man! laugh I'll test this, as soon as I'll have a chance!
Your "Tip of the Week" series are the most useful I've seen on this forum!

Greets


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Tip of the Week #10: New Pathfinding Solution! [Re: 3run] #435317
01/06/14 09:13
01/06/14 09:13
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline OP
Senior Expert
Superku  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Thank you, please tell me what you think!
The part where the entity leaves a region definitely needs to be smoothed but it's not so easy because of mutual dependencies. I will try to update and improve it soon.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Tip of the Week #10: New Pathfinding Solution! [Re: Superku] #435331
01/06/14 12:15
01/06/14 12:15
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline
Serious User
Rackscha  Offline
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
Looks nice.
But you should really take node distance into account for better heuristic wink


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: Tip of the Week #10: New Pathfinding Solution! [Re: Rackscha] #435333
01/06/14 12:25
01/06/14 12:25
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Not trying to be an ass, but do it yourself? It's open source code and I'm sure Superku would be glad if other people with knowledge would get behind it as well.

Also, where are all the people who were crying about missing pathfinding solutions? There you have one that's easy to use, shouldn't you rejoice and kiss Superkus feet now or something?


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: Tip of the Week #10: New Pathfinding Solution! [Re: WretchedSid] #435341
01/06/14 14:25
01/06/14 14:25
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,107
Germany
W O W ! Thank you very much my old friend. Felix, if u want i * your * grin
Asap ill look into that great contribution.


Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: Tip of the Week #10: New Pathfinding Solution! [Re: rayp] #435351
01/06/14 16:39
01/06/14 16:39
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline OP
Senior Expert
Superku  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
blush You are welcome!

I've thought about using real node distances, I may do that in the future, too, at least optionally, but it does not really add much. It may get more intuitive this way and more accurate by a few quants but the algorithm will rather get slower, not faster this way (because of additional calculations/ sorting, right now it does at most n/2 iterations with a total of 2n node checks).


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Tip of the Week #10: New Pathfinding Solution! [Re: Superku] #435383
01/07/14 05:59
01/07/14 05:59
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline
Serious User
DLively  Offline
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
THANK YOU Superku!!!

I've been telling my friends how awesome you are laugh
Wait till they hear about this lol


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: Tip of the Week #10: New Pathfinding Solution! [Re: WretchedSid] #435388
01/07/14 08:46
01/07/14 08:46
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline
Serious User
Rackscha  Offline
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
Originally Posted By: JustSid
Not trying to be an ass, but do it yourself? It's open source code and I'm sure Superku would be glad if other people with knowledge would get behind it as well.


1) i wrote my own systems for pathfinding wink
Some years ago i presented a demo of an AI which chases the player through a level.
EDIT to 1: Whoops, sorry JustSid, thought you accused me for being a potential parasite. But you meant it the way that i should help if i know how it works. Need more coffe!

2) currently i have no time to contribute to anything
3) I am a Softwaredeveloper, and to avoid later complications, my boss likes to know before i publish something in my sparetime. I know, the german law only restricts to direct concurrent actions, which is mostly not the case. But that job feeds me, so better be on the safe side wink

I wrote a sheetpaper with some points, as i want to discuss which types of projects i can release without asking before.
But that'll need some time.

PS: @Justsid you have a pending PM from me o.O

Greetings
Rackscha

Last edited by Rackscha; 01/07/14 08:58.

MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: Tip of the Week #10: New Pathfinding Solution! [Re: Rackscha] #435412
01/07/14 18:54
01/07/14 18:54
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Originally Posted By: Rackscha
3) I am a Softwaredeveloper, and to avoid later complications, my boss likes to know before i publish something in my sparetime.

WHAT?! Dude, seriously, find a new job! (Yes, strap on your job helmet and jump into the job cannon etc. blahblah). Your boss has NO say whatsoever over your free time and what you do with it, unless it involves selling company secrets to the competition. If you employer thinks he has a say over what projects you publish and which not, there is something seriously wrong with your relationship with them.

Originally Posted By: Rackscha
PS: @Justsid you have a pending PM from me o.O

Yes! I've actually read it laugh
I was waiting how long it would take for you to find out that all questions in there are answered in the Rayne thread tongue


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Page 1 of 5 1 2 3 4 5

Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | chip programmers | 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