View Single Post
Re: Random_long(0, ??)
Old
  (#8)
botmeister
Ex-Council Member
 
botmeister's Avatar
 
Status: Offline
Posts: 1,090
Join Date: Nov 2003
Location: Canada
Default Re: Random_long(0, ??) - 07-01-2004

I agree with what PMB is saying, use as little of the engine as you can. You should try and separate your code from the engine through a clean interface.

I don't know which functions will be better, but my guess is that rand() will be faster to call. The best reason to use your own random_long (etc) is that you can reuse the code for other projects.

For example, I built all my own timing functions and I don't use the engine for timing at all. Now I can use these same functions on other projects which is nice. My code is much cleaner too, and problems that some people had with the engine timing never affected me.


Maker of the (mEAn) Bot.Admin Manager

"In theory, there is no difference between theory and practice. But, in practice, there is." - Jan L.A. van de Snepscheut
  
Reply With Quote