gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

OffTopic > Virtual-machine for text-adventure game

#163522 - zzo38computer - Sat Oct 04, 2008 3:01 am

What do you think is the best virtual-machine for text-adventure game? Can you review my new specification, called FORTAVM? Please note that the standard libraries aren't complete yet, but it should still work (although not very good) without the standard libraries. Can you make a comment of it? Is there anything ambiguous? Is there something you think is wrong with it? Is this specification clear enough to write a interpreter? Please be specific.
_________________
Important: Please send messages about FWNITRO to the public forum, not privately to me.

#163525 - nanou - Sat Oct 04, 2008 5:03 am

Since you asked: I think Z-machine is the best VM for text adventures (or just about anything else.)

I don't really care much for Forth so I'm not in a position to evaluate your work.
_________________
- nanou

#163527 - zzo38computer - Sat Oct 04, 2008 6:39 am

nanou wrote:
Since you asked: I think Z-machine is the best VM for text adventures (or just about anything else.)

I don't really care much for Forth so I'm not in a position to evaluate your work.


Z-machine is pretty good, and so is TADS. (Of course you can make a Tetris/Soviet-Mind-Game in Z-machine as well, but it isn't designed for that.) But I am making a new one which hopefully should be better than the other one.

It is possible to evaluate FORTAVM specification even if you don't really care much for Forth, I'm just wondering if the specification is consistent, and whether or not there is something missing, or comments for improvement, etc.

Are there any features you would like to see? Is something in the specification hard to understand? I would like to know if anyone has a comment about it.

And if you don't like to program in Forth, of course it is always possible to use an external compiler as well (but the specification requires that the FORTAVM interpreter can compile Forth programs, as specified in the specification).
_________________
Important: Please send messages about FWNITRO to the public forum, not privately to me.

#163529 - nanou - Sat Oct 04, 2008 7:50 am

I suppose I could go over it (not at the moment though.) I'm not sure I can offer much (if any) input, but I'll probably have time later to look it over in detail and if I can think of anything to say, I will.

At the moment, I can't think of much I'd want outside of a z-machine. I can think of some interesting interface things, but I keep coming back to the fact that the Inform library provides one of the richest textual interfaces, and the textual interface trumps everything else when it comes to I-F. I wouldn't dare hope for anyone to recreate that, so you'll have to forgive me for assuming that your project will not produce it.

I'm curious as to why the VM has to be responsible for compiling. Wouldn't it make more sense to build that on top of the VM as a program (and optionally external to it, as another program), and to target the VM with the compiled code? To me that seems to provide more freedom in all directions.
_________________
- nanou

#163545 - zzo38computer - Sat Oct 04, 2008 6:37 pm

nanou wrote:
I'm curious as to why the VM has to be responsible for compiling. Wouldn't it make more sense to build that on top of the VM as a program (and optionally external to it, as another program), and to target the VM with the compiled code? To me that seems to provide more freedom in all directions.


There is no reason why you can't have a compiler external to it. The specification even suggests that you can make compilers external to it if you want to, such as allowing Inform to compile into FORTAVM, or making a entirely new programming language, etc.

But there are reasons why a FORTAVM interpreter would have a compiler built-in as well:

  • The compiler is very simple, and doesn't have to deal with things such as syntax and stuff like that. (A lot of things, including conditionals, etc, are defined in STANDARD.4TH anyways, so the compiler doesn't have to worry about those things.)
  • You can execute code at compile-time as well as at run-time (although some commands will not work during compile-time).
  • Forth is powerful and versatile (and other virtual machines for text-adventure games don't appear to support Forth, they prefer other programming languages such as Inform).
  • A lot of the same things are done during compile-time and during run-time, so it is useful to put it together.

_________________
Important: Please send messages about FWNITRO to the public forum, not privately to me.