Jump to content
Halycon275

Dragon killer (WIP, need feedback)

Recommended Posts

When Infocom developed their text adventures in 1979 and onwards, they developed a virtual machine called the Z-machine which takes a game definition file (Z-code) to play. Infocom's own compiler called Zilch has never been released in public. However in 1993, Graham Nelson released the Inform compiler which takes the source code of an adventure game and compiles it to binary code that can be played on the Z-machine. Inform quickly became a very popular tool and comes in many versions targeting different sized computers, though there exists a few other tools to generate Z-code as well.

 

Basically Halycon275 is considering using a version of Inform, probably from the 1990's, to build Z-code that can be run in a virtual Z-machine on a ZX-81 computer, something that to my knowledge has not been done before. The IFWiki mentions Ozmoo for the C64 and ZXZVM for the ZX Spectrum +3, but surely there must be a few more Z-machines for 8-bit systems, or otherwise Infocom's classic adventures were rewritten/downcompiled on other systems like Atari 8-bit, Apple II etc. It might be so though that e.g. the Zork series have binaries so tightly tied to the data files that one can't really extract a standalone Z-machine from those, I don't know.

Share this post


Link to post
Share on other sites
Guest

Ok. Cool. Thanks for this Anders.

 

I knew of Infocom's VM, but not heard about 'Inform'.

---

Sounds quite ambitious to me, but fair play, we don't know how good a coder Halycon275 is, and he might well be capable of the task, with the caveat that it would need to be an expanded machine.

---

For someone who has written and re-written text adventures for three different systems (C16 +4, C64 and Spectrum 48k),

 

the whole concept of a Z-machine / VM is genius.

 

Write a text adventure. Create a Front End to edit and customise it.

Then compile the game to a nice tight compact file which then gets pulled into their custom interpreter.

 

You create a different/slightly modified version of the interpreter for each machine and every game will work 'out of the box' on each machine.

 

Wonderful!

 

I assume this is pretty much the same way SCUMM-VM works as well. Though in that case you can afford to be greedy with resources and the whole point of being small and compact has gone out of the window.
 

 

 

Share this post


Link to post
Share on other sites
8 hours ago, carlsson said:

I think it would be a huge contribution to the retro gaming world if you produce an Inform or any form of Z-machine interpreter for the ZX-81, even fully expanded. I see there is one for the ZX Spectrum +3 and Amstrad PCW8000/9000 series, not sure if you can find anything for a lesser Z80 system.

 

C cross compilers indeed exist, like SDCC or Z88DK but I don't know how well they target the '81. In any case, you would definitely look to make your game 16K if you use a compiler that will come with its own runtime overhead, compared to both using the built-in BASIC interpreter or making your custom assembly code.

how would i go about doing that? making the z machine interpreter i mean

Share this post


Link to post
Share on other sites

Well, the source code for ZXZVM was uploaded together with the executable, so if you want to take the short path you might want to work from there and adopt the code to run on your platform.

 

Or you could actually try to accomplish something reasonable, like a BASIC text adventure using a typical engine. A while ago I promised elsewhere on this forum to post some of my old code, but I haven't had enough spare time to clean it up in order to be educational enough. There should be a fair number of ZX-81 text adventures for you to decompile if you want something ready made to work from and fill with own data.

Share this post


Link to post
Share on other sites
Guest

I think it might be important to assess your current skill level in regards to coding?

I'm assuming you've good familiarity with z80 assembly?

Share this post


Link to post
Share on other sites
On 6/7/2020 at 1:33 PM, Halycon275 said:

 

so, you are a courageous knight (bear with me) that sets off on a quest to get gold. But here's the kicker, the dragon is not actually evil, the villagers are well aware of your misdeeds (thievery, attempted rape etc) and concoct a story about a helpless woman in an old house barely bigger than a barn. The dragon is jealously protective of it's gold and will kill anyone that comes near. This is my first version so far, my goal is to take what is usually expected of the genre and subvert it.

 

for instance, instead of the dragon killing you in subsequent updates, he haggles you down to 1 gold piece or decides to sue you for trespassing.  the human courts allow it and you are sent to prison, or you are forcibly turned into a dragon in turn.

 

What do you guys think. I just need feedback, no rude comments please.

dragon killer version 0.TZX 48 B · 8 downloads

Your file is empty. That's just the tape header with no data.... the snip below is the whole file, all 48 bytes of it. 

 

 

image.thumb.png.d758b46c8e17da66ca5c7c7125603ec8.png

 

Share this post


Link to post
Share on other sites
13 hours ago, carlsson said:

I'm afraid the dragon already is killed.

Troll, actually. Different mythological creature entirely. 
 

Of course, the problem is that trolls regenerate, and this one will be back with a different name, but the same game. 

  • Haha 2

Share this post


Link to post
Share on other sites

Now that would be an idea for an adventure game, catch and tame the dragon and then go into the mountains/forest/wherever to kill the trolls with help of the mighty dragon.

Share this post


Link to post
Share on other sites
Just now, carlsson said:

Now that would be an idea for an adventure game, catch and tame the dragon and then go into the mountains/forest/wherever to kill the trolls with help of the mighty dragon.

Actually, you could do just that in Ultima Online. The tamer class was super powerful - some would say a bit OP - until it was nerfed. 

Share this post


Link to post
Share on other sites

On a related note, PunyInform 1.0 was released 17 hours ago. It allows making Inform 6 based text adventures running on e.g. C64. It doesn't go below 20 kB though, so even if the driver was ported to run on the ZX-81, it would require at least a 32K (if that exists?) or 64K RAM expansion.

 

https://github.com/johanberntsson/PunyInform/releases/tag/v1_0

 

But yeah, in this particular context it is only tangentially relevant.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...