I just realized that rdtsc is probably inappropriate because of the fact that it continues incrementing while the game is paused, so objects can and will tick down their respawn during pause.
Switching to framecounts (as updated in GamePlay), may have some or all of the following benefits:
Reducing the total size of GameObject tags
rdtsc requires 64 tag bits, as 32 bits can only track up to about 4 seconds and 16 is basically instant
For framecounts, 16 bits at my guess at our framerate (a fully peasant 15FPS) allows a respawn time of about an hour, 13 minutes, which is a lot more than enough
Improving the cross-platform consistency of respawn times
I don't really know what determines framerate, but it's probably more consistent across machines than the processor's clock speed
Making respawn times more intuitive to work with
Clock cycles are hard to do math around and get into code
Frame counts aren't.
More consistent behavior when game is sharing CPU time
I just realized that
rdtsc
is probably inappropriate because of the fact that it continues incrementing while the game is paused, so objects can and will tick down their respawn during pause.Switching to framecounts (as updated in
GamePlay
), may have some or all of the following benefits:GameObject
tagsrdtsc
requires 64 tag bits, as 32 bits can only track up to about 4 seconds and 16 is basically instant