New Architecture

February 4th, 2026

My thinking is changing as I mull over the various requirements. I am now thinking that I’ll have to abandon the linear upside-down palm tree architecture in favor of an architecture that has been used by a number of other designs. This architecture has no explicit structure, either tree or linear. Instead, all the encounters go into a pile, and each encounter has a “pick me!” algorithm based on conditions at the point in the story. 

When the time has come to select a new encounter, the system calculates the “pick me” value specific to each encounter. It then picks the encounter with the highest “pick me” value. Encounters that have already been picked are automatically passed over by the system. 

I worry that this calculation may take too long to execute, but I keep reminding myself that this is not being executed on a KIM-1 with a 6502 CPU running at 1 MHz. Yeah, sure, Chris. Don’t worry, Chris — it’ll run fast enough. Right?

I sure hope so.

Of course, I can bias the “pick me” algorithm for each encounter to take into account the current story year. That would ease the calculation, especially if the encounters are already sorted by minimum story year.

On the other hand, tuning the pick me algorithms will be a horror story. With the huge body of global variables, the algorithms will be a spaghetti mess.

So we’ll need to add a PickMe algorithm to each encounter, and a flag for “Has Already Been Picked"