Quote:
Originally posted by Com013
Sure. And then I'll run to Stefan complaining that the NPC Server is too laggy. In each level with water a fighting fish could apear. That means in each level I need an NPC having constantly timeouts.
|
Sure, if you wanna tackle the problem in a stupid way. Instead of repeatedly sampling a random number, why not use the Poisson distribution to predict the average time to next spawn and then apply a standard deviation to that? Then simply set timeout to that new quasi-random time and spawn the fish when the period has elapsed.