Cathode Tan - Games, Media and Geek Stuff
logo design by man bytes blog

Friday, March 31, 2006

A Room With A Grue

In about a half hour, I cobbled together a demo of the new form fiction. Which, if anything, should show what you can do from scratch within a half hour. Although, I'm giving fair warning - it's not much. It would be dishonest to even call it pages long, it's more like a few paragraphs long. It doesn't serve as an example of a game, per se ... it's just an example of how the format works. And it's even a rough version of that, because I'm still reworking things like the rewind feature, save features and synonyms.

And as a last word - at this small size the story feels much, much different than the Lovecraft story I'm working on ... which is far more complicated. This will probably remind people of Choose Your Own Adventure more than a real world story, and less like SCUMM ... which The Brother made some comparisons to in the story he is testing.

So, be warned. This is a rough and silly example. To try it, head here in an AJAX friendly browser:

http://www.hypergrafia.com/grue/

For the webdev curious, this might not look very AJAX-like (like GMail for instance). And really, it's not. It uses AJAX to transport a large HTML document and then reduce that to only what it needs, which drastically speeds up the script.

Enjoy, and please comment away.




tagged: ,

10 comments:

Clamatius said...

Pretty cool. Bugs:

"Taking the small note your read"

(should be "you", not "your")

"The occasional footfall goes silent"

(should be "The footsteps stop" or something similar)

"a complete and rather frightening descends"

(should be "a complete and rather frightening darkness descends")

"Considering yourself quite wiley"

(should be "Considering yourself quite wily")

Also, should the available action count go down if you double-click on something but there's no interaction possible?

Winkyboy said...

Pretty cool, although I'm not sure how difficult a game you could come up with, considering that you can't come up with your own words, and the actions you can take are in a multiple-choice format.

The Infocom games were especially fun because you could think up something to do, and the game would quite often respond to it, often in a hilarious manner.

Regardless, that sample was very cool.

Deacon said...
This comment has been removed by a blog administrator.
Deacon said...

This is pretty great. I prefer the double-clicking to the traditional typing, if only because I typically end up typing out endless variants of an action before something happens.

Do you have some way of keeping track of game time with this program? I wonder because then you could have timed/random events.

Patrick said...

Like Clamatius said, losing an action on a dead work is a bad deal, you need to get rid of that.

The nice thing about IF is that most of your bugs are typos, much easier to squash.

The writing is nice and whimsical, I got a little chuckle out of it.

As for the form itself, it reminds me a lot of "The Witch's Yarn" approach to interactive fiction, entirely noun-based, or in your case almost entirely noun based. You could have more plurality in the verbs you offer, but since your content is literal text, you should be aware that your content load will go up exponentially the more verbs you offer.

Its interesting though, if you're willing to put a LOT of time in you could get a fun product out of it.

I hate to be the Storytron evangelist, but Crafword's approach is much more practical and recombinant. Storytron content consists of reaction scripts to verbs, which includes possible verb options to select in response. This way you write one big script for every verb and go back and tweak as needed, and its totally modular. Storytron also includes a basic form of temporal tracking and history keeping, so theres a sense of memory involved.

That all said, this would be an interesting other approach, much more textually intimate at least, but you've got your writing cut out for you.

Josh said...

Sorry for the delayed response, I've been on the road. Unfortunately can't update the site in any easy fasion right now either, otherwise I could quickly clean up Clamatius' list (which, btw, just earned you a spot on the shortlist for previewing the other piece)

I didn't get a chance to review/edit before I left work sadly ... will have an updated or different demos up on Monday.

Onto the questions/comments:

Yeah, the action count could easily not go down for "misses". I've played with it before (it's like commenting a line in the script), so I can give that a go. This is on mechanic I'd leave to public opinion.

Winkyboy: It's hard to describe how the difficulty can be adjusted with this demo. Let's just say that to uncover all the possible endings in Carter, it takes some fairly complicated and well thought out actions.

As the script is now, it could probably form puzzles about the same difficulty as say, SCUMM style adventures.

Deacon: It's all javascript, so it would just be a matter of adjusting the data file. You could fairly easily create a global variable for it (or I could add one generically). You could also setup simpler random events or outcomes (The Lovecraft piece has one) just based on the Math.rand functionality.

Also, it would be fairly easy to build off this base to add in new factors. The next piece I might work on, for instance, is the Tell Tale Heart ... which would have a guilt meter.

Patrick: "This way you write one big script for every verb and go back and tweak as needed, and its totally modular."

I started with something more akin to that. In fact, the first AJAX engine I was writing for this was basically a bunch of hooks which allowed for scripts for any noun or verb.

I haven't used Storytron, so I'm certainly not going to critique. I doubt I would want to anyway ... I don't think there is anything wrong with the storyworld approach and definately believe it has advantages.

The switch is here that to make the story more versatile basically requires more prose ... not more code. The level of code required against the amount of prose is minimal.

But as I get more out there, it's probably a discussion easier to go into detail over time. Besides, it's dinner time :)

Josh said...

Corvus, I can definatley not vouch for Konqueror. I would expect an updated version of Firefox for Linux should work OK, but I can't verify.

Josh said...

So if you open and close the "info" prompt, the options prompt works OK? That's an odd one, but might be enough of a clue that I can fix it blindly. I'll take a look.

It might not even be AJAX. In fact, if you are seeing the info text and the story text, and not seeing "into text" in the story block constantly, then the AJAX portion is running fine, since I'm just using the MSXML object to ferry incoming HTML and nothing else. Might be a default issue with display style on the divs.

Kamen Nedev said...

This is cool (I was never a fan of Javascript, but this is exceedingly well made, albeit a short demo).

The interface (clicking on words/nouns, etc.) reminds me somewhat of Zarf's "The Space Under the Window" (which is probably a bit less "classic-IF" than this, but still...).

For web deployment (and if you like that kind of stuff anyway), I like to use the Zplet interpreter, which allows me to stick an IF piece anywhere in a website. Although I suppose you're already aware of that.

Best,

Kamen

Josh said...

Yeah, I can see the TSUTW analogy, although I do hope it's a tad more predictable :). OK, maybe this particular one is not since it is so slipshod ... however one of the realizations that lead me down this path was that oftern there were actually very few legitimate interactions with a single noun and that much of the potential versatility was going to simple trial and error.

So instead of "Take mailbox (You can't take that). Beat mailbox (I don't understand 'beat'). Attack mailbox (The mailbox has done nothing to you). Open mailbox (You open the mailb...)" ... I've reduced it down to the (hopefully) logical intentions.

I had considered, prior to the more pure Zork style AJAX attempt, to do use AJAX as a gateway to a full blown intrepreter. For the short term, though, things like the Zplet and PHP gateways will be more robust forms of delivery, cross-platform wise.

The real benefit here is that like 80% of the development can be done in HTML alone, and very simple HTML at that, and the javascript is fairly basic as well. Once I get Carter out the door, I'll probably do a dev tutorial.