== $ npm start > ast-vm@1.0.0 start > node cli.js --- FSO Engine --- [1] Reading source intent from game_idea.txt... [2] Compiling via local cluster... > [3] Artifact saved to game_idea.md. Booting VM... ======================================== [SYS] Live Control Plane active on http://localhost:8080 You are on a beach. To the north is a jungle, to the east is a cave. > look You are on a beach. To the north is a jungle, to the east is a cave. Visible items: COCONUT > [ENV EVENT]: A stray wooden boat washes up onto the beach, carried by the tide. look boat [SYSTEM] You look the boat... > The external environment responds: It is covered in barnacles and smells of salt. It belongs to the Ocean Service, not the VM! > search You sift through the sand and find a rusty key! > take key Taken. > i [INVENTORY]: KEY > east You are in a dark cave. To the west is a passage. You are in an ancient temple. To the east is the jungle. You are in a narrow passage. To the east is the cave. You unlock the chest! You find a treasure map! > == Ok, this time easy win! But why == [SYSTEM] VM Halted. State preserved on disk. $ cat game_idea.md ```fso-state VAR INVENTORY ARR '["KEY"]' VAR PLAYER_LOCATION STR "beach" VAR room_beach_DESC STR "You are on a beach. To the north is a jungle, to the east is a cave." VAR _SPAWNED_room_beach_COCONUT BOOL "true" VAR room_beach ARR '["COCONUT"]' VAR _SPAWNED_room_beach_KEY_HIDDEN BOOL "true" VAR room_beach_HIDDEN ARR '[]' VAR _FINDTEXT_KEY STR "You sift through the sand and find a rusty key!" VAR VERB STR "EAST" VAR ARG1 STR "" VAR ARG2 STR "" VAR room_cave_DESC STR "You are in a dark cave. To the west is a passage." VAR _SPAWNED_room_cave_SPIDER BOOL "true" VAR room_cave ARR '["SPIDER"]' VAR room_temple_DESC STR "You are in an ancient temple. To the east is the jungle." VAR _SPAWNED_room_temple_SCROLL BOOL "true" VAR room_temple ARR '["SCROLL"]' VAR room_passage_DESC STR "You are in a narrow passage. To the east is the cave." VAR _SPAWNED_room_passage_KEY BOOL "true" VAR room_passage ARR '["KEY"]' ``` ```fso-code LBL start_game GLOBAL "HELP" handle_help JMP room_beach LBL room_beach ENV_FLUSH DESC "You are on a beach. To the north is a jungle, to the east is a cave." EXIT "NORTH" room_jungle EXIT "EAST" room_cave OBJECT "COCONUT" SEARCHABLE "KEY" "You sift through the sand and find a rusty key!" ACTION "OPEN" handle_open AWAIT LBL room_jungle ENV_FLUSH DESC "You are in a dense jungle. To the south is the beach, to the west is a temple." EXIT "SOUTH" room_beach EXIT "WEST" room_temple OBJECT "FRUIT" LBL room_cave ENV_FLUSH DESC "You are in a dark cave. To the west is a passage." EXIT "WEST" room_passage OBJECT "SPIDER" LBL room_temple ENV_FLUSH DESC "You are in an ancient temple. To the east is the jungle." EXIT "EAST" room_jungle OBJECT "SCROLL" LBL room_passage ENV_FLUSH DESC "You are in a narrow passage. To the east is the cave." EXIT "EAST" room_cave OBJECT "KEY" LBL handle_open JMP_IF INVENTORY HAS "KEY" open_success OUT "The chest is locked. You need a key." JMP room_beach LBL open_success OUT "You unlock the chest! You find a treasure map!" AWAIT LBL handle_help OUT "Type directions or verbs." AWAIT ```<end_of_turn>$ $ $