Very much ‘re’. All the code in that post does less than Pool is east of Locker Room.Unless you want to create bizarre topologies or reshuffle the map in drastic ways later on, in which case you’ve been setting up a framework for doing that.
Yeah, this definitely feels like setup for a dynamic map. Of course, perhaps the most famous dynamic-map puzzle in IF also comes from the game that most famously uses magic scrolls (Enchanter) so knowing how our Iron ChIF tends to roll I wouldn’t be surprised if there were several more layers of twists to come!
To override the Report rules in particular circumstances, which means stopping the action
To make some side effect happen in the world, which means not stopping the action
If it were up to me, I would:
Make Report rules have default success, so a custom Report rule written by the player will (by default) stop any other Report rules from running
Make After rules have default no decision, so a custom After rule written by the player will (by default) not stop any other After rules from running
Run the After rules after the Report rules, whether or not the Report rules succeeded: a Carry Out rule can’t stop the Report rules from running, so likewise a Report rule shouldn’t stop the After rules from running
This would, of course, break massive amounts of existing code, so I don’t blame the I7 team for not making this change. But currently there’s no good place to put rules like “after you do something that makes noise, see if the guards notice” and “after someone else does something that makes noise, see if you notice”.
It seems I misremembered! I thought there was some extension that used “precondition” for the basic accessibility (etc) stage.
There’s also a famous extension called Dynamic Rooms that sort of does this. That’s what Labyrinthine Library uses. And I’m sure our Iron ChIF is aware of that extension.
So if he’s reimplementing it, that means he wants to do something that Dynamic Rooms doesn’t do. And the main thing his code here does, that Dynamic Rooms doesn’t, is having the exits of rooms change based on their coordinates, rather than having the coordinates of rooms change based on their exits.
But what would be the benefit of that? If you’re making a roguelike with a dynamic map, for example, I imagine you probably want to be placing rooms based on their relation to other rooms: “I placed room X, now I want to place room Y connected to it”. This code is instead for: “if room X moves to these coordinates, what other rooms can you reach from it?”
On that topic, how would you implement a coordinate system like Veeder’s? My first thought is TravelConnectors that search for the appropriate room by checking properties storing current coordinates, but one wonders if there’s a better way…
WHY YOU TEST ME SO?? CAN’T YOU SEE I’M HOLDING ON BY FRAYING FINGERNAILS HERE!?!?!?!
The answer, I think, depends on the nature of the game. Would I optimize for easy room plumbing, or for most efficient randomizing? For a game of the presumptive size of Iron ChIF, probably the former?
So my first impulse would be to populate an array of LookupTables, or maybe a LookupTable of tables. I’m not sure I would have landed on Veeder’s row = *10 on my own or not, but now that I’ve seen it, embrace it whole cloth as the outer table’s index/key.
Each entry would be a nested table with keys for all supported directions (lets say NSEW for simplicity’s sake), whose values were the (currently) adjacent rooms. Would probably also have a ‘ThisNode’ key pointing to current occupant as that seems convenient.
Actually, I’d probably class the nested tables and new DirLookupTable each one. I could then subclass ROOM as
class RandoRoom : Room
coord = nil // set on instantiation
east = roomMap.map[coord]['east']
west = roomMap.map[coord]['west']
north = roomMap.map[coord]['north']
south = roomMap.map[coord]['south']
;
I’d probably also have to have a custom NoTravelMessage or somesuch to map to unavailable exits, and also remove themselves from a Room’s exit listing.
All that’s left is randomize() and updConnections() methods of roomMap The latter would be used in a preInit object to set initial connections, based on hardwired first locations. Both would be used by the scroll (or whatever) that did the scrambling, with randomize() updating both the table’s ThisNode value, and the corresponding rooms coord property. updConnections would be the tougher of the two, having to account for room exit counts and non-exits.
Oh @Dissolved, what have you done to me? It is all I can do to not start coding that FOR REAL.
Kerkerkruip, a roguelike, actually uses the coordinate-first approach. Yes, you want to connect rooms to each other; but you also want to make loops! If room 2 is east of room 1, and room 3 is north of room 2, and room 4 is west of room 3… then you want to be able to make a connection where room 4 is north of room 1. A general system that allows for this will almost inevitably bring in coordinates. In addition, Kerkerkruip has the possibility of unconnected rooms that can only be reached by creating new tunnels. For this, coordinates are indispensable.
I’m looking forward to this too, since despite releasing two mid-sized Inform games that weren’t noticeably buggy[1], I’ve never actually used the “test me” feature since I’ve never been able to wrap my head around how and when to use it - the skein just feels like a lower-effort and more flexible approach.
[1] Well, modulo the bees that are all over Sting.[2]
[2] And modulo the game-breaking bug in the initial release of Sting that could lead to the player getting stuck being stung by a swarm of bees over and over until the heat death of the universe.
Yeah, I vastly prefer the Skein. “Test me” is mostly important for worked examples like the ones in the manual, so that people can run the code and instantly see how it’s all supposed to work. For my own code, a well-organized Skein is a better way to see what’s going on and where.
Gets annoying once you’ve made a change and everything starts popping up red as in, “The response has changed!” And you go in and all the responses are “You can’t see any such thing.” And “You can’t go that way.”
I’ve used test scripts for things like being able to quickly get to certain points in the game, testing the winning path(s) through the game to confirm it’s still possible to win right before sending the game off to a tester, and confirming that a given bug got fixed. Maybe it’s possible to do all those things with the skein, but I usually don’t. It just seems really big and unwieldy to me.
Yeah, you can do all those things in the skein – my games have all had an “act” structure, where being able to quickly test something in the second or third or fourth major chunk of gameplay was really important, so that’s precisely what made me appreciate it. And instead of requiring you to script out a specified list of options – constructed by typing the commands into the story file, I guess while trying to hold the whole game state in your head? – the skein lets you jump to arbitrary points, building itself out as you do the manual playtesting you need to do anyway. It’s definitely true that you need to keep it trimmed or it gets impossible to use, but I find it’s pretty easy to identify the branches where I spent a million turns trying to deal with a stupid bug, and then just prune them all away with a click. Compared to the additional effort required to generate and maintain a dozen or more test scripts, the skein seemed way more streamlined!
My initial response to this Skein talk was going to have been, ‘The Skein?! It’s just the worst!’ Then I realised that sounded unconsidered and extremely prejudicial.
I do all the same things bg mentioned with the test commands. You can give your tests cool or logically useful names. But also… the Skein eventually causes slowdown in the IDE as it grows. For a big game, that’s a dealbreaker. Unfortunately, you can’t just turn the Skein off, so I have to regularly delete it to stop its Eye Of Sauron effect.
Looking at the challenger’s list of tabs, as helpfully listed in the github readme, most of them make sense in relation to a game involving scrolls, bird people, and mist. Except one, “Frederick II’s wife”.
Wikipedia tells me Frederick II lived in the 13th century and was Holy Roman Emperor. He was a noted falconer and wrote the first known treatise on that subject, so likely our challenger arrived here after the previous tab for “Famous Falconers”. Frederick II had 3 wives: Constance of Aragon (1179 – 1222), Isabella II of Jerusalem (1212 – 1228), and Isabella of England (1214 – 1241). Glancing through their biolographical information, I’m feeling a lot of sympathy for Isabella II who married him at age 12 and died in childbirth at age 15, but few ideas on what this tells us about the game.
(I haven’t looked at the actual code though, likely there are answers there)
There’s a lot of talk and speculation in the Judges/Authors thread about @lpsmith 's upcoming Big Chase Scene. Questions and comments about how to keep the tempo up during a fast-paced sequence, holding the player’s attention on the here-and-now immediacy of the threat, the difficulty of doing this in a wide-open parser-possibility space. (Cut down the parser to necessary commands during the chase, with the risk of disappointing the player who’s used to the full range of commands? Allow all input (including STOP TO SMELL ROSES) to keep the mind of the player in this wide possibility state, risking losing the forward momentum of an exciting chase?)
My mind immediately jumps to the chase in The Shadow in the Cathedral, where the protagonist needs to chase an NPC up a clocktower. If I recall correctly, Shadow kept the parser open, allowing the player to try any command (including silliness), and used the denial responses to refocus the player and re-emphasise the stakes of the chase.
Yeah, I agree with @Encorm, chases are fun but pacing is very tricky and if the thing sags or goes overlong - which is a very easy design issue to hit - it can really mess things up. I did a chariot chase in Miseries, and my solution was to let the player do anything they wanted, with some custom responses along the lines of what our challenger is implementing, but with a series of timers moving things along automatically after a couple of turns if the player was smelling too many roses. It’s a compromise that can fail if the player sees the mechanisms, but I couldn’t think of another solution - curious to see whether our challenger points the way to something better!