The hobbit: developing the parser

The place for codemasters or beginners to talk about programming any language for the Spectrum.
MrPixel
Microbot
Posts: 170
Joined: Sat Mar 24, 2018 7:42 pm

Re: The hobbit: developing the parser

Post by MrPixel »

one last thing. i sent a few sna. files to the admin and he has been having trouble opening them. is there a way to convert sna. files to a form that he can open? i send them and he said that it just wouldn't open. i tried Zip files, i tried tzx, no result. any ideas?
User avatar
PeterJ
Site Admin
Posts: 6873
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: The hobbit: developing the parser

Post by PeterJ »

Which emulator are you creating them from [mention]MrPixel[/mention].

Talk us briefly through the process you are following. Can you load the files back into your emulator?

The ones you sent us seemed to completely crash Fuse and lock my PC which was very impressive!

As [mention]Nomad[/mention] said get yourself a Dropbox account and share the file here.
User avatar
R-Tape
Site Admin
Posts: 6402
Joined: Thu Nov 09, 2017 11:46 am

Re: The hobbit: developing the parser

Post by R-Tape »

MrPixel wrote: Wed Apr 11, 2018 6:13 pm one last thing. i sent a few sna. files to the admin and he has been having trouble opening them. is there a way to convert sna. files to a form that he can open? i send them and he said that it just wouldn't open. i tried Zip files, i tried tzx, no result. any ideas?
I didn't see a .sna file, perhaps an email got buried. I only got the .TZX with no code blocks or header.

Feel free to email me another snapshot (in your emulator of choice with the BASIC visible or the game running properly, go Save As, and pick one of the snapshot options). When you email let me know what kind of game it is (ZX81, 48K)
MrPixel
Microbot
Posts: 170
Joined: Sat Mar 24, 2018 7:42 pm

Re: The hobbit: developing the parser

Post by MrPixel »

i sent it
User avatar
jmk
Drutt
Posts: 26
Joined: Mon Nov 13, 2017 2:23 pm

Re: The hobbit: developing the parser

Post by jmk »

I helped to debug the Dragon/CoCo (6809) port of The Hobbit and I have to agree that the code is unintuitive.

It would be a difficult task to convert the code from Z80 to 6502, certainly not a task for a beginner. However, there are conversions of The Hobbit to 6502-based systems like the C64, Apple 2, BBC Micro and Oric. If you can find the source code to any of them, that would be a much simpler task.
Just like before, it's yesterday once more.
MrPixel
Microbot
Posts: 170
Joined: Sat Mar 24, 2018 7:42 pm

Re: The hobbit: developing the parser

Post by MrPixel »

i'd have an easier time writing a better basic for the commodore vic 20 to be honest. i;ll save the porting jobs for when i have more experience
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: The hobbit: developing the parser

Post by Nomad »

Image

:shock:
MrPixel
Microbot
Posts: 170
Joined: Sat Mar 24, 2018 7:42 pm

Re: The hobbit: developing the parser

Post by MrPixel »

Nomad wrote: Thu Apr 12, 2018 5:32 am Image

:shock:
:?:
spectron
Drutt
Posts: 25
Joined: Thu Mar 29, 2018 3:27 pm

Re: The hobbit: developing the parser

Post by spectron »

You might want to take a look at this:-

http://members.aon.at/~ehesch1/wl/wl.htm

"WILDERLAND (WL) allows you to see what's REALLY going on in this wonderful world created by Veronika Megler and Philip Mitchell in 1982 at Melbourne House. It runs the original game code in a rudimentary Spectrum emulator, while displaying the state of objects and animals, the current positions of the latter, and a log what all the other creatures (NPC) do while Bilbo is in one place. "
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: The hobbit: developing the parser

Post by Nomad »

MrPixel wrote: Thu Apr 12, 2018 4:11 pm :?:
Your plan is to create a optimized version of BASIC for a machine with ~3k or free memory (stock).

