Would it be practical to create a virtual machine using ugBASIC? Would it be fast enough?
I'm thinking of something like Infocom's Z-Machine or Level 9's A-machine, which were designed to allow the same byte code to run text adventures on multiple 8-bit computers.
Would writing a virtual machine be practical?
-
- Site Admin
- Posts: 171
- Joined: Fri Oct 06, 2023 8:25 pm
Re: Would writing a virtual machine be practical?
Hi wysardry!
In reality it is opposite to the philosophy of ugBASIC: with ugBASIC you can use the language itself to write the game, and porting is the adaptation of what you have written with respect to the (small) differences. Thus it would always have maximum speed in all environments.
A virtual machine is the lazy solution to the problem of running the same software on multiple machines, and leads to a result that does not always live up to expectations. If I remember correctly, the Z-Machine is designed for a certain type of adventure (like "typed prompt" or something like that). Then the SCUMM approach is better which, however, suffers from the same problem of having an interpreter.
Re: Would writing a virtual machine be practical?
Yes, the Z-machine is a virtual machine with a narrow focus that was designed for use with a domain specific language (ZIL) for creating parser-based text adventures, such as Zork.
SCUMM and ScummVM were designed to create point and click adventure games, such as Maniac Mansion.
I'm not a huge fan of virtual machines, but many of the existing text adventure creation tools use them. Most text adventure interpreters and virtual machines are written in assembly code, which makes porting them to new machines more difficult.
SCUMM and ScummVM were designed to create point and click adventure games, such as Maniac Mansion.
I'm not a huge fan of virtual machines, but many of the existing text adventure creation tools use them. Most text adventure interpreters and virtual machines are written in assembly code, which makes porting them to new machines more difficult.