Well..... Some games will pause if you enter the "command mode". It depends on what you want.
The command mode will be enabled and disabled by the "~" key. When enabled, anything you type is placed on the current line. When the [ENTER] key is pressed, the command you typed is parsed and identified to do a specific thing.
So you have a routine that parses the line:
"set player 1 health 50"
you break up the line:
psudo-code
(s$ is the string line that was typed)
Command1$=find first token$(s$," ")
Command2$=next token$(" ")
.... and so on....
Command1$ will be "set"
"set" means there is something you want to set. So it may have something like this:
if Command1$="set"
rem Set is for modification of players/monsters
if Command2$="player"
rem Command3$ will be the player number
PN=val(Command3$)
if Command4$="health"
rem this means that the health will be modified
if Command5$="max"
Player(PN).Health=Player(PN).MaxHealth
else
Player(PN).Health=val(Command6$)
endif
endif
endif
if Command2$="monster"
endif
endif
if Command1$="add"
rem Add object to game
endif
That's basically how it's done. You have to make it specific to your game.
The fastest code is the code never written.