make ticks far less frequent
This commit is contained in:
parent
d7d25a1624
commit
d134707466
9
main.fs
9
main.fs
|
@ -32,7 +32,7 @@ create devices 0e f, -1 ,
|
|||
: old-devices devices float + ;
|
||||
|
||||
\ d/s converts a devices per second value into devices per tick.
|
||||
: d/s 1000e f/ ;
|
||||
: d/s 20e f/ ;
|
||||
|
||||
\ the variable "base-speed" is the base amount of devices added per tick.
|
||||
variable base-speed
|
||||
|
@ -112,8 +112,9 @@ S" you feel like throwing some stuff into the pool." set-message
|
|||
\ the word unlock tests to see if any unlock conditions are matched, and unlocks them if they are.
|
||||
: unlock unlock-members unlock-constructs unlock-detector ;
|
||||
|
||||
\ the word wait-tick waits a tick. Ticks are 1ms currently.
|
||||
: wait-tick 1 ms ;
|
||||
\ the word wait-tick waits a tick. Ticks are 50ms currently.
|
||||
\ 20 ticks per second
|
||||
: wait-tick 50 ms ;
|
||||
|
||||
\ devices/tick calculates the amount of devices that are to be added per tick.
|
||||
: devices/tick ( f: -- r )
|
||||
|
@ -239,7 +240,7 @@ S" you feel like throwing some stuff into the pool." set-message
|
|||
: print-rate
|
||||
2 set-precision
|
||||
\ first convert to floating point, divide by 1000 to get seconds from milliseconds, then do 1/n to get the devices/second from seconds/device
|
||||
." (" devices/tick 1000e f* f. ." devices/second)" ;
|
||||
." (" devices/tick 20e f* f. ." devices/second)" ;
|
||||
|
||||
: draw-screen-name ( i -- )
|
||||
case
|
||||
|
|
Reference in New Issue