merge me
This commit is contained in:
parent
a715de5ee7
commit
74e38ccdc4
15
main.fs
15
main.fs
|
@ -33,9 +33,9 @@ create devices 0e f, -1 ,
|
||||||
\ d/s converts a devices per second value into devices per tick.
|
\ d/s converts a devices per second value into devices per tick.
|
||||||
: d/s 1000e f/ ;
|
: d/s 1000e f/ ;
|
||||||
|
|
||||||
\ the variable "base-devices/tick" is the base amount of devices added per tick.
|
\ the variable "base-speed" is the base amount of devices added per tick.
|
||||||
variable base-devices/tick
|
variable base-speed
|
||||||
0.5e d/s base-devices/tick f!
|
0.5e d/s base-speed f!
|
||||||
\ the variable "membercost" is the cost of hiring a new chat member. If it is zero, hiring chat members hasn't been unlocked yet. It has a change flag and is fixed-point.
|
\ the variable "membercost" is the cost of hiring a new chat member. If it is zero, hiring chat members hasn't been unlocked yet. It has a change flag and is fixed-point.
|
||||||
create membercost 0 , 0 ,
|
create membercost 0 , 0 ,
|
||||||
\ the variable "membercount" is how many chat members you've hired. For each chat member, device gain delay decreases.
|
\ the variable "membercount" is how many chat members you've hired. For each chat member, device gain delay decreases.
|
||||||
|
@ -95,7 +95,7 @@ S" you feel like throwing some stuff into the pool." set-message
|
||||||
|
|
||||||
\ devices/tick calculates the amount of devices that are to be added per tick.
|
\ devices/tick calculates the amount of devices that are to be added per tick.
|
||||||
: devices/tick ( f: -- r )
|
: devices/tick ( f: -- r )
|
||||||
base-devices/tick f@
|
base-speed f@
|
||||||
membercount @ s>f 0.5e d/s f* \ each member adds 0.5 d/s
|
membercount @ s>f 0.5e d/s f* \ each member adds 0.5 d/s
|
||||||
constructcount @ s>f 2e d/s f* \ each construct adds 2 d/s
|
constructcount @ s>f 2e d/s f* \ each construct adds 2 d/s
|
||||||
f+ f+ ;
|
f+ f+ ;
|
||||||
|
@ -117,9 +117,7 @@ S" you feel like throwing some stuff into the pool." set-message
|
||||||
|
|
||||||
|
|
||||||
\ the word game-tick runs a single tick of the game
|
\ the word game-tick runs a single tick of the game
|
||||||
: game-tick unlock
|
: game-tick unlock update-devices set-count-message ;
|
||||||
update-devices
|
|
||||||
set-count-message ;
|
|
||||||
|
|
||||||
\ TODO saving
|
\ TODO saving
|
||||||
\ the word exit-game exits the game.
|
\ the word exit-game exits the game.
|
||||||
|
@ -238,8 +236,11 @@ S" you feel like throwing some stuff into the pool." set-message
|
||||||
|
|
||||||
\ the seconds, minutes and hours words are used with skip-time in debugging.
|
\ the seconds, minutes and hours words are used with skip-time in debugging.
|
||||||
: seconds 1000 * ;
|
: seconds 1000 * ;
|
||||||
|
: second seconds ;
|
||||||
: minutes seconds 60 * ;
|
: minutes seconds 60 * ;
|
||||||
|
: minute minutes ;
|
||||||
: hours minutes 60 * ;
|
: hours minutes 60 * ;
|
||||||
|
: hour hours ;
|
||||||
|
|
||||||
\ skip-time runs x game ticks without waiting. Used for debugging.
|
\ skip-time runs x game ticks without waiting. Used for debugging.
|
||||||
: skip-time ( t -- ) 0 do game-tick loop ;
|
: skip-time ( t -- ) 0 do game-tick loop ;
|
||||||
|
|
Reference in New Issue