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: Ice Cream Jonsey, AArdvark

ICJ

Hugo JavaScript Interpreter

Post by ICJ » Sat Nov 19, 2016 9:25 am

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: 1454
Joined: Wed Mar 07, 2012 4:32 am

Post by RealNC » Sat Nov 19, 2016 10:17 am

Amazing work!

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

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

Post by Tdarcos » Sun Nov 20, 2016 1:34 am

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.
"Shirt them a-tear up, trousers is gone/don't want to end up like Bonnie and Clyde."
-Desmond Dekker, The Israelites

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

Post by Ice Cream Jonsey » Wed Nov 23, 2016 8:12 am

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: 5532
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Post by Tdarcos » Wed Nov 23, 2016 1:18 pm

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.
"Shirt them a-tear up, trousers is gone/don't want to end up like Bonnie and Clyde."
-Desmond Dekker, The Israelites

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

Post by RealNC » Wed Nov 23, 2016 2:10 pm

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

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

Post by Tdarcos » Wed Nov 23, 2016 7:23 pm

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.
"Shirt them a-tear up, trousers is gone/don't want to end up like Bonnie and Clyde."
-Desmond Dekker, The Israelites

Post Reply