Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (TipmyPip, AndrewAMD), 911 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 2 of 5 1 2 3 4 5
Re: Pathfinder [Re: the_mehmaster] #294458
10/19/09 09:44
10/19/09 09:44
Joined: Jul 2008
Posts: 24
Russia
mr_x Offline OP
Newbie
mr_x  Offline OP
Newbie

Joined: Jul 2008
Posts: 24
Russia
I'm glad, that it useful. When you call asFindasPath(start, dest)(terrible name for the function :)), founded path is stored in the asPath list, and when you next time call asFindasPath, asPath list erased, so when you want to find path for one of many entities, you should then record founded path somewhere else, in the another list for example or in the array. It would be something like this:
Code:
asList EntityPath;

asPath.itr = asPath.head;
while(asPath.itr != NULL)
{
  asPrepend(EntityPath, asPath.itr);
  asForth(asPath);
}



Re: Pathfinder [Re: mr_x] #295159
10/23/09 07:35
10/23/09 07:35
Joined: Dec 2008
Posts: 528
Wagga, Australia
the_mehmaster Offline
User
the_mehmaster  Offline
User

Joined: Dec 2008
Posts: 528
Wagga, Australia
Ok.. sounds simple enough. Thanks smile

Re: Pathfinder [Re: the_mehmaster] #295247
10/23/09 21:08
10/23/09 21:08
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
ok..
i think i´m blind..
so i ask..

Any way to count the nodes, that will be passed to get to the target. if the count is greater than a var.. it cuts the way to the farest node possible with the var?


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Pathfinder [Re: Espér] #295272
10/24/09 03:54
10/24/09 03:54
Joined: Jul 2008
Posts: 24
Russia
mr_x Offline OP
Newbie
mr_x  Offline OP
Newbie

Joined: Jul 2008
Posts: 24
Russia
List has a "count" variable. "asPath.count" will return number of nodes, that path has. About farest node, if you need farest node from all nodes in the level, you should loop through the asNodeList, if you need farest node from the path list you should loop through asPath list.

Code:
if(asPath.count > var)
{
  asNode* FarestNode;
  var dist;

  asPath.itr = asPath.head;
  dist = vec_dist(start, asPath.itr.pos);
  FarestNode = asPath.itr;
  while(asPath.itr != NULL)
  {
    if(vec_dist(start, asPath.itr.pos) > dist)
    {
      dist = vec_dist(start, asPath.itr.pos);
      FarestNode = asPath.itr;
    }
   asForth(asPath);
  }
}



Re: Pathfinder [Re: the_mehmaster] #295284
10/24/09 06:13
10/24/09 06:13
Joined: Jan 2006
Posts: 69
Missouri, USA
penut Offline
Junior Member
penut  Offline
Junior Member

Joined: Jan 2006
Posts: 69
Missouri, USA
Thank you so much! wink


Windows 7/ 2.8Ghz Quad Core i7/8 Gigs DDR2ram/ 2 Crossfired ATI 6850's and one crazy Level Designer! On the "Scion" dev team!!

My old Work http://s44.photobucket.com/albums/f34/penut117/
Re: Pathfinder [Re: the_mehmaster] #296283
10/30/09 17:55
10/30/09 17:55
Joined: Mar 2006
Posts: 2,252
Hummel Offline
Expert
Hummel  Offline
Expert

Joined: Mar 2006
Posts: 2,252
I always just get the home: http://www.filedropper.com/ even when I pass the full link in the browser (IE, FF)-perhaps the file isn´t anymore up?
Would be coul if you could give us another link wink

Re: Pathfinder [Re: Hummel] #296315
10/30/09 21:58
10/30/09 21:58
Joined: Jul 2008
Posts: 24
Russia
mr_x Offline OP
Newbie
mr_x  Offline OP
Newbie

Joined: Jul 2008
Posts: 24
Russia

Re: Pathfinder [Re: mr_x] #296328
10/30/09 22:59
10/30/09 22:59
Joined: Mar 2006
Posts: 2,252
Hummel Offline
Expert
Hummel  Offline
Expert

Joined: Mar 2006
Posts: 2,252
now it works wink
cnacubo xP

Re: Pathfinder [Re: Hummel] #296333
10/30/09 23:55
10/30/09 23:55
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
i think i´ll use this, when i´m able to get my Dungeon Keeper Code to work ^^


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Pathfinder [Re: Espér] #301490
12/11/09 02:38
12/11/09 02:38
Joined: Sep 2008
Posts: 68
T
Tai Offline
Junior Member
Tai  Offline
Junior Member
T

Joined: Sep 2008
Posts: 68
Any advice for implementing string-pulling?

Page 2 of 5 1 2 3 4 5

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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