Real-Time IF?

This is a discussion / support forum for the Hugo programming language by Kent Tessman. Hugo is a powerful programming language for making text games / interactive fiction with multimedia support.

Hugo download links: https://www.generalcoffee.com/hugo
Roody Yogurt's Hugo Blog: https://notdeadhugo.blogspot.com
The Hugor interpreter by RealNC: http://ifwiki.org/index.php/Hugor

Moderators: Ice Cream Jonsey, joltcountry

User avatar
pinback
Posts: 17700
Joined: Sat Apr 27, 2002 3:00 pm
Contact:

Real-Time IF?

Post by pinback »

Are there examples of / slash / accepted techniques for doing REAL-TIME IF?

That is, it looks pretty much the same as a regular game:

A Big Room
You are standing in a big room.

>

...except that while it's waiting for you to type something, STUFF CAN HAPPEN. People can walk in and out of the room. Objects can exhibit characteristics... it still waits for your input and the enter key, but the world doesn't stop while it's waiting.

Can -- is that something that can happen?

I'll hang up and listen off the air.
I don't have to say anything. I'm a doctor, too.

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

Post by RealNC »

I remember this one:

http://ifdb.tads.org/viewgame?id=vvf6ej4vxwwxqnjy

It's actual IF, though experimental and all you do is walking around and watch the stuff happen. To toggle realtime events, enter TOGGLE REALTIME.

There's quite a few games listed with the "realtime" tag, though most of them, even though they run on IF engines, are not IF but engine "abuses" like Tetris or Space Shooter:

http://ifdb.tads.org/search?searchbar=t ... archGo.y=0

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

Post by Roody_Yogurt »

It is possible to do in z-code, as it was done in Infocom's Border Zone, but I'm not sure how much there support there is for that on the library-side of things, though. Nikos' TADS example is probably the best example you're going to find.

You once posted about this before, pinback, and that got me thinking about how one would do it in Hugo. Well, the main thing is, it's totally not possible, as Hugo really can't do anything while it's waiting for input.

