Source Code Amnesty Day 2025

Enough material for hunting instead of fishing ! :smiley: not bugs, of course, but interesting pearls of sourceā€¦

Why not discussing the source and the coding solutions adopted ? with three inform sources and one TADS, I think thereā€™s enough food for coders :slight_smile:
Later for my constructive criticism !

Best regards from Italy,
dott. Piergiorgio.

2 Likes

hereā€™s my source code for In a minute there is time, including the accessibility settings I added last year.

A lot of the timer code is from @\HiEv (who is credited), so I think probably the most interesting part is the footer code. Itā€™s still a modification of HiEvā€™s code, but I think the reverse functionality I made is cool.

7 Likes

Unless Iā€™m mistaken, there are at least two: climbing onto the roof of the workshed with the ladder and sticking the tuning fork into the electrical outlet.

3 Likes

Another of the IFComp 2024 metapuzzles is now exposed, tooā€”did anyone win that one?

(If youā€™re wondering, the clue to that one is examining the victrola in the attic in Miss Gosling. She explains that she solved a past case in a very particular way.)

2 Likes

After a quick grasping of the lays of the land of the three (for nowā€¦) Inform 7/10 amnestied sources, followed by a quick look at the sources proper, I start discussing Vivā€™s Bad Beer: overall, is an excellent, if not magnificent, example of how to handle I7/10ā€™s scenes, correctly using the main strong point of I7/10ā€™s scenes (the insteadā€¦during construct) re. TADS/a3Lite scenes.

The source is very short by I7/10 standards, 96K, of which 8K are of game design, a developerā€™s reference, and a commented-out description (more on this later)

Viv has also handled the time-travel problem in the most effective way known, the one used in First Things First, with separate room objects for the same locs different eras, albeit thereā€™s only two eras, much less locations, and, more important, only one time-altering action.

On the past, my apologies for not having put this constructive criticism in the proper place (objectively, what was bad wasnā€™t beer, but moodā€¦) but in playing back then, and reading the source now, I think that the past map lack in era-flavoring, albeit thereā€™s an archaism (publican) and a child laborer, thereā€™s nothing giving much of a Victorian vibe, which I think fits extremely well the narrated story.

Side point, the commented-out description I noted above surprises me, because there is, indeed, an hint toward said commented-out description in the Vicarā€™s papers; you can elaborate about the change of description ? Truly, Iā€™m baffled about thisā€¦

