Posted: Sat Jul 31, 2010 9:36 pm
My video card died on me recently so now is a good time to work on recreating a text mode game.
I overhauled the controls so that they can be customized.
I also added in Reload/Inventory keys bound to R/I which will #set r/i or #clear r/i depending on whether the flag is already set or not.
This means just one key to bring up the inventory in games that rely on ?+i or ?-i to access an inventory as well as ?+r/?-r for those few games that have reloading mechanics.
The configuration file is structured as "note to self this is the key", the key's scancode, and the string pressing it returns.
You'll notice F1 is bound to a line of ZZT-Oop. It will be possible for games to use custom input this way. One could just as easily avoid checking for the "i" flag and just bind the I key to "#inventory:open".
The code executed in this matter is executed by the player and any clones, whether or not I'll do something to allow multiple lines to be executed is a mystery.
I overhauled the controls so that they can be customized.
I also added in Reload/Inventory keys bound to R/I which will #set r/i or #clear r/i depending on whether the flag is already set or not.
This means just one key to bring up the inventory in games that rely on ?+i or ?-i to access an inventory as well as ?+r/?-r for those few games that have reloading mechanics.
The configuration file is structured as "note to self this is the key", the key's scancode, and the string pressing it returns.
Code: Select all
Up 273 up
Down 274 down
Left 276 left
Right 275 right
Space 32 shootflow
F1 282 #change yellow solid white fake
F2 283 null
F3 284 Save
F4 285 ScreenToggle
F5 286 Screenshot
F6 287 null
F7 288 null
F8 289 null
F9 290 null
F10 291 QuitGame
F11 292 SaveQuit
F12 293 null
P 112 Pause
T 116 Torch
I 105 Inventory
R 114 Reload
- 45 PrevBoard
= 61 NextBoard
- 269 PrevBoard
+ 270 NextBoard
/ 47 CheatCheck
LEAVE A BLANK LINE ABOVE THIS.
The code executed in this matter is executed by the player and any clones, whether or not I'll do something to allow multiple lines to be executed is a mystery.