Skip to content

Instantly share code, notes, and snippets.

@andrewschultz
Created October 22, 2015 01:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewschultz/eafc2d9913686198bd07 to your computer and use it in GitHub Desktop.
Save andrewschultz/eafc2d9913686198bd07 to your computer and use it in GitHub Desktop.
stripped Hugo file from Jon Blask
!::
! New Game (Shell)
!::
! new grammar needs to be defined before the including verblib
#include "verblib.g" ! Verb Library
#include "hugolib.h" ! Standard Hugo Library
!:: Game Initialization routine
routine init
{
cls
verbosity = 2
counter = -1 ! 1 turn before turn 0
STATUSTYPE = 1 ! 1 = score/turns, 2 = time, 3 = moves: score:
prompt = ">"
DEFAULT_FONT = PROP_ON
player = you
location = STARTLOCATION
Font(BOLD_ON)
"ldod"
Font(BOLD_OFF)
"by A Trizbort User"
MovePlayer(location)
}
!:: Main game loop
routine main
{
counter = counter + 1
run location.each_turn
runevents
RunScripts
if parent(speaking) ~= location
speaking = 0
PrintStatusLine
}
player_character you "you"
{}
room STARTLOCATION "Start Location"
{
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment