Tic: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Created page with "A '''tic''' is each time unit in-game. By default 1 second equals 30 tics. From the original source code: #define TICRATE (120) #define TICSPERFRAME (TICRATE/26) Because of..."
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
A '''tic''' is each time unit in-game. By default 1 second equals 30 tics.
A '''tic''' is each time unit in-game. By default 1 second equals 30 tics.


From the original source code:
From the EDuke32 source code:
  #define TICRATE (120)
  // this used to be TICRATE/GAMETICSPERSEC, which was 120/26 = 4.615~ truncated to 4 by integer division
  #define TICSPERFRAME (TICRATE/26)
  #define TICSPERFRAME       4
Because of truncation, the defined amount of 26 has the same effect of 30.
#define TICRATE             120
 
Because the word "tic" can mean a variety of other timing units, the less ambigious "game tic" should be preferred.

Latest revision as of 11:05, 25 July 2012

A tic is each time unit in-game. By default 1 second equals 30 tics.

From the EDuke32 source code:

// this used to be TICRATE/GAMETICSPERSEC, which was 120/26 = 4.615~ truncated to 4 by integer division
#define TICSPERFRAME        4
#define TICRATE             120

Because the word "tic" can mean a variety of other timing units, the less ambigious "game tic" should be preferred.