Quote:
Originally Posted by @$3.1415rin
already tried using this rdtsc stuff instead ? ok, you'll get the absolute time and not the time of your process, but maybe one could do some filtering ...
|
I almost forgot about rdtsc, thanks for reminding us!
I have not used rdtsc because I am looking for a generic method of timing events. Perhaps I'm wrong, but the rdtsc instruction appears to be cpu specific and not generic from what I read here
http://www.scl.ameslab.gov/Projects/Rabbit/menu4.html
I suppose you could write code to take into account all processors, but that's a lot of effort, and testing it requies access to each cpu type.
note that I'm not actually interested in process time, but in real time, so the performance counter is actually better than the process clock - for me anyway.
Quote:
why do you need a better timebase than the one of HL ? are the bots running better if calculating your own time ? I always thought that if the bot and the engine are based on the same time, that shouldnt make problem ... but looks like I'm wrong here hl is getting stranger and stranger ... but hey, that was always the case, right ?
|
The idea is to create code the is independant of the game engine as much as possible. I think we discussed the reasons why in another thread somewhere, but one reason is ownership (I want to actually own some of the code that I write, not give it away to companies like Valve as per their license agreement), the other is to achieve portability from one game system to another. These are BIG reasons imo to isolate the SDK and the make use of as little of the engine calls as possible.