Feature request.

That the tool always reloads the last code when it was left.

That is, right now the system always loads Cloak of Darkness. There’s a very plausible danger to lose progress if someone accidentally hits F5.

I suggest that the system records every last change in an internal state apart from “in browser”. And the systems always recap from there.

Also, it would be awesome if the “Load from browser” button asks “Are you sure you want to load the game saved in the browser memory?”. Because of the same, people accidentally hitting that button by error and losing progress. :wink:



The reason why ternary operation works and single colon doesn’t is because having single colon to denote falsehood is contrary to every coding convention out there.

Ternary operation is useful for cases of single condition as opposed to ladder type. But if you really want to insist on ladder type coding, then there’s no problem doing it this way


That is, simply substitute the colon : with ternary op ?:

Try it and see if that helps you to overcome cognitive dissonant.

At the end of the day, it’s your language, so go ahead and do what you want. But I’m letting you know that the reason why you have so much trouble is because you went against convention and that the fix is simply adding a question mark symbol to the colon.

But it’s not denoting falsehood, it’s demarcating a clause, something the colon has been used for about 2300 years.

If I wanted to confuse programmers, I’d make a separator consisting of both parts of a ternary operator, which you cannot split up or use in the same way as a standard ternary operator, and which does something distinct from a ternary operator, but conceptually close enough to give you a false sense of familiarity.


I guess I misunderstood your intention. Never mind, then. Sorry to be a bother.

1 Like

What IS the “stuff I always recommend people do when launching a new IF system” that they do?

It just looks like typical javascript. Or am I missing something?

Yes? What about it looks like JavaScript to you? It doesn’t use C-style braces to denote blocks, OR semicolons for line endings, or really anything like javascript except maybe the “let” keyword?

My mind is a little blown that you consider it in any way like JavaScript.

Agreed! This would be super easy to accomplish with localStorage. However, it at LEAST has the “Are you sure you want to reload?” prompt!

I’d cry if I somehow hit the wrong couple of buttons and lost hours of work.

I’m glad you have a local development flow because I couldn’t use the browser for any real work for just this reason.

Tayruh was talking about the source code of Gruescript, which is indeed typical JavaScript.


That’s like saying a DSL written in C looks “like typical C”. Are you sure? I mean, can you tell what Tayruh’s point was?

Well, it’s like saying that the C source code of a DSL implementation looks like typical C, not that the DSL syntax itself looks like C.

tayruh was responding to pdxiv, who said “that’s what web code should look like (in my opinion)”.

And the point was that tayruh did not find it obvious why pdxiv considered this JS code especially exemplary in distinction to usual JS code.

With “web code”, pdxiv was not referring to Gruescript, but to the JavaScript source of the Gruescript system. He said that directly in response to Robin’s post about the repository containing the JavaScript source for the Gruescript system.
And pdxiv actually agreed with tayruh’s assessment and further explained what he had meant, by following up the “web code” comment with “It’s enjoyable when something is quick to read and that runs quickly without many external dependencies. It’s a work-related injury. I’m used to seeing heavy frameworks”.
And the later, closely related discussion also mentions jQuery.

All these comments refer not to the Gruescript syntax, but to JavaScript.

Got it. I did misunderstand.

I didn’t realize @tayruh was referring to:

that’s what web code should look like

I really thought they were talking about the Gruescript itself. Sorry to everyone involved if it came off as some kind of knee jerk defense of OP. I truly wanted to understand.



that colon/ternary debate is akin to a debate about Fortran and C… separating greater and lesser (with an equal in the middle…) with a colon is the syntax of Fortran’s arithmetic IF:

IF (X) 100,200,300

incidentally, Fortran IS the very first IF programming language…

Best regards from Italy,
dott. Piergiorgio.

1 Like

Fortran does? I don’t remember it. It’s all about .ne. .ge. and all those dotted operators. If then else endif is the structure. In fact, I don’t know any language that works like you say.

It’s more logical/consistent to say


Instead of using colon. If that’s the structure you want.

Speaking of which, Level9 has something like this:


Where the variable determines the string displayed, and it can be more than 3 as well. I don’t remember the exact syntax, but I think that’s pretty neat.

I missed this earlier, but:

  1. Make an “admirable” game in the system (not just a technology demo). Historically, the first “admirable” story for each now-successful IF platform was typically either written by the platform authors themselves, or directly funded by them. (Twine’s first admirable story by Anna Anthropy is the only exception I’m aware of.)
  2. Make it work on the web, and especially on mobile web. People keep sending around systems that only make games that work on desktop PCs; this is especially bad for IF systems developed in Python. (It’s even more rare to have a game development system that lets you develop on mobile.)
  3. Make a tool, not just a language. “You can implement your game in any text editor” is not as appealing to IF authors as some people seem to think it is.

Gruescript has checked all of those boxes.


Nothing about Graphic and Sound? Even with Inform, people keep asking about showing graphics, maps or otherwise. Certainly Twine features graphics as well.

As far as Tools go, I sense there’s a preference for Graphical Tools. Even mapping, where it used to be just index cards suffice.

That’s an interesting point! I recommend that @robinjohnson port Detectiveland fully to Gruescript, including graphics and sound and whatever else would be required to make it work.

(I assume that today you’d have to do that with the js “cheat” command…? But anything Detectiveland does should be doable in Gruescript without cheating.)

1 Like

Interesting problem. As soon as you’re telling Gruescript to refer to something external like an audio file, or an image, or a font, the author is going to have to upload their music/images/fonts somewhere. This probably also means they’re going to want to do their development offline. (Unless Gruescript, and the games it produced, lived on a server that they could upload the music/images/fonts/ to… which I’m not doing.)

I could put in some commands that play a sound or show an image, using a relative url (probably declared in the header-ish “game block”.) My reservation is that I have trouble knowing what someone without a technical background is going to think of that. As you’ve said to other tool creators, nobody’s going to learn technical skills in order to use my system. As soon as I write “put your files at this relative path, and set your browser to allow local file access, and develop offline” in the manual, suddenly it feels like I’ve made Gruescript less accessible. And the people who could do that can probably do it anyway by saying raw HTML, or cheating with js, or just hacking around in the exported file.

Maybe the answer is to make those commands and document them in a technical appendix. Hmmm.


I would definitely recommend adding those commands.

As for how they would work in the tool, the ChoiceScript IDE “solves” this problem by asking the user to login with Dropbox and synchronizing files with Dropbox. You can then provide a UI to upload an image that just drops the file in the Dropbox folder; when running the game, you serve it directly out of the Dropbox. When exporting the game, you can generate a zip containing all of the files, or you can a single-file HTML file containing all of the assets embedded as data: URIs.

EDIT: Dang it! I opened Detectiveland one too many times today and now I’ve got the Main theme thoroughly stuck in my head.

baaaaah DOP! bah, bah-du bah-du bah-du bahhhh DOP!
bum BUM bum bum, bum BUM bum bum …


Harry, the .ne./.ge. you cite is the logical IF, the one I cited was the arithmetic IF, now deprecated (don’t ask me why, but I have around 1960s Fortran IV/66 listings…)

Best regards from Italy,
dott. Piergiorgio.

1 Like