Page 1 of 1

Hugo JavaScript Interpreter

Posted: Sat Nov 19, 2016 9:25 am
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!

Posted: Sat Nov 19, 2016 10:17 am
by RealNC
Amazing work!

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

Posted: Sun Nov 20, 2016 1:34 am
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.

Posted: Wed Nov 23, 2016 8:12 am
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.

Posted: Wed Nov 23, 2016 1:18 pm
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.

Posted: Wed Nov 23, 2016 2:10 pm
by RealNC
Hugo is what it is. If you need something with less limitations, you can use TADS.

Posted: Wed Nov 23, 2016 7:23 pm
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.

Re: Hugo JavaScript Interpreter

Posted: Mon Oct 26, 2020 9:29 am
by Ice Cream Jonsey
I have renewed http://textadventures.online for another year.

Re: Hugo JavaScript Interpreter

Posted: Mon Oct 26, 2020 5:50 pm
by Roody_Yogurt
Awesome. Thanks, man.