Which parser?

I think folks have pretty fully explored the different pros and cons, at least to the limits of my knowledge, but I’d just note that Inform does enable you to use real-time effects, but only via extensions, not out of the box (I don’t roll deep on extensions so I’m not sure which, if any, are considered the current gold standard. Maybe @Zed wouldn’t mind if I tag him in, since his knowledge of such things tends to be pretty robust?)

4 Likes

Basic Real Time by Sarah Morayati should do what you want, although it hasn’t been updated since 2014, so it might need an update to bring it in line with Inform 7 v10.

3 Likes

9.3/6M62 had two extensions concerned with real-time: Real Date and Time by Ron Newcomb and Basic Real Time by Sarah Morayati. 10.1 broke both of them, and no one’s been in a rush to update Glk extensions pending the forthcoming GlkKit (although it really wouldn’t be such a bother to go it alone for something that just talks to a couple of discrete glk calls like this – Real Date and Time doesn’t even depend on Glulx Entry Points).

Both have discrete scopes: Real Date and Time is exclusively about reporting the real time, and Basic Real Time is exclusively about timers, without reporting the current time (which is a more complicated thing and it’d be much easier to add current time to it than timers to Real Date and Time).

4 Likes

And if you want to get real fancy, you need to use Vorple, and that ends up becoming a non-easy learn.

2 Likes

I think base Quest is my preferred option: mainly because it’s easier, also because I don’t like JS.

2 Likes

Sorry for disappearing after starting the discussion! That’s all really good stuff, thanks. Looks like Inform is the winner, although the idea of trying to fiddle with a broken extension for a system I don’t know is very daunting. Sounds like Basic Real Time would do exactly what I needed though, if it worked…

Having said that, I noticed when playing a TADS game (specifically According to Cain) that the interpreter had a timer just sitting in the corner of the screen. Is that normal/usable/a value that can be saved in a save file? Has anyone tried it? Should I be asking specifically in the TADS section here?

1 Like

In TADS, you can use a RealTimeFuse for a one-off event (or time-limit) or a RealTimeDaemon for a repeating event.

It can be as simple as this:

showIntro()
{
    "Welcome to a short adventure!\b";

    // call myAlert after 5000 milliseconds:
    new RealTimeFuse(self, &myAlert, 5000);
}
  
myAlert()
{
    "Hello, this message should appear five seconds after the intro. Time's up! ";
    finishGameMsg(ftGameOver, []);
}
7 Likes

I think you’re referring to the turn counter. There’s no real-time clock or timer in Cain.

One difference from some other parser games is that, since there’s no scoring, I disabled the default score display. In other words, instead of seeing 0/182 on the 182nd turn, you only see 182.

Thanks for playing!

3 Likes

I didn’t even know TADS could do that.

3 Likes

Most programming language based authoring tools have a fairly steep learning curve. Personally, I think Adventuron is the quickest and easiest to learn, despite the quirky syntax. I think TADS would come next.

There are still a lot of database driven authoring tools that are still very popular in the retro world. These are much easier to learn. DAAD and TAB come to mind, but the former is more targeted at retro platforms and the latter is Windows only.

When talking about Inform, remember that there are many flavours of Inform. The main ones are:

  • Inform 6 with the standard library compiled to z-code file.
  • Inform 6 with the standard library compiled to glulx file.
  • Inform 6 with PunyInform library compiled to z-code file.
  • Inform 7 compiled to z-code file.
  • Inform 7 compiled to glulx file.

I have used the first three and am very comfortable with them, but I just don’t get Inform 7, no matter how hard I try. Even with the very simplest code, I couldn’t understand why it was doing various strange things in the game. But this was just ignorance on my part.

The important thing to note is that you will need to compile to a glulx file to include graphics and/or sound and all your resources need to be wrapped up in a gblorb file. From what I’ve read, this aspect is easy in Inform 7. However, it takes a bit of effort in Inform 6. Once you know how to do it, it’s very straightforward, but the process is not very well documented.

5 Likes

I think it must be part of the interpreter then?
(Also spoilers for the first screen I guess?)

2 Likes

It must be. That’s not from the game code.

3 Likes

Well it looks like I’ve been contrarian and ignored most of your advice and gone for TADS. Which I’ve only spent an hour with so far but I’m already liking. With the help of some 10 year old forum posts I’ve even managed to get the image in as well :slight_smile: Next task is figuring out how to make it smaller than 2.5 full-screen screen widths…

7 Likes

one of us! one of us! one of us! one of us!

6 Likes

UNASKED FOR UPDATE!

Having spent 3 hours trying to deploy the verb “To spit” (having it only apply to objects that were in the player’s mouth) in TADS, I gave up and spent 3 hours teaching myself enough Inform to do it there instead.

Currently pretty unhappy with both to be honest.

4 Likes

That’s not too bad, at least!


Your mouth is a part of the player.  The mouth is a transparent container.  The description of the mouth is "Your mouth can hold some surprising things!"  

An object can be swallowable.  An object is rarely swallowable.

The wad of gum is in the lab.  It is swallowable.  The binky is in the lab.  It is swallowable.  
Some nails are in the lab.
 
Check inserting something into the mouth:
	If the noun is not swallowable, say "You don't want to put that into your mouth!" instead.
	
Understand the command "swallow" as something new.  Understand "swallow [something]" as swallowing.  Swallowing is an action applying to one touchable thing.

Instead of swallowing, try inserting the noun into the mouth.

Spitting is an action applying to one thing.  Understand "spit [something]" as spitting.

Check spitting:
	If the noun is not enclosed by the mouth, say "You'd need to have that in your mouth before you can spit it!" instead.
	
Carry out spitting:
	Say "With a focused exhalation of breath (and saliva), you send [the noun] careening off into the room.";
	Now the noun is in the location.
	

(If you need to be able to SPIT something AT something, that’s just a little more complex – LMK if it’s helpful to bodge together an example there).

4 Likes

It’s half five in the morning and I’m too tired to take that all in now, but:

  1. that seems like a much more elegant way of doing it than what I did.
  2. I learn much better from coming through examples than by reading documentation so something like that is incredibly useful, thanks!
  3. is…is your mouth transparent?
3 Likes

Re 1, I hear you, you should see the actions I wrote when I was a couple hours into learning Inform! You can write relatively concise, clear code with Inform, but it takes a fair bit of practice to internalize exactly what order you need to say things in and exactly what syntax does what you want it to – so yeah, I also find examples are really useful!

This also leads to number 3, which is that “transparent” is just a property that means you can see what’s in the container when you examine it – I figured that would be helpful behavior so the player knows what they can spit (maybe it isn’t!)

3 Likes

(if you want me to implement this in TADS tomorrow then I’d be happy to. If you’ve chosen to stick with Inform 7 then that’s absolutely valid too!)

4 Likes

Understand "my mouth" as your mouth.

4 Likes