Hugo JavaScript Interpreter

Discuss text adventures here! The classics like those from Infocom, Magnetic Scrolls, Adventure International and Level 9 and the ones we're making today.

Moderators: AArdvark, Ice Cream Jonsey

ICJ

Hugo JavaScript Interpreter

Post by ICJ »

http://textadventures.online

Our friend Juhana developed this over the last few months. I am proud to announce his work. Hugo games now playable over the web!

User avatar
RealNC
Posts: 2244
Joined: Wed Mar 07, 2012 4:32 am

Post by RealNC »

Amazing work!

Is this a re-implementation of the engine in JS? To C-to-JS stuff?

User avatar
Tdarcos
Posts: 9333
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Post by Tdarcos »

RealNC wrote:Amazing work!

Is this a re-implementation of the engine in JS? To C-to-JS stuff?
It looks like some sort of translator because a huge compressed JavaScript package is developed. I found the binary for Tripkey, uploaded it to http://paul-robinson.us/tripkey.hex , passed that to the interpreter as the file to run, and ran it all the way through flawlessly. I kind of realized how much was missing and I might want to add some things, only the source code for Tripkey is now missing. My bad, I guess. I'll do some more intensive searches and maybe I'll find where it went.

If whoever did this chooses to release the sources to the entire system in an unobfuscated fiorm it might be useful for improving the run-time to raise it to 32-bit (or 64-bit) support, possibly to add features like string support and more built-in functions to make features (like doors and various triggers) easier to implement.

And to allow bigger adventures, such as raising the number of properties above 127, add more rooms, other things.

In any event, it is still an amazing piece of work.
Alan Francis wrote a book containing everything men understand about women. It consisted of 100 blank pages.

User avatar
Ice Cream Jonsey
Posts: 28879
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey »

It's not possible to convert the entire system to 64 bit right now.

Property limits can be adjusted in the actual source code for the game. I forget the command but it's something like MAX_PROPERTIES=1000 or whatnot. The defaults are not hard limits.
the dark and gritty...Ice Cream Jonsey!

User avatar
Tdarcos
Posts: 9333
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Post by Tdarcos »

Ice Cream Jonsey wrote:It's not possible to convert the entire system to 64 bit right now.
I said, 32 or 64. It's essentially an early 1990s design on a 16-bit base. And to realistically go above 16 bits it would require that the game file format be changed to support either 32 or 64 bits.
Ice Cream Jonsey wrote:Property limits can be adjusted in the actual source code for the game. I forget the command but it's something like MAX_PROPERTIES=1000 or whatnot. The defaults are not hard limits.
I may have to go back and look at the manuals; my memory was there is a hard limit of 127 or 128 properties.

I looked it up and found out on page 12, I was wrong, the thing I was thinking of were attributes, not properties, and of all the things to limit, the ones that are only one byte long are hard limited to 128. This was one thing I knew was a huge mistake in putting such a tiny limit on, it reduces the potential complexity of some games that might have been possible unless you resort to "overlay schemes" by which various attributes have multiple aliases. Workable, but still feels like a kluge you have to use to get around a problem with the compiler, and sure enough, that's exactly what it is.

Now, it might be possible to do one of two things: If there are any unused opcodes then that is a potential means to escape to higher bit levels (both DEC and IBM did this with their PDP-11 minicomputer and 370 and z/System mainframes, respectively; the original instruction sets had new opcodes inserted to add new functionality, old programs could still run unmodified but new programs could be run on the new hardware), or else the old format could be extended by having a new file format and new interpreter support both kinds of game files.

But that still means the compiler has to be rewritten and this is such a niche environment that it's probably not worth it for a potential audience of perhaps 50 people using the system.
Alan Francis wrote a book containing everything men understand about women. It consisted of 100 blank pages.

User avatar
RealNC
Posts: 2244
Joined: Wed Mar 07, 2012 4:32 am

Post by RealNC »

Hugo is what it is. If you need something with less limitations, you can use TADS.

User avatar
Tdarcos
Posts: 9333
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Post by Tdarcos »

RealNC wrote:Hugo is what it is. If you need something with less limitations, you can use TADS.
But I don't want to have to learn another authoring system to write interactive fiction, I want to use Hugo! </whine>

Of course the correct response is to refer me to the Rolling Stones song which begins,
I saw her today at the reception
A glass of wine in her hand
I knew she was gonna meet her connection


Whenever my girlfriend used to ask for something she wanted that I was going to say no to, I'd hum that song. It ticked her off.
Alan Francis wrote a book containing everything men understand about women. It consisted of 100 blank pages.

User avatar
Ice Cream Jonsey
Posts: 28879
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Re: Hugo JavaScript Interpreter

Post by Ice Cream Jonsey »

I have renewed http://textadventures.online for another year.
the dark and gritty...Ice Cream Jonsey!

Roody_Yogurt
Posts: 2179
Joined: Mon Apr 29, 2002 6:23 pm
Location: Milwaukee

Re: Hugo JavaScript Interpreter

Post by Roody_Yogurt »

Awesome. Thanks, man.

Post Reply