TAVERN system (a new VM)

This is a new VM. Currently nearly everything is written (an implementation in BASIC also exists, although it is on a separate disk and is not available at this time), although the adventure game standard library and parser extension for the standard compiler are only written a little bit so far. Everything else does exist. The entire system is in the public domain.

Look at http://zzo38computer.org/fossil/tavern.ui/ and on the “if/programming/tavern” ifMUD channel for more information. Post bug reports and feature requests and other stuff on there too please. You can also add comment on here.

Here is an example file. Note that SELF-INSERTING-BREAKS and VOCAB are irrelevant here because this program has no ACCEPT instruction (it only displays an object tree and exits); if it did accept, then they would be used for lexing the user input.

[code]\ This is a testing file.
\ This file is public domain.

INCLUDE standard.inc

SELF-INSERTING-BREAKS ,/
1 VOCAB ONE
2 VOCAB TWO
3 VOCAB THREE
4 VOCAB FOUR
5 VOCAB FIVE

PROPERTY /NAME
PROPERTY /COUNTER

<<<OBJECT NAMED .KITCHEN
R| Kitchen| =/NAME
32 ==/COUNTER
CONTENTS(
<<<OBJECT NAMED .CUPBOARD
R| cupboard| =/NAME
0 ==/COUNTER
CONTENTS(
<<<OBJECT NAMED .PLATE
R| plate| =/NAME
1 ==/COUNTER
OBJECT>>>
)OBJECT>>>
<<<OBJECT NAMED .STOVE
R| stove| =/NAME
18 ==/COUNTER
CONTENTS(
<<<OBJECT NAMED .PIZZA
R| pizza| =/NAME
5 ==/COUNTER
OBJECT>>>
)OBJECT>>>
)OBJECT>>>

<<<OBJECT NAMED .BEDROOM
R| Bedroom| =/NAME
88 ==/COUNTER
CONTENTS(
<<<OBJECT NAMED .BED
R| bed| =/NAME
42 ==/COUNTER
OBJECT>>>
<<<OBJECT NAMED .DRAWER
R| drawer| =/NAME
400 ==/COUNTER
CONTENTS(
<<<OBJECT NAMED .SHIRT
R| shirt| =/NAME
0 ==/COUNTER
OBJECT>>>
<<<OBJECT NAMED .PANTS
R| pants| =/NAME
1 ==/COUNTER
OBJECT>>>
)OBJECT>>>
<<<OBJECT NAMED .CLOCK
R| clock| =/NAME
2 ==/COUNTER
OBJECT>>>
)OBJECT>>>

: SHOW-OBJECT [ 2 LOCALS]
L2 TAB || - | L1 /NAME PROP@ TYPE || (| L1 /COUNTER PROP@ . || )\r|
L1 FIRST BEGIN ?DUP WHILE
L2 2 + OVER SHOW-OBJECT
NEXT
REPEAT
;

:START
3 .KITCHEN SHOW-OBJECT
3 .BEDROOM SHOW-OBJECT
QUIT
;[/code]

Are there any example games or tutorials for this. thanks.

The file “cavern.inc” which is a standard library for adventure games, is not yet complete. Therefore there is no example game yet unless you wish to write your own library for it. However, the VM runtime and compiler both work, and “standard.inc” works, so the example program displayed in my first message will work.

Later on, I should write documentation for the compiler and standard library (neither of which exists yet); it is also possible to collaborate such things on the Fossil wiki (login anonymously if you wish to edit the wiki and/or to add bug reports and feature requests).