about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2024-04-28 16:34:51 -0400
committerelioat <elioat@tilde.institute>2024-04-28 16:34:51 -0400
commit28e03ac7d36ad839e1510ebf5462f57124c9836a (patch)
tree0dea56554d9810d44de1c56ce937d418facfd84f
parent424301cbbe01a608cf7df8f4b3c9c2f856aa1740 (diff)
downloadtour-28e03ac7d36ad839e1510ebf5462f57124c9836a.tar.gz
*
-rw-r--r--retro/dungeon.retro13
1 files changed, 6 insertions, 7 deletions
diff --git a/retro/dungeon.retro b/retro/dungeon.retro
index 2f211bd..6032414 100644
--- a/retro/dungeon.retro
+++ b/retro/dungeon.retro
@@ -2,7 +2,7 @@
 
 ## Utilities 
 
-By leveraging the inbuilt n:random we are able to write a word to get a random number from within a range. 
+By using the inbuilt word `n:random` we are able to write a word to get a random number from within a range. 
 
 ~~~
 :n:ranged-random (lower,upper-random) over - n:inc n:random swap mod + ;
@@ -10,10 +10,9 @@ By leveraging the inbuilt n:random we are able to write a word to get a random n
 
 ## Encounter
 
-A word to determine what sort of encounter a player will have at a given location. Currently each type of encounter is evenly waited, so, just as likely as any other -- in the future I'd like to weight more heavily to some than others. A naive approach to do this would be to duplicate certain kinds of encounter in the look up table. Encounters are generated on a per-turn basis and aren't currently linked to player position in anyway -- in the future I'd like to have certain types of encounter linked to certain positions.
+A word to determine what sort of encounter a player will have at a given location. Currently each type of encounter is evenly weighted, so, just as likely as any other -- in the future I'd like to weight more heavily to some than others. A naive approach to do this would be to duplicate certain kinds of encounter in the look up table. Encounters are generated on a per-turn basis and aren't currently linked to player position in anyway -- in the future I'd like to have certain types of encounter linked to certain positions within the play space.
 
 See http://retroforth.org/examples/magic-8th-ball.retro.html
-See http://forth.works/share/65ce183c240f15ae8ca9eb7cb749d1b4
 
 ~~~
 :null-encounter 'null_encounter s:put nl ; 
@@ -21,7 +20,7 @@ See http://forth.works/share/65ce183c240f15ae8ca9eb7cb749d1b4
 :vendor-encounter 'vendor_encounter s:put nl ; 
 :aggressive-encounter 'aggressive_encounter s:put nl ; 
 :wildlife-encounter 'wildlife_encounter s:put nl ;
-:environmental-encounter 'enviromental_encounter s:put nl ;
+:environmental-encounter 'environmental_encounter s:put nl ;
 
 { [ ] (empty,_fill_offset_zero)
   &null-encounter
@@ -98,11 +97,11 @@ Here I define a very basic word to process player input and to display game ui a
 
 ## Game loop
 
-The core game loop, like most game loops, is a while loop that'll run forever as long as some value is TRUE. I never actually bother to set that value to FALSE. To quit, the player inputs "q" which triggers the in-built `bye` word to exit the loop and halt the process, returning to the host system.
+The core game loop, like most game loops, is a while loop that'll run forever as long as some value is TRUE. I never actually bother to set that value to FALSE. To quit, the player inputs "q" which triggers the word `bye` to exit the loop and halt the process, returning to the host system.
 
-Of note here is the turn word -- this is triggered at the start of each loop, after collecting the player's input. Turn isn't much more than a wrapper around process-input, the trick it pulls is to lead with an s:get (akin to Lua's io.read) to read-in whatever is input to stdin by the player. Once input is read in a new "turn" starts (increasing the turn count in Global.turn) and then clearing the display. Clearing the display ensures that the display is only ever showing state for the currently active turn.
+Of note here is the word `turn` -- this is triggered at the start of each loop after collecting the player's input. Turn isn't much more than a wrapper around `process-input`, the trick it pulls is to lead with an `s:get` (akin to Lua's io.read) to read in whatever is input to stdin by the player. Once input is read in a new "turn" starts (increasing the turn count in Global.turn) and then clearing the display. Clearing the display ensures that the display is only ever showing state for the currently active turn.
 
-pos-check limits the size of the game surface to 100 x by 100 y. 
+`pos-check` limits the size of the game surface to 100 x by 100 y. 
 
 ~~~
 :pos-check