• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Every 0.XX seconds in game time

Status
Not open for further replies.

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,464
1000 miliseconds == 1 second. That's why it's a MILIsecond, just like MILImeter. A 0.01 value is a centisecond, sometimes as a Jiffy in computer animation circles.

In WarCraft 3, it is useless to have an animation running faster than 1/60 times per second due to the game being processed at 60fps and not 120.

Edit: for reference, a nanosecond is a billionth of a second, so a millionth of a milisecond.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,191
The answer is time in WC3 is relative. Many people forget that most games play at "very fast" which is closer to 1.5 or 2 game seconds per real second. On the other hand the game can also play at very slow which is closer to 0.5 or 0.75 game seconds per real second.

Periodic events and timers use game time. As such with a period of 1 second they will fire every 1 game second.

If you want real time then you need to either normalize game speed (recommended, use triggers to set to Normal which should be 1:1) or use TriggerSleepAction which is more close to real time with some other inaccuracy thrown in.

Out of principle you should design game mechanics around game time as that is the most scalable and correct approach. For cinematics you should also use game time but additionally normalize game speed so that they look correct, audio syncs correctly and they are more lag resistant for multiplayer.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
for reference, a nanosecond is a billionth of a second, so a millionth of a milisecond.
This sounds odd to me... because here a nanosecond is not a billionth of a second, a picosecond is one billionth of a second...
But that is because here in the netherlands, we are one of the few that still use the proper numbers :D
10^(6*1) = million
10^(6*2) = billion
10^(6*3) = trillion
(Here is some nice stuff about the numbers... I thought UK also didnt use milliard, etc, but I may be wrong there.)
 
Status
Not open for further replies.
Top