|
4 registered members (clint000, TipmyPip, VoroneTZ, 1 invisible),
4,727
guests, and 0
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: ez_path -- for alpha testing! Simple Pathfind
[Re: clone45]
#44632
04/29/05 21:37
04/29/05 21:37
|
Joined: Aug 2003
Posts: 7,440 Red Dwarf
Michael_Schwarz
Senior Expert
|
Senior Expert
Joined: Aug 2003
Posts: 7,440
Red Dwarf
|
Quote:
Oh... bad news indeed.
My main hard drive crashed yesterday. Luckly, I'm pretty careful about backing up my files. Most everything I have is on CD. Also, the drive is now in the hands of a data recovery expert, so if it's possible for me to retrieve my files, I will.
The source code for the pathfinding .dll was on the hard drive and wasn't backed up. If the data recovery guy fails to get any information, then sadly the pathfinding code might be lost. I'm optimistic that I'll get the files back.
In any case, it may be a few days before I'm back up and running. I'll need to buy a new drive, install windows, and basically get my environment back up and running. If you don't hear from me in a while, you'll know why!!
[By the way, this won't affect Game Beep, which is completely backed up and also mirrored on the server.]
Cheers! - Bret
and you can make a A5 version of the dll 
<< very insisting 
"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
|
|
|
Added movement smoothing...
[Re: clone45]
#44635
05/02/05 22:54
05/02/05 22:54
|
Joined: Mar 2002
Posts: 580 San Francisco
clone45
OP
User
|
OP
User
Joined: Mar 2002
Posts: 580
San Francisco
|
Hello everyone! I just added a nice feature to the pathfinding package: movement smoothing. The .dll can now handle turning your entity for you, and will smooth out the turning radius so it looks more natural. The new download package contains a demo of this functionality. http://www.gamebeep.com/freebies/ez_path_src.zipALSO NOTE!! The new package prints out a "TRIAL VERSION" message on your screen. The inexpensive ($10??) non-trial version will be spam-free. In short, here's how the smoothing works: Code:
// Call pf_to_ent. This pathfinding routine takes two entity pointers as // arguments. They are the source and target entity. The routine calculates // the shortest path to the target, and sets the direction that the source // entity needs to go in order to reach it's target. // (See documentation for more information)
pf_to_ent(my, dst_ent);
// If I weren't using pf_smooth_turn, this is how I would turn my entity to // face the correct distance: // // my.pan = my._PF_PAN_TO_TARGET; // my.tilt = my._PF_TILT_TO_TARGET; // <- don't set for first person shooters // my.roll = my._PF_ROLL_TO_TARGET; // <- don't set for first person shooters
// Call pf_smooth_turn to have the pathfinding .dll turn your entity for you // in the direction of the next target node (or target entity). If you decide // to use the pf_smooth_turn feature, you may wish to increase the node // collision distance by calling pf_set_node_collision_distance(); Increasing // the node collision distance will result in the actor starting it's turn // earlier, which is a good idea if the turn takes longer because of the // smoothing.
turn_speed = 10 * time;
pf_smooth_turn(my, VECTOR(my._PF_PAN_TO_TARGET,0,0), turn_speed);
Currently, pf_smooth_turn only works on the .pan of an entity. Future versions will also smooth tilt and roll, which could be helpful in games where 3d movement is possible. Cheers! - Bret
|
|
|
Re: Added movement smoothing...
[Re: Toon]
#44639
05/04/05 16:24
05/04/05 16:24
|
Joined: Mar 2002
Posts: 580 San Francisco
clone45
OP
User
|
OP
User
Joined: Mar 2002
Posts: 580
San Francisco
|
Hi Toon!
Unfortunately, it's not for sale yet. It still needs some extra features to make it worth while, such as a "pf_to_vec()" function. I also hoped to include "dynamic A*", which will allow your actors to navigate around obstacles and other entities in the level. Plus, it needs more testing! I don't want to sell it until it has been heavily tested!
If you really need the trial version message to go away, PM me and I'll send you a version without that message. Otherwise, rest assured that I'm still making progress on this project!!
Oh, and I'll look into the level load bug today!!
Thanks for the compliment! - Bret
Last edited by clone45; 05/04/05 16:26.
|
|
|
Re: Added movement smoothing...
[Re: clone45]
#44640
05/04/05 17:02
05/04/05 17:02
|
Joined: Mar 2002
Posts: 580 San Francisco
clone45
OP
User
|
OP
User
Joined: Mar 2002
Posts: 580
San Francisco
|
Hi Toon! I threw together a quick test level and was able to switch between levels without any crashing. Did you remember to call pf_init_nodes() right after the level change? Here's the main loop that I added: Code:
while(1) { if (key_u) { level_load("pathfind_level2.WMB"); wait(1); pf_init_nodes(); } wait(1); }
If you still get the error, run the program with the -diag switch and make sure that your version is up to date. The acklog.txt file should contain: -=-=- ez_path version 0.440000-=-=- Enjoy!! - Bret
|
|
|
|