Message Board


Message Board > Fenix / Bennu / Gemix / DIV > Fenix Timeout

August 22, 2006, 15:15
g105b
None
86 posts
Okay, I have a pathfinding program that works by going along the lines of "if the path is too complicated for fenix to work out, I'll shorten it and try to work that one out first."

But by the time you know if the path is too complicated, the program has crashed because it hasn't been updating the frames at all because of the complicated, CPU heavy pathfinding options.

Is there some way I can limit Fenix to a certain length of time before .. giving up on a command?
____________
.g105b''
#
August 22, 2006, 16:59
Woody
HEAD BLACK MAN
722 posts

Do you mean you're using Fenix's built-in pathfinding or your own algorithm? I doubt there's much hope in path_find, but surely you can interrupt your own process after a certain number of iterations?
____________
boredome is the bitter fruit of too much routine
#
August 22, 2006, 17:19
Eckolin
Quite Whiskered
388 posts

Giving up on a command would cause so many problems elsewhere. I doubt it's supported.

[Edited on August 22, 2006 by Eckolin]
____________
Maker of Games...
Wisdom is supreme; therefore get wisdom.
Need help with coding? I probably wrote something similar.
#
August 22, 2006, 23:25
Rhovanion
Exterminated
666 posts
if you want to use your own pathfinding algorithm instead of fenix's, you should program it in SDL or C because you can use threads there and do multiple commands at once.
____________
#
August 23, 2006, 14:53
g105b
None
86 posts
alright thanks people, I didn't expect fenix to have a timeout command, but I'm sure there was something like it in DIV or DIV2.

Never mind, I'll get round the problem another way.
____________
.g105b''
#
August 23, 2006, 19:31
MadMax
None
18 posts
I seem to remember from my DIV programming days that you could use a number behind FRAME in a process to do just that.
____________
#
August 25, 2006, 02:51
Rincewind
programmer
1546 posts

Quote:
But by the time you know if the path is too complicated, the program has crashed because it hasn't been updating the frames at all because of the complicated, CPU heavy pathfinding options.

Is there some way I can limit Fenix to a certain length of time before .. giving up on a command?


Are you sure you haven't just forgotten to place a frame in that loop? Have a loop without a frame and the program is guaranteed to crash after a little time, so also put a frame there if you aren't doing anything graphical in the loop.

And as an easy alternative to the Fenix pathfinding you can use Sandman's WPF (Water pathfinding) dll, get it here.
____________
Personal website: http://www.loijson.com
#
August 27, 2006, 00:24
yonni
None
420 posts
just found in my old DIV1 manual there's a global variable "max_process_time" (measured in 1/100's of a second). If a process exceeds this time DIV would throw an error message. Never used it before, but flamebrid 2 (with fenix syntax highlighting) recogises it, might be worth a go.

[Edited on August 27, 2006 by yonni]
____________
#
August 28, 2006, 12:33
Rhovanion
Exterminated
666 posts
Does anyone know if Fenix project is dead or what?

At least, it's slow.

btw, I used MaxMax's method too in early days. You can also use that technique to create progress bars etc...
____________
#
August 29, 2006, 13:55
g105b
None
86 posts
Quoting yonni:
just found in my old DIV1 manual there's a global variable "max_process_time" (measured in 1/100's of a second). If a process exceeds this time DIV would throw an error message. Never used it before, but flamebrid 2 (with fenix syntax highlighting) recogises it, might be worth a go.


That's it! That is the command I was trying to remember. Thanks I'll give it a try.


Rincewind, Sandman's dll seems to be much quicker than the actual Fenix pathfinding, and of course it has more depth. How come I've never heard of it before..
____________
.g105b''
#
August 30, 2006, 17:19
Rhovanion
Exterminated
666 posts
You might still want to use the frames because people might think their program has crashed if the time is too long.
____________
#
August 31, 2006, 00:01
Sandman
F3n!x0r
1194 posts

g105b: you are in luck, because recently I started coding on the pathfind DLL again. If you only need standard 2 dimensional pathfinding, the current one is nice for the time being, though upcoming includes waypointed and weighed pathfinding.
____________
BennuWiki
Yes, my avatar has grey borders in IE (so get a decent browser)
ROOFLEZ ROOFLEZ
#
August 31, 2006, 15:53
g105b
None
86 posts
Cool sounds interesting, let me know how it progresses. I have found a way round the probleem I have been having but I'm sure your dll will cut a lot of messy script out.

Cheers.
____________
.g105b''
#

Message Board > Fenix / Bennu / Gemix / DIV > Fenix Timeout

Quick reply


You must log in or register to post.
Copyright © 2005 Booleansoup.com
Questions? Comments? Bug reports? Contact us!