intfiction.org

The Interactive Fiction Community Forum
It is currently Sun May 19, 2013 1:50 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Thu May 03, 2012 3:12 am 
Offline

Joined: Sun Apr 15, 2012 9:48 pm
Posts: 77
I've just uploaded a new C port of Crowther and Woods' "Adventure" to GitHub. If you know how to use a C compiler, please try out the game and report any bugs to me.

This is a refactoring of Knuth's CWEB version. What's wrong with Knuth's version? Well, Knuth's version has 81 global variables and a 3000-line main() function. My new version has 42 global variables (still way too many) and its longest function is 600 lines (still way too long). This makes it small enough that David Given's old "vbccz" compiler (from way back in 2001) can compile it into something that runs on the Z-machine!!

Note that I stopped short of saying it "works" on the Z-machine. It patently does not "work", yet. Probably due to compiler bugs that I will just have to find and fix one at a time. But even the horribly glitchy current version is pretty amusing... to me. You can play it on Parchment here. The early obvious glitches can be worked around if you're clever; it's playable for quite a long ways. I only gave up when going west from the dirty passage crashed the game.

Colossal Cave: The Board Game swag is in it for anyone who finds bugs in "advent.c" or helps fix bugs in vbccz!


Top
 Profile Send private message  
 
PostPosted: Sat May 05, 2012 2:53 pm 
Offline

Joined: Sun Apr 15, 2012 9:48 pm
Posts: 77
Quuxplusone wrote:
It patently does not "work", yet. Probably due to compiler bugs that I will just have to find and fix one at a time. But even the horribly glitchy current version is pretty amusing... to me. You can play it on Parchment here.


I just squashed a very big deficiency in the C-to-Inform compiler, and now "advent.z8" runs without all those glitches! I've uploaded the new version over top of the old one, so the super-glitchy version is no longer available. Sorry. :) But now it actually "works" in Parchment, so go check it out!

I already know about one remaining compiler bug and one actual bug in my translation; I'm hoping to fix at least my own bug today. Third-party bug reports are still eagerly solicited.


Top
 Profile Send private message  
 
PostPosted: Sat May 05, 2012 3:04 pm 
Offline

Joined: Mon Jun 29, 2009 5:51 am
Posts: 288
This is very neat, and completely mad :D


Top
 Profile Send private message  
 
PostPosted: Sat May 05, 2012 5:29 pm 
Offline

Joined: Sun Apr 15, 2012 9:48 pm
Posts: 77
DavidK wrote:
This is very neat, and completely mad :D


Thanks! I feel the same way about those folks rewriting the Inform parser in Inform 7. :)

Just uploaded another new version; now I'm kicking off for the day. The "score" bug is still there, and I never saw the pirate show up in the game I just played, so maybe there's another bug lurking there. But several other bugs are fixed now.


Top
 Profile Send private message  
 
PostPosted: Sun May 06, 2012 6:18 pm 
Offline

Joined: Sun Apr 15, 2012 9:48 pm
Posts: 77
New version with a MUCH more user-friendly URL! As seen on Twitter (@ColossalCaveTBG):

http://quuxplusone.github.com/Advent/play.html

If someone with experience (zarf, I'm looking at you:)) could help me understand why @save and @restore sometimes work and sometimes hang the Parchment interpreter, I'd be very grateful. (I think the hang manifests only when I'm looking at a copy of "play.html" on my local machine, and I type "RESTORE" before I've SAVEd anything. So it could be an obscure Parchment bug. But I bet it's my own fault; I really don't understand what @save does at all. Been assuming it just saves a snapshot of the VM's entire state.)

Anyway, the source code of "advent" is still available at github.com/Quuxplusone/Advent. Bug reports still eagerly solicited.


Top
 Profile Send private message  
 
PostPosted: Mon May 07, 2012 10:32 am 
Offline

Joined: Sat Jan 23, 2010 4:56 pm
Posts: 2082
Yes, @save snapshots the whole VM. But I've never looked at how Parchment handles save data, specifically.


Top
 Profile Send private message  
 
PostPosted: Tue May 08, 2012 3:06 am 
Offline

Joined: Sun Apr 15, 2012 9:48 pm
Posts: 77
Quuxplusone wrote:
Just uploaded another new version; now I'm kicking off for the day. The "score" bug is still there, and I never saw the pirate show up in the game I just played, so maybe there's another bug lurking there. But several other bugs are fixed now.
Tonight I fixed the last bugs in my code of which I'm aware. In other words, I now believe this to be a complete, playable, winnable version of "Adventure", as written by Crowther and Woods in 1976 (except that I'm following Knuth in using not-all-capital-letters and not caring about time-of-day or wizardliness, and I've also added the commands SAVE and RESTORE for convenience, and the initial help message includes post-1976 credits).

http://quuxplusone.github.com/Advent/

Next up: Adventure 550? :)


Top
 Profile Send private message  
 
PostPosted: Tue May 08, 2012 4:14 am 
Offline
User avatar

Joined: Wed Oct 14, 2009 4:02 am
Posts: 963
Parchment uses Quetzal. It's possible there's a bug, but it's also possible you're not using the opcodes correctly. You're using a very old version of Parchment so if it is broken I won't be fixing it!

(I do need to update the Inform 7 template soon...)


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group