Page 3 of 4

Re: The hobbit: developing the parser

Posted: Fri Apr 13, 2018 10:08 pm
by Wall_Axe
this bit from the WL readme might interest some:
this is how the hobbit stores objects?

(7) - The Objects
=================
The object database is (beside the room and dictionary database) one of the
core items of the game. The following informations are stored for each object:

Object Number: the game's internal object reference number (NPCs are >= 60d).
Name: the object's full name (a noun and a maximum of two adjectives).
1L (first location): most objects do only appear in one location, which is
referenced here as room number (see game map). Some objectes (eg. doors) are
visible from more than one room, in this cases only the first room is
indicated.
# (number of): how many times the object appears in the game.
MO (mother object): if an object is carried or enclosed within another object
this object is referenced by its object number (or 0xFF if this is not the
case).
Vo (volume): the object's volume.
Ma (mass): the object's mass.
04 (property with offset +04): currently unknown
St (strength): the object's strength (eg. used in fighting)
06 (property with offset +06): currently unknown
Attributes (each object has 8 binary attributes associated with it):
v: visible
A: animal (otherwise it is an object)
o: open (otherwise it is closed)
*: gives light
b: broken (or dead for animals)
f: full
F: it is a fluid (water, wine)
l: locked

Re: The hobbit: developing the parser

Posted: Mon Apr 30, 2018 11:14 pm
by MrPixel
interesting

Re: The hobbit: developing the parser

Posted: Thu May 03, 2018 10:09 am
by hikoki
MrPixel wrote:
Mon Apr 30, 2018 11:14 pm
interesting
even better playing it like a hangman or wheel of fortune :)

Re: The hobbit: developing the parser

Posted: Thu May 03, 2018 1:47 pm
by Nomad
I figure this was the only way you could practically do a Plotto style interactive fiction game/RPG on the spectrum.

https://www.brainpickings.org/2012/01/06/plotto/

Re: The hobbit: developing the parser

Posted: Wed May 09, 2018 5:44 pm
by MrPixel
how does that help? just curious

Re: The hobbit: developing the parser

Posted: Wed May 09, 2018 6:56 pm
by Ralf
I figure this was the only way you could practically do a Plotto style interactive fiction game/RPG on the spectrum.
how does that help? just curious
Yes, could you elaborate more on it?

I've read the text in the link and it's actually an interesting subject of building some system of classification for book plots. I recall the similar things were done for example for fairytales which often have common, recurring motifs.

But how does it relate to Hobbit and Zx Spectrum? ;)

Re: The hobbit: developing the parser

Posted: Wed May 09, 2018 7:10 pm
by Nomad
Ok that is a fair question.

The Hobbit encoded the data this way to be as compact as possible - this saved space but this made easy fan translations difficult (you are not looking for strings any more - you have to re-design the whole parser.)

Think of the advantages of creating a program this way - you tokenize whole parts of the sentence that you can re-assemble as you need. This enables you to pack a lot more data than you would have otherwise been able to with simple strings.

When you think about this technique, an obvious application is to use it for stuff like Plotto. To try and digitize plotto using standard string storage wouldn't work because it would take up way to much space even on a disk system. So what I am saying is probably the only way you could get a digitized version of plotto on the spectrum would be to use the same type of tokenizer/parser method that the hobbit used.

Now why would you want to do this - well as far as interactive fiction or RPG goes, Plotto can give you a very rich almost never ending set of story possibilities. Lots of TV shows and pulp stories were written with this method. Perry Mason is probably one of the best known examples. Others that have been suspected to use Plotto were many of the Perry Rhodan stories - how else do you write 30-50k words a fortnight for years without some sort of help like this? :lol:

I am not sure its been attempted on the spectrum, but what I am saying is by using the same technique that the hobbit used, you could at least come close.

Re: The hobbit: developing the parser

Posted: Wed May 09, 2018 8:26 pm
by Bizzley
Nomad wrote:
Wed May 09, 2018 7:10 pm
Others that have been suspected to use Plotto were many of the Perry Rhodan stories - how else do you write 30-50k words a fortnight for years without some sort of help like this? :lol:
The Perry Rhodan stories were written by a team of rotating authors so it's no wonder they could come up stuff so quickly, but it's chicken-feed compared to the old pulp authors. Walter B.Gibson aka Maxwell Grant was reportedly knocking out 10,000 words a day single-handedly when he was writing his 280+ Shadow novels and that was in addition to his other book, comic and magic writing commitments. When you were paid by-the-word it was quantity not quality that mattered, an accusation that was often aimed at the pulps, but if Plotto is reponsible for the Rhodan works then it's not a good advertisement. As those of us who've managed to read more than a few of them or sat through the awful 'Mission Stardust' film can attest to.

Re: The hobbit: developing the parser

Posted: Thu May 10, 2018 7:17 am
by Nomad
Yea you have a good point, the pulp writers knew how to not just write a lot but write stuff that they knew they could sell to the magazines. That is why I laugh when people complain they have writers block or talk about how they are warriors for writing 4k words over a weekend. I think to myself 'Dude, guys wrote 30k space operas in the same time period.. and they got paid.. then the next week write a western or war story..' :lol:

Still; I think Pixel is going out of his mind with this going off topic. :lol: So I will leave it.

Re: The hobbit: developing the parser

Posted: Thu May 10, 2018 4:46 pm
by R-Tape
Nomad wrote:
Thu May 10, 2018 7:17 am
That is why I laugh when people complain they have writers block or talk about how they are warriors for writing 4k words over a weekend. I think to myself 'Dude, guys wrote 30k space operas in the same time period.. and they got paid..
I heard a summary of writers' block recently that I quite liked, it was along the lines of “it’s not that you can’t write, it’s that you aren’t willing to write badly”. I never liked the often made comparison to other professions though – “e.g you don’t get Plumbers' block”, maybe it applies a bit for the total hackwork, but generally don't think creative stuff can be compared.

For the Spectrum, we have Automatic Muse, but there are much better ones on the web, I like this one.

(Writer's or Writers' block? Opted for the latter as it's an affliction of writers as a whole...)

(Slightly OT, sorry MrPix)