Sure you have the whole Jack T biz deal to explain why commodore basic sucked so bad but you got to ask yourself 'what benefit would years of work revising vic-20 basic get me?) A custom rom project.. People tried that before on retro systems and after a ton of work usually they are the only ones that ever use these optimized BASIC roms.

Why not just write a program for the VIC-20 if that is what you want to do? instead of doing something that strikes me as underpants gnome logic.

Image

You got to think of the community associated with a system - ZX Spectrum people are some of the most welcoming and tolerant of beginners, plus they have active forums. At the other end of the field Commodore. Atari is somewhere in the middle.

It's totally your choice what you decide to do fella - it just seems to me to make a whole lot more sense to stick around, design a program with a game editor and get some experience under your belt. Then you will have a better idea where to go next. You want to develop for different systems go for it but you got to factor in tolerance of beginners that don't exhibit savant level skills in the community. :lol:
Wall_Axe
Manic Miner
Posts: 500
Joined: Mon Nov 13, 2017 11:13 pm

Re: The hobbit: developing the parser

Post 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
MrPixel
Microbot
Posts: 170
Joined: Sat Mar 24, 2018 7:42 pm

Re: The hobbit: developing the parser

Post by MrPixel »

interesting
hikoki
Manic Miner
Posts: 576
Joined: Thu Nov 16, 2017 10:54 am

Re: The hobbit: developing the parser

Post by hikoki »

MrPixel wrote: Tue May 01, 2018 12:14 aminteresting
even better playing it like a hangman or wheel of fortune :)
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: The hobbit: developing the parser

Post 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/
MrPixel
Microbot
Posts: 170
Joined: Sat Mar 24, 2018 7:42 pm

Re: The hobbit: developing the parser

Post by MrPixel »

how does that help? just curious
Ralf
Rick Dangerous
Posts: 2283
Joined: Mon Nov 13, 2017 11:59 am
Location: Poland

Re: The hobbit: developing the parser

Post 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? ;)
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: The hobbit: developing the parser

Post 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.
Bizzley
Microbot
Posts: 124
Joined: Thu Nov 16, 2017 10:47 am

Re: The hobbit: developing the parser

Post by Bizzley »

Nomad wrote: Wed May 09, 2018 8:10 pmOthers 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.
"He made eloquent speeches to an audience consisting of a few depressed daffodil roots, and sometimes the cat from next door."
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: The hobbit: developing the parser

Post 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.
User avatar
R-Tape
Site Admin
Posts: 6402
Joined: Thu Nov 09, 2017 11:46 am

Re: The hobbit: developing the parser

Post by R-Tape »

Nomad wrote: Thu May 10, 2018 8: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)
hikoki
Manic Miner
Posts: 576
Joined: Thu Nov 16, 2017 10:54 am

Re: The hobbit: developing the parser

Post by hikoki »

User avatar
R-Tape
Site Admin
Posts: 6402
Joined: Thu Nov 09, 2017 11:46 am

Re: The hobbit: developing the parser

Post by R-Tape »

hikoki wrote: Mon May 28, 2018 1:23 pm Endless Story
Not very sophisticated but I quite like this, the idea could be developed a lot.

My English translation needs a bit of work though...

Image
User avatar
djnzx48
Manic Miner
Posts: 730
Joined: Wed Dec 06, 2017 2:13 am
Location: New Zealand

Re: The hobbit: developing the parser

Post by djnzx48 »

Well that escalated quickly... :shock:
hikoki
Manic Miner
Posts: 576
Joined: Thu Nov 16, 2017 10:54 am

Re: The hobbit: developing the parser

Post by hikoki »

The diagram this demo is based on can be found on this old book which MarcosC mentions on his blog: https://archive.org/details/superintelligent00berr
I wonder how DaveR would develop this idea. Perhaps some way for the user to feed the A.I. from outside with new words and branches?
hikoki
Manic Miner
Posts: 576
Joined: Thu Nov 16, 2017 10:54 am

Re: The hobbit: developing the parser

Post by hikoki »

Image
Beep!Beep!
Post Reply