It is possible to take the time (and calculate how long it's been since the last move and have things happen based on the amount of time passed). Still, that's not going to give the effect of things happening as you stare dumbly at your computer screen.

The best way to fake it that I could imagine was to show the passing time in a movie showing a video. Your example in the other thread was a car ride.. You could have a video of driving to one's location and not allow the player to exit the car until the car stops (and the movie is over).

Of course, depending on how much of the game you want to give this "real time" sense, that'd add up quickly to huge resource files.

I guess my point is, GOOD LUCK WITH TADS, PINBACK!

User avatar
Flack
Posts: 8832
Joined: Tue Nov 18, 2008 3:02 pm
Location: Oklahoma
Contact:

Re: Real-Time IF?

Post by Flack »

pinback wrote:Are there examples of / slash / accepted techniques for doing REAL-TIME IF?
It looks like I7 has several plug-ins that help facilitate real time events. At least one is able to read the time from a player's PC. Another allows for "delays," which I think could be used to at least present the perception of real time events taking place.

http://inform7.com/extensions/time/#The_Passage_of_Time
"I failed a savings throw and now I am back."

User avatar
pinback
Posts: 17700
Joined: Sat Apr 27, 2002 3:00 pm
Contact:

Post by pinback »

Thank you for your assistance. I don't see why it'd be so fucking hard to trigger events and descriptions based on a countdown timer, starting from when the last prompt was displayed.

Doesn't sound so fucking hard.

Sorry for the foul language.
I don't have to say anything. I'm a doctor, too.

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

Post by Ice Cream Jonsey »

Do you remember ignoring my thread on Shades? The entire game is exactly like that.
the dark and gritty...Ice Cream Jonsey!

Bainespal
Posts: 151
Joined: Fri Jul 09, 2010 8:59 am

Post by Bainespal »

It's not hard for me to believe that actual real-time simulation is not possible in Hugo. However, I would be surprised if you really can't output text based on a time delay. As in, not letting the player type anything at the command prompt while a series of strings are printed one after another, or waiting half a second after printing one string before clearing the screen or something. I'm pretty sure I've done that in Inform 6 and ADRIFT, when I used to play with the development systems as a kid.

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

Post by Roody_Yogurt »

Yeah, everything mentioned on that Inform 7 page is easy enough to do in Hugo, I'm pretty sure. That won't get pinback to stop swearing at us, though.

User avatar
RetroRomper
Posts: 1926
Joined: Mon Jun 21, 2010 7:35 am
Location: Someplace happy.

Post by RetroRomper »

I'll comb through the literature later to find examples, but have any full games been created that explicitly utilize this functionality?

I ask because I vaguely remember a sort of real time system being present in Knight Orc but other examples (of older and modern IF games) escape me (though Maniac Mansion and the SCUMM system did have something akin to this and I remember real time clocks being part of several IF games).

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

Post by Roody_Yogurt »

Besides those two already mentioned in this thread, Border Zone and Knight Orc, other better-known commercial IF games would be all Synapse game (Mindwheel, Essex, Breakers, etc.) and the Melbourne House Tolkien games (the Hobbit, the Crack of Doom, etc.).

Here's one of the better lists of real-time games I could find:
http://solutionarchive.com/list/tag,32/ (note how it omits Knight Orc, though).

User avatar
Garth's Equipment Shop
Posts: 638
Joined: Fri Dec 05, 2008 5:55 pm
Location: Festering Foothills
Contact:

Post by Garth's Equipment Shop »

Ice Cream Jonsey wrote:Do you remember ignoring my thread on Shades? The entire game is exactly like that.
Wait. Shades was in realtime!? That crazy one room Shades by Andrew Plotkin? Or do you just mean like in those situations where you knew a sub-room was about to be lost forever with you in it and if your next move wasn't 'exit' you were screwed? Actually I didn't bother replaying it to see what would happen if I had stayed in one of those sub-rooms but that is the impression I got.

At one point I was informed that all I could do was wait. So I kept typing wait over and over but nothing happened so I tried other things which also didn't seem to do anything untill finally the game ended. I'm still not quite sure if I reached the intended ending or what. Where is that thread about Shades? I'd like to read that.

Oh and about the original question in the OP you should look into TADS3. It is a complete rewrite of TADS with it's own virtual machine and a powerful programming language similar to C++ or Java. It is sufficiently powerful enough to do what you ask and a whole lot more. I wrote a demo of a wasteland style game in it years ago. Not that it was real time or anything just an example of how much more T3 is capable of than just traditional text-adventures and/or IF.

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

Post by Tdarcos »

Roody_Yogurt wrote:It is possible to do in z-code, as it was done in Infocom's Border Zone, but I'm not sure how much there support there is for that on the library-side of things, though. Nikos' TADS example is probably the best example you're going to find.

You once posted about this before, pinback, and that got me thinking about how one would do it in Hugo. Well, the main thing is, it's totally not possible, as Hugo really can't do anything while it's waiting for input.
Well, technically true if you don't allow a different set of responding events after the input depending on how long the user waited after replying. You could get near-real time given a readable clock.

I can't remember if Hugo has an accessible timer; if it doesn't, then you're right, there would not be any way to do this in Hugo.

Now, I think someone got a simulated input or something via a Tetris-like game or something.

The big problem, that most people don't realize, is that Microsoft Windows is actually a "transaction monitor system" in which an application runs until it needs input or some response, at which point it effectively "quits" and hands control back to the system. The application is dead and is not operating until an event occurs. A mouse move or click, a keystroke, a timer interrupt, all can then restart the application.

When a program goes runaway and you get an hourglass or simply no redraw of the screen, it means it's not responding to events and is failing to quit every so often.

Now, if the Hugo runtime and the language supported Windows-type events then it would be a different thing and you could have it doing things while waiting for input.
"I really feel that I'm losin' my best friend
I can't believe this could be the end."
- No Doubt, Don't Speak

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

Post by Roody_Yogurt »

Garth's Equipment Shop wrote:
Ice Cream Jonsey wrote:Do you remember ignoring my thread on Shades? The entire game is exactly like that.
Wait. Shades was in realtime!? That crazy one room Shades by Andrew Plotkin? Or do you just mean like in those situations where you knew a sub-room was about to be lost forever with you in it and if your next move wasn't 'exit' you were screwed? Actually I didn't bother replaying it to see what would happen if I had stayed in one of those sub-rooms but that is the impression I got.
Yeah, no, Garth, ICJ was talking about Shades MUD (http://games.world.co.uk/shades/), a longstanding MUD that was some kind of inspiration to Knight Orc.

Erebor

Post by Erebor »

Blessed be the man who mentions "Border Zone."


And Andrew Plotkin is still writing games? This is happy news to me. "System's Twilight" was a masterwork. It's been a long time since he released that one.

I still think it was Andrew's webpage that got me started using the term "Unix frood" in conventional conversation. No one else ever did, though, so it never really caught on. Got me a lot of weird stares, though.

Best of luck with the real-time thing.

I was about to say, I don't think it would be that hard to write a script to get it to check the clock on my Mac. Darned if I know how that translates to an if-then style command in HUGO, though.

Real-time kind of screws the genre a bit, too. A lot of the fun is being able to sit and think endlessly about your next move.

Having to have fast reflexes for IF would get frustrating after awhile.

Ehm... no discouragement intended.

--RB

User avatar
pinback
Posts: 17700
Joined: Sat Apr 27, 2002 3:00 pm
Contact:

Post by pinback »

Erebor wrote:Having to have fast reflexes for IF would get frustrating after awhile.

Ehm... no discouragement intended.

--RB
Just to clarify, my intent was never that you'd have to REACT to any of these things, it would simply be for atmosphere.

Whenever I write my next game, which I probably won't, a lot of it will be on a boat, and while you're sitting there at the prompt I want you to feel like waves are lapping at the side of the boat as it sways gently on the whatever, blah blah.
I don't have to say anything. I'm a doctor, too.

Post Reply