Why has Dreamseeker been resently taking over half my CPU Usage PER dreamseeker? It used to take like 10% for 2 put together. Can someone make sense of this?
Yeah, Aaiko hates hosting Seika 2 because his CPU Usage jumps to 100% and doesn't wanna move from it. And when someone joins, you can't do anything for about 10 minutes.
That's actually painful. If it jumps to 100%, it's probablary because of several infinate loops, several NPCs and an inefficient character generation and world/New().
But that should basically do the same as step_rand without the diagnal walking.
Nope, not quite. step_rand() uses an edge-following system which makes the AI only change direction at semi-random intervals or when the next step would take it into a dense object. This usually produces a more "aimless" random movement system, instead of a "mindless" random movement system, but has a disadvantage that, unless you force the AI to pause and change its direction manually, it can -- possibly -- eventually wind up just walking in a fairly continuous loop around the edges of the map.
Deadron has his own routine, dd_step_rand(), which provides an excellent mix between random mindlessness and deterministic aimlessness -- and offers more parameters than the typical step_rand() proc, allowing you more flexibility. I'm not sure which library it's in, however, so you might have to do some digging.
Actually, I think its more of a Virus, for the CPU problem, Because recently, ive actually ADDED more monsters that use my rand_walk, and the CPU has gone down 20%. Either way, wehn I get home ill check more...
Poor programming.