Lastly, as military Historian, I liked the NOWā€¦ THEN suffixes system for differentiating the programmatical name of the locations and objects in the different eras, but I note also a substantial inconsistency in usage of these suffixes, in some case are separated to the common part by a space, in other cases are attached to said part, without apparent criteria, a sure recipe of bugs, which I fear has caused some delays, but looking at the scrapped ideas in the notes, I think, hopefully, that not much, if any was scrapped in favour of debugging. (Myself, and at least a betatester, have lost time around map inconsistencies in Isekai stemming from an ill-conceived set of roomsā€™s programmatical names (was in ioutside, so sadly the ā€œexample NOT to followā€ isnā€™t in my amnestied code :frowning: )

My suggestion is, for example, is -NOW for room object and _NOW for items objects, this allow also having at-glance the nature of the object (programming sense), which can be helpful.

I think that this is all; an excellent model of I7/10 coding, I think can be even a model for an hypothetical porting of First Things First in Inform 7/10 (this to say, a code on par with a major IF workā€™s codeā€¦). My compliments, Viv !

Best regards from Italy,
dott. Piergiorgio.

4 Likes

No, thank goodness. I promised a prize, but I have no idea what it would have been. :relieved_face:

3 Likes

Oh my, I forgot about the ladder. I donā€™t even know my own game.

5 Likes

Thank you! Yes, there were definitely inconsistencies in the format of the NOW/THEN suffixes for locations/objects. Which did cause a couple of bugs that I luckily caught in time! Having a consistent approach for naming and sticking to it is better for a multitude of reasons. And something I have very much learned from this. And thanks for the reminder about it, which is much appreciated as I code my next game. Which spoilers is also a bit timey wimey, but in a different way ā€¦

2 Likes

Iā€™ve posted the code from two games I released last year:

Studio, my 2024 Spring Thing entryā€”I think I made a commitment to release the code this year in a thread somewhere soon after last yearā€™s festival ended, so hereā€™s me making good on that!

PARANOIA, the winner of ParserComp 2024ā€™s Classic Class.

3 Likes

so hereā€™s ā€œThe Candy Striper of St. Asterix.ā€

it won Punycomp in December so itā€™s not terrible.

the code would be best described as ā€˜workmanlikeā€™ i suppose. itā€™s in inform6, obviously, so maybe of limited interested to most.

but if youā€™re using inform6 and into poorly-documented messy code and:

  • Inefficient NPC pathfinding
  • equally inefficient NPC wandering (without backtracking)
  • elevators (whoo, boy, we got not one but TWO elevators in this one. PLUS a dumbwaiter.)
  • a maddening combination of walkman and playable cassette tapes (the punycomp theme was ā€˜the 80sā€™ so, of course) that iā€™m pretty sure iā€™ll still be debugging from the grave.
  • tying light objects to the string of a balloon and letting them fly away (some things sound so innocuous until you actually start to write the code).

then this is DEFINITELY for you.

EDIT: realized i have a spoiler hereā€¦

6 Likes

I will probably put my portion of the Moondrop Isle source code out next yearā€”as a completely baseless line in the sand, I want to give my high-effort games at least one calendar year of release status before I publicize source. That said, I was scrounging around in my projects folder to see if thereā€™s anything I still have which hasnā€™t already been uploaded somewhere, and I found this:

'South Garden' prototype source code
"South Garden" by Jason Love


Volume I - META


Book 1 - The Stuff that Probabaly Ought to Go First


Section 1 - Game Data & Extensions

[Here's an introduction to the source code for public use! Try not to make it too overwhelming!]

[A note on organization: Volume I, METATEXT, is game meta data, primarily out-of-world actions, responses to default actions, and testing flags & actions. Volume II, SPACE, is the map, objects, implementation of specific actions required for their corresponding areas, etc. Volume III, TIME, is the scene system and the engine of narrative progression. Volume IV, NOTES, is a comments-only space for additional commentary and design considerations, misc. notes, etc.]

The story author is "Jason Love".
The story headline is "A fraction of an island".
The story genre is "Fiction".
The release number is 1.
The story description is "Just a trial run. Nothing to see here.".
[The story creation year is 2023. - should only need this line if porting/updating old games.]
Use American dialect and the serial comma.
Use no scoring. [Or "Use scoring."]
Release along with [cover art ("$$$ TODO: Add a cover art description. $$$"), ]a website, the source text, [an interpreter, ]and the library card.

[When play begins:
	now the right hand status line is "".]
	
Include Basic Screen Effects by Emily Short.

Include Unicode Character Names by Graham Nelson.

Include Moondrop Framework by Ryan Veeder.

The prevent quitting response is "If you want to quit the game, try closing the webpage or navigating to a different web address."
The prevent saving response is "This game saves automatically, so the save command has been disabled."
The prevent restoring response is "Since saving the game is automatic, restoring the game had to be automatic as well. The restore command won't work."
The shared item preservation response is "[The noun] isn't that cumbersome, and it's too useful to discard."


Book 2 - The Web Connection Stuff


Part 1 - Stuff that needs to be changed in each game

The zoneID is usually "areaSG".


Section 1 - Tables

Table of Entry Points (continued)
RoomID	Room
"jasonNW"	SGNW
"jasonSW"	SGSW
"jasonSE"	SGSE

[Table of Shared Items
ItemID	Item
"gray key"	gray key
"teal key"	teal key
"orange key"	orange key
"green key"	green key
"blue key"	blue key
"yellow key"	yellow key
"purple key"	purple key
"red key"	red key
"lavender key"	lavender key]


Part 2 - Stuff that can stay mostly the same

[Include Vorple by Juhana Leinonen.

Release along with the "Vorple" interpreter.

When play begins:
	Restore items;
	Setup stateful thingamabobs;
	Place the player.


Section 1 - Functions

To zone jump to (destination - a text):
	if there is a Room of the location in the Table of Entry Points:
		let rid be the RoomID corresponding to a Room of the location in the Table of Entry Points;
		execute JavaScript command "parent.moondrop.goto('[destination]', '[rid]')";
	otherwise:
		execute Javascript command "parent.moondrop.goto('[destination]')";
	now the command prompt is "".

To write (value - a text) to (slot - a text):
	execute javascript command "parent.moondrop.write('[zoneID]','[slot]','[value]')".
	
To decide which text is the text of the slot (slot - a text):
	execute javascript command "return parent.moondrop.read('[zoneID]', '[slot]')";
	decide on the text returned by the javascript command.

To place the player:
	execute JavaScript command "return parent.moondrop.currentRoom()";
	let the startRoom be the Room corresponding to a RoomID of text returned by the JavaScript command in the Table of Entry Points;
	Move the player to startRoom, without printing a room description.
	
To restore items:
	execute JavaScript command "parent.moondrop.startInv()";
	while "true" is "true":
		execute javascript command "return parent.moondrop.nextItem()";
		let iid be the text returned by the javascript command;
		if iid is "STOP":
			break;
		let theitem be the Item corresponding to an ItemID of iid in the Table of Shared Items;
		now the player has theitem.


Section 2 - General Rules
[
After taking something:
	if the noun is an Item listed in the Table of Shared Items:
		let iid be the ItemID corresponding to an Item of the noun in the Table of Shared Items;
		execute javascript command "parent.moondrop.gainItem('[iid]')".
		
Before dropping something:
	if the noun is an Item listed in the Table of Shared Items:
		say "[The noun] looks important, better hang on to it.";
		stop the action.

Understand "restore/save/quit/undo" as "[noped-commands]".

After reading a command:
	if the player's command matches "[noped-commands]":
		say "nope";
		rule fails;
	if the player's command matches "restart":
		execute JavaScript command "parent.moondrop.restart()";
		rule fails.


Part 3 - (Not) The actual game
]]


Chapter 1 - Restoring state

The electricstate is a number that varies. The electricstate is 0.

The lightstate is a number that varies. The lightstate is 0.

Runningtext is a number that varies. Runningtext is 0.

A state setup rule:
	if the text of the slot "ladderSite" is "SGNE":
		now the big ladder is in SGNE;
	if the text of the slot "ladderSite" is "SGNW":
		now the big ladder is in SGNW;
	if the text of the slot "ladderSite" is "SGSE":
		now the big ladder is in SGSE;
	if the text of the slot "ladderSite" is "SGSW":
		now the big ladder is in SGSW;
	if the text of the slot "textCounter" is "1":
		now runningtext is 1;
	if the text of the slot "textCounter" is "2":
		now runningtext is 2;
	if the text of the slot "textCounter" is "3":
		now runningtext is 3;
	if the text of the shared slot "lighthouseStatus" is "on":
		now the lightstate is 1;
	if the text of the shared slot "electricityStatus" is "on":
		now the electricstate is 1.

After going:
	if the player has the big ladder:
		say "[ladderSpotter]";
	continue the action.

To say ladderSpotter:
	if the player is in SGNW:
		write "SGNW" to "ladderSite";
	if the player is in SGNE:
		write "SGNE" to "ladderSite";
	if the player is in SGSW:
		write "SGSW" to "ladderSite";
	if the player is in SGSE:
		write "SGSE" to "ladderSite".


Chapter 2 - (Not) The actual actual game

[
Top is a room. "You could go south or southeast from here."
Instead of going southeast in Top: zone jump to "gardens.sequoia".

Mid is south of Top. "A lovely room with exits north, east and south."
Instead of going east in Mid: zone jump to "gardens.maple".

Landing Spot is south of Mid. "Your kayak is here. You see paths to the north and to the east."
Instead of going east in Landing Spot: zone jump to "areaB.red".

The coffin is an openable closed container in Mid. "[if open]The lid of a plank coffin yawns open.[otherwise]A plank coffin lies upon the dirt floor of the Tomb."

The flashlight is in Mid.
The keycard is a thing.
The boltcutters are a thing.
text goes here]


Book 3 - More Boring Meta Stuff


Section 1 - FULLSCORE and ABOUT and CREDITS and HELP, etc

Abouting is an action out of world. Understand "about" and "info" and "author" as abouting.
Carry out abouting: say "This is one ninth of a test game assembled in 2023 for purposes to be revealed at a later date."; try crediting. [Include "Thanks for playing" and summarize version changes, provide web/contact info.]

Crediting is an action out of world. Understand "credits" and "testers" as crediting.
Carry out crediting: say "In clockwise order of appearance: Caleb, Ryan, Zach, Joey, Sarah, Nils, and Jenni. Special shout-out to Ryan and Nils in particular for assistance with structural issues, special commands, and the framework extension.".

Helping is an action out of world. Understand "help" and "hint" and "walkthrough" and "walkthru" as helping.
Carry out helping: say "To complete the south garden, you need to find the blue key elsewhere. You can find the big ladder in the northeast corner. Take it to the northwest corner, drop it, and take the red key. Take the ladder south to the southwest corner. Drop it, unlock the blue chest with the blue key, and open the blue chest. You will also want to note that the lighthouse visible in the southwest corner matches the state it was left in, and the statue in the southeast corner will purr if the electricity is on. The ladder should stay in whichever room it's left in, but you shouldn't be able to remove it from the garden.[line break]". [Walkthrough? Hints?]

Xyzzying is an action out of world. Understand "xyzzy" as xyzzying. Understand "plugh" as xyzzying. Understand "plover" as xyzzying.

Carry out xyzzying:
	say "Hey, you found a '$$$ TODO $$$' placeholder command! There are probably a lot more such commands around here. How many can you find?[line break]".

	
Section 2 - Default Responses

Understand "admire [something]" as examining.

Understand "sing" as a mistake ("$$$ TODO: Provide singing response. $$$[line break]").

Understand "dance" as a mistake ("$$$ TODO: Provide dancing response. $$$[line break]").

Instead of attacking something:
	say "$$$ TODO: Provide attacking response. $$$[line break]".

Instead of kissing something:
	say "$$$ TODO: Provide kissing response. $$$[line break]".

Instead of jumping:
	say "$$$ TODO: Provide jumping response. $$$[line break]".
	
Instead of smelling:
	say "$$$ TODO: Provide smell response. $$$[line break]".

Instead of smelling something:
	say "$$$ TODO: Provide a specific smell response about [the noun]. $$$[line break]".
	
Instead of thinking:
	say "$$$ TODO: Provide thinking response. $$$[line break]".

Instead of waking up:
	say "$$$ TODO: Provide waking up response. $$$[line break]".

Instead of sleeping:
	say "$$$ TODO: Provide sleeping response. $$$[line break]".

Shouting is an action applying to nothing. Understand "shout" or "yell" or "holler" or "bellow" as shouting.

Carry out shouting:
	say "$$$ TODO: Provide shouting response. $$$[line break]".
	
Understand "taste [something]" or "lick [something]" as tasting.

Instead of tasting something:
	say "$$$ TODO: Provide a generic tasting response. $$$[line break]".
	
Understand "pray" as a mistake ("$$$ TODO: Provide prayer response. $$$[line break]").

Understand "use [text]" as a mistake ("Please try a more specific verb than 'use' for whatever it is you're trying to accomplish.")

Before inserting something which is not carried by the player into something:
	if the noun is in the second noun, say "It's in there already." instead;
	say "Since you aren't holding [the noun] yet, you grab it first.[line break]";
	silently try taking the noun;
	if the player is not holding the noun, stop the action.
	
Before putting something which is not carried by the player on something:
	if the noun is on the second noun, say "It's on there already." instead;
	say "Since you aren't holding [the noun] yet, you grab it first.[line break]";
	silently try taking the noun;
	if the player is not holding the noun, stop the action.
	
Thanking is an action applying to nothing. Understand "awesome" or "okay" or "great" or "nice" or "yay" or "hooray" or "good" or "thanks" or "thx" or "thank you" as thanking.

Carry out thanking:
	say "You're welcome."
	
Expressing displeasure is an action out of world applying to nothing. Understand "dangit" or "dang" or "darn" or "drat" or "shut up" or "aw" or "aww" or "awww" or "agh" or "arg" or "argh" or "crud" as expressing displeasure.

Carry out expressing displeasure:
	say "$$$ TODO: Provide dissatisfaction response. $$$[line break]".
	
Instead of saying sorry:
	say "Apology accepted."

Instead of touching something:
	say "$$$ TODO: Provide physical contact response. $$$[line break]". [You can use "if the noun is <blah>" and "otherwise if" constructions to set up categories of response here.]
	
[The following parser error response code was provided by Mathbrush in his source for his Cragne Manor room, which seemed like something worth modifying in some circumstances.]

[Rule for printing a parser error[ when some condition applies]:
	if the latest parser error is the didn't understand error: 
		say "I didn't understand that.";
	otherwise if the latest parser error is the can't see any such thing error:
		say "You can't see that.";
	otherwise if the latest parser error is the only understood as far as error: 
		say "Only part of that made sense.";
	otherwise if the latest parser error is the didn't understand that number error: 
		say "I didn't understand that number.";
	otherwise if the latest parser error is the said too little error: 
		say "There wasn't enough there for me to understand.";
	otherwise if the latest parser error is the aren't holding that error: 
		say "You don't have that in your possession.";
	otherwise if the latest parser error is the can't use multiple objects error: 
		say "You can't do that with multiple objects.";
	otherwise if the latest parser error is the can only use multiple objects error: 
		say "You didn't specify enough objects for that to make sense.";
	otherwise if the latest parser error is the not sure what it refers to error: 
		say "I'm not even sure what that refers to.";
	otherwise if the latest parser error is the excepted something not included error: 
		say "I expected something that wasn't included.";
	otherwise if the latest parser error is the can only do that to something animate error: 
		say "You can only do that to something animate.";
	otherwise if the latest parser error is the not a verb I recognise error: 
		say "That's not a verb I recognize.";
	otherwise if the latest parser error is the not something you need to refer to error: 
		say "You don't need to refer to that.";
	otherwise if the latest parser error is the can't see it at the moment error: 
		say "You can't see that from here.";
	otherwise if the latest parser error is the didn't understand the way that finished error:
		say "I didn't understand the way that finished.";
	otherwise if the latest parser error is the not enough of those available error: 
		say "There's not enough of those available.";
	otherwise if the latest parser error is the nothing to do error: 
		say "Nothing to do.";
	otherwise if the latest parser error is the I beg your pardon error: 
		say "You didn't specify a command.";
	otherwise if the latest parser error is the noun did not make sense in that context error: 
		say "I didn't understand the noun you used in that context.";
	otherwise if the latest parser error is the comma can't begin error: 
		say "You've employed some confusing punctuation.";
	otherwise if the latest parser error is the can't see whom to talk to error:
		say "You can't see whom to talk to.";
	otherwise if the latest parser error is the can't talk to inanimate things error:
		say "You receive no response.";
	otherwise:
		say "I truly don't understand what you've written.";
]

[
Section 3 - Testing Flags - Not for release

When play begins (this is the run property checks at the start of play rule):
	repeat with item running through things:
		if description of the item is "":
			say "[item] has no description."

[Borrowed from user aschultz on the intfiction forums]

scling is an action out of world.

understand the command ā€œsclā€ as something new.

understand ā€œsclā€ as scling.

carry out scling:
	say ā€œList of scenery:[line break]ā€;
	repeat with QQ running through visible scenery:
		say ā€œā€“[QQ][line break]ā€;
	the rule succeeds;	

Every turn:
	try scling.

[This one's from Hanon:]
Rule for printing a parser error: say "The [latest parser error] happened."; continue the activity.
]

Volume II - SPACE

[Put the game stuff in here! Generally one room per chapter.]


Book 1 - World

To say garden intro:
	if runningtext is 3:
		say "You're in the southernmost garden";
	if runningtext is 2:
		say "Oh crap, this kind of cycling text won't work well for this project format. My bad";
		now runningtext is 3;
		write "3" to "textCounter";
	if runningtext is 1:
		say "The island's southern garden remains suspiciously plantless";
		now runningtext is 2;
		write "2" to "textCounter";
	if runningtext is 0:
		say "Dry Run Island's 'South Garden' resembles a real garden in much the same way that 'Jello salad' resembles real salad. Any actual plants are well hidden";
		now runningtext is 1;
		write "1" to "textCounter".

The sky is a backdrop. The sky is everywhere. Description of the sky is "The sky over Dry Run Island is not as interesting as it is over other, better-known islands."
Before doing something to the sky:
	if the current action is examining:
		continue the action;
	otherwise:
		say "Far too far away for that." instead.

The lighthouse is a backdrop. The lighthouse is in SGSW. Description of the lighthouse is "Spiral-striped like a candy cane. [if the lightstate is 1]The lighthouse shines brightly against the colorless void surrounding Dry Run Island[otherwise]The lighthouse isn't casting any light at the moment. Is that dangerous? It's probably fine[end if]."
Before doing something to the lighthouse:
	if the current action is examining:
		continue the action;
	otherwise: 
		say "Far too far away for that." instead.

The Visitor Center is a backdrop. The Visitor Center is in SGNW and SGNE. Description of the Visitor Center is "A monolithic building of igneous rock, the Visitor Center dominates the center of Dry Run Island."

The Power Plant is a backdrop. The Power Plant is in SGNW and SGSW. Description of the Power Plant is "The Power Plant is little more than an assemblage of plywood, loosely fastened together. It would seem fragile, were it not so effective at obstructing clockwise passage along the island's periphery." Understand "wood" and "plywood" and "assemblage" and "assembly" as the Power Plant.

The Apartment is a backdrop. The Apartment is in SGNE and SGSE. Description of the Apartment is "The Apartment appears to be sculpted out of colorful foam, but the walls are harder than they look. The playful edifice forms the eastern border of the south garden." Understand "foam" and "colorful" and "apartments" as the Apartment.


Part 1 - SGNW

SGNW is a room.
Printed name of SGNW is "South Garden - Home of the Red Key".
Instead of going northwest in SGNW: say "The Power Plant connects directly to the Visitor Center; to get to the west garden, you'll need to go into the Visitor Center to the north first."
Instead of going west in SGNW: say "If you're trying to enter the Power Plant west of here, you'll need to go further south first."
Instead of going southwest in SGNW: say "If you're trying to enter the Power Plant west of here, you'll need to go further south first."
Instead of going northeast in SGNW: say "The only entrance to the Visitor Center is to the north."
Before going north in SGNW:
	if the player carries the big ladder:
		say "The big ladder is too cumbersome to fit through the Visitor Center entrance. You'll have to drop it first." instead;
	otherwise:
		say "You head into the Visitor Center.";
		zone jump to "areaVC.joey sw" instead.

Description of SGNW is "[garden intro].[paragraph break]This is the garden's northwest corner. The Visitor Center opens to the north, while the Power Plant blocks you from moving any further west.  The garden stretches further to the south and east."

[Exits: N to Visitor Center; E to SGNE, S to SGSW, SE to SGSE.]
[RED KEY is on a high-up ledge. Carry the BIG LADDER over here to reach the key.]


Chapter 1 - The Red Key

The red key is in SGNW. 

Initial appearance of the red key is "Far out of reach overhead, the red key hangs from some sort of invisible, intangible hook."

Before taking the red key:
	if the big ladder is not in SGNW:
		say "It's too high up to reach." instead.


Part 2 - SGSW

SGSW is a room. SGSW is south of SGNW.
Printed name of SGSW is "South Garden - Home of the Blue Chest".
Instead of going northwest in SGSW: say "The only entrance to the Power Plant is to the west."
Instead of going southwest in SGSW: say "You've reached the southern end of Dry Run Island. The text doesn't go any further past this point."
Instead of going south in SGSW: say "You've reached the southern end of Dry Run Island. The text doesn't go any further past this point."
Instead of going southeast in SGSW: say "You've reached the southern end of Dry Run Island. The text doesn't go any further past this point."
Before going west in SGSW:
	if the player carries the big ladder:
		say "The big ladder is too cumbersome to fit through the Power Plant entrance. You'll have to drop it first." instead;
	otherwise:
		say "You head into the Power Plant.";
		zone jump to "areaPP.calebse" instead.

Description of SGSW is "[garden intro].[paragraph break]This is the garden's southwest corner. The Power Plant opens to the west, while the island's southern edge blocks passage any further south. The garden stretches further to the north and east.[paragraph break]Far to the northeast, you can see the [if the lightstate is 1]shining[otherwise]dark[end if] lighthouse that overlooks the island."

[Exits: N to SGNW, NE to SGNE, W to Power Plant, E to SGSE.]
[BLUE CHEST is on a high-up ledge. Carry the BIG LADDER over here to reach the chest. You can see the lighthouse from there.]


Chapter 1 - The Blue Chest

The blue chest is a closed openable container in SGSW. The blue chest is lockable and locked. The matching key of the blue chest is the blue key. The blue chest is fixed in place.

Description of the blue chest is "It's blue, and it's suspended in mid-air, and it's only possible to reach it with a ladder."

Initial appearance of the blue chest is "There's a blue chest hovering just out of reach overhead."

Before taking or opening the blue chest:
	if the big ladder is not in SGSW:
		say "It's too high up to reach." instead.

Before unlocking the blue chest with a key:
	if the big ladder is not in SGSW:
		say "It's too high up to reach." instead.

Report opening the blue chest:
	say "Congratulations! You've completed the main objective of the South Garden. Best of luck in the other areas!";
	stop the action.
	
Before closing the blue chest:
	if the blue chest is open:
		say "Better leave that open, just to be safe." instead.


Chapter 2 - Seeing the Lighthouse

[Need to get the lighthouse slot info before we can see this, I think?]
[I just put this in the scenery section instead]


Part 3 - SGNE

SGNE is a room. SGNE is east of SGNW. SGNE is northeast of SGSW.
Printed name of SGNE is "South Garden - Home of the Blue Ladder".
Instead of going northwest in SGNE: say "If you're trying to enter the Visitor Center to the north, you'll need to go further west first."
Instead of going north in SGNE: say "If you're trying to enter the Visitor Center to the north, you'll need to go further west first."
Instead of going northeast in SGNE: say "While the east garden is in that direction, you'll need to either enter the Visitor Center (further to the west) or the Apartment (further to the south) to get there."
Instead of going east in SGNE: say "If you're trying to enter the Apartment to the east, you'll need to go further south first."
Instead of going southeast in SGNE: say "If you're trying to enter the Apartment to the east, you'll need to go further south first."

Description of SGNE is "[garden intro].[paragraph break]This is the garden's northeast corner, but neither the Visitor Center to the north nor the Apartment to the east have openings here. The garden stretches further to the south and west."

[Exits: W to SGNW, SW to SGSW, S to SGSE.]
[BIG LADDER is here. Cannot leave this zone while carrying the big ladder. We want to preserve the location of the big ladder.]


Chapter 1 - The BIG LADDER

The big ladder is a thing in SGNE.
Description of the big ladder is "That's a BIG LADDER!". Initial appearance of the big ladder is "There's a big ladder here."
Before climbing the big ladder:
	say "(Let's keep this simple: all you need to do is drop the ladder in the room where you need to use it, and then perform the action you needed the ladder to complete.)" instead.


Part 4 - SGSE

SGSE is a room. SGSE is southeast of SGNW. SGSE is south of SGNE. SGSE is east of SGSW.
Printed name of SGSE is "South Garden - Home of the Statue".
Instead of going southwest in SGSE: say "You've reached the southern end of Dry Run Island. The text doesn't go any further past this point."
Instead of going south in SGSE: say "You've reached the southern end of Dry Run Island. The text doesn't go any further past this point."
Instead of going southeast in SGSE: say "You've reached the southern end of Dry Run Island. The text doesn't go any further past this point."
Instead of going northeast in SGSE: say "The only entrance to the Apartment is to the east."
Before going east in SGSE:
	if the player carries the big ladder:
		say "The big ladder is too cumbersome to fit through the Apartment entrance. You'll have to drop it first." instead;
	otherwise:
		say "You head into the Apartment.";
		zone jump to "Apartment.kitchen" instead.

Description of SGSE is "[garden intro].[paragraph break]This is the garden's southeast corner. The Apartment opens to the east, while the island's southern edge blocks passage any further south. The garden stretches further to the north and west."

[Exits: NW to SGNW, N to SGNE, W to SGSW, E to Apartment kitchen.]
[STATUE appears different when electricity is on.]


Chapter 1 - The Statue

The statue is fixed in place. [Maybe needs to be a device? Probably need electricity slot info before we can finish this.] The statue is in SGSE. Understand "statue/cat/sphynx/kitty/housecat/stone/legs/wrinkles/tale/hairless" as the statue.

Initial appearance of the statue is "The centerpiece of this corner of the garden is a larger-than-life statue of a cat[if the electricstate is 1]. There's a sound like a cat's purr playing from somewhere[end if]."

Description of the statue is "[statueState].".

To say statueState:
	say "A pale stone housecat sits with its legs folded beneath its body. Judging from the carved wrinkles in its neck and the spindly tale curled against its flank, this variety of cat would be hairless, even if it weren't just a sculpture[if the electricstate is 1]. A recording of a cat's purr emanates from some hidden speaker[spoiler][end if][no line break]"

To say spoiler:
	if a random chance of 1 in 5 succeeds:
		say ", and you'd swear you just saw the cat blink".

Every turn while the player is in SGSE:
	if electricstate is 1:
		if a random chance of 1 in 5 succeeds:
			say "[one of]The cat blinks[or]Did the cat just move? It seemed like it moved[or]An ear twitches on the statue[or]The tip of the cat's tail seems to flick for a moment[as decreasingly likely outcomes]."


Book 2 - Shared Objects


Part 1 - "gray key"

The gray key is an object with description "The color of ash.".


Part 2 - "teal key"

The teal key is an object with description "The color of the 90s.".


Part 3 - "orange key"

The orange key is an object with description "The color of the sunset.".


Part 4 - "green key"	

The green key is an object with description "The color of algae.".


Part 5 - "blue key"

The blue key is an object with description "The color of the sky.".


Part 6 - "yellow key"

The yellow key is an object with description "The color of the sun.".


Part 7 - "purple key"

The purple key is an object with description "The color of violets.".


Part 8 - "red key"

The red key is an object with description "The color of blood.".


Part 9 - "lavender key"

The lavender key is an object with description "The color of lavender, I guess? The little flowers?".


Volume III - TIME

[Put scene stuff and narrative progression in here! Generally one scene per section, or one scene per chapter if it's a more complex game, etc.]


Volume IV - DATA

[Put your tables here! Generally one table per section.]


Volume V - DESIGN NOTES

[Comments that didn't fit elsewhere, commentary, design notes, etc.]

Before there was Moondrop Isle, there was Dry Run Island: a proof-of-concept miniature game that demonstrated the data storage and retrieval functions weā€™d be using to pass data between each region we built. ā€œSouth Gardenā€ is my portion of that prototype. Each micro-region had only four rooms and would demonstrate some feature of the final game. My feature was a ladder that would stay where you put it when you left and came back. I didnā€™t notice at the time, but the code I used to verify whether the power is running was not properly updating one of the scenery items in the prototype. Fortunately, that bug didnā€™t make it into the full game.

6 Likes

I intend to release post-festival versions of both Portrait with Wolf and Marbles, D, and the Sinister Spotlight once Spring Thing is over.

Source code will be included with those releases. I hope nobody laughs at my regular expressions!

8 Likes

Thanks everybody who released their code this year (or is making plans for an upcoming release)! Thereā€™s a lot Iā€™m looking forward to digging into, and I know itā€™s always a big help to other authors.

7 Likes

Not a contribution of my own, and a bit late, but FYI Iā€™ve added a link to the source code for The Moonlit Tower to its IFDB page. (I donā€™t think it can be found at the IF Archive.)

1 Like

Now, I have dedicated some hours yesterday and another today in looking at my fellow Countryman Roberto; his source is well-sized (188k main source, plus 80k of author-written extensions, which are useful
(albeit the ā€œno-scientific researchā€ rule in Commons.i7x intercepts too few, even by non-romance language standards, naughty verbs, only two, frankly disappointing, but Iā€™m definitively digressingā€¦)

On the main source, I 'fess up that I was staring up at the entire book 2.7 kicking myself multiple times; definitively I should have implemented Creative Cooking in Inform 7/10, instead of trying to strain magx beyond its limitsā€¦
(for who donā€™t know or remember the postmortem: the entire cooking part of CC was scrapped because was found to be beyond magxā€™s capabilitiesā€¦)

OTOH, chapter 4.4.8 should point out that certain depictions isnā€™t an extravagance of myself, but is not uncommon in narratives on this (eastern) shore of the Atlantic Sea.

But enough with the poisoned toothā€¦ I have studied the organisation of the source, is one of the best usage of the volume-to-section feature of Inform 7 and 10 I have seen, and IMO should be taken as model.

On the specifics, I noted the easiness of defining a ā€œdungeon masterā€ (that is, an invisible, but always in scope NPC which handles the narrative, albeit used only once, for a surprising detail (I never kissed the girl using the toilet, so I was very surprised in finding in the source that was actually a cameoā€¦)

Azuj and Miyai have taken note of the ā€œbathroom tutorialā€ (ch. 2.5.5), an interesting idea for helping their soulmateā€™s recovering of how to do magicā€¦ Thanks, Roberto !

I have noticed other interesting code & ideas, but now is dinner timeā€¦ so, perhaps Iā€™ll continue another day !

Bravo e complimenti, Roberto !

Best regards from Italy,
dott. Piergiorgio.

2 Likes

Ciao Piergiorgio,
I am glad that someone found my source code analysis interesting (that I consider it more software than a story).
Looking at it through the eyes of someone who has been writing programmes professionally for decades, I notice many things that should be fixed: there are stylistic differences, duplicated code and dependencies that need to be eliminated.
More than a story per se, it is a simulator of a world in which the protagonist can move freely: he is just made to go through a series of puzzles, but in the order he prefers.
It was more a study of the strange language that is inform7, much of that code, extended and cleaned up, is part of the story that takes part in the Spring Thing, which has more of a ā€˜storyā€™ aspect instead.

Paola, the girl in the bathroom, is a very dear friend of mine (I was very fond of her at the time, but she wouldnā€™t hear of it).

By now my job is hardly ever to write code, and this activity of writing interactive fictions is a good opportunity to get my hands dirty again with something fun.

Grazie.

Roberto.

2 Likes

After some thought, and a look, I determined that the spoilers here and there in the source (mainly in the commentsā€¦) are now irrelevant (in not few cases, refers to scrapped or highly modified parts of Isekai, so I amnestied also The Portraitā€™s sources, notwithstanding the few lingering issues and/or spoilers, just uploaded in the if-archive, but as usual, for the impatients, I upload it also here:

portrait_source.zip (64.7 KB)

2 Likes