- the call graph is by name, and a local or a parameter named as a function (a float bd, part, bx) linked to that function: a name the function binds itself is never an edge now. - drain_actions, generated, calls every reducer; a reducer is reached from its action's dispatch, so the drain's calls are not edges. - a fresh value flowing into a local that also holds kept memory is still the frame's (storing it anywhere kept would have made it ESC): HEAP now keeps only a push's growth off the arena. - the arena starts at its first use rather than at the first frame mark, so boot's temporaries are scratch too - dead once the Start handlers return - and a scratch site is never a birth. Plus ludic.hints' rail and three of ludic.update's one-off lines declared. The arena goldens pass poisoned. Maroon Lake (d79d189f): 39/11/66 -> 30/9/0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| tests | ||
| card.ludic | ||
| defs.ludic | ||
| index.ludic | ||
| mute.ludic | ||
| package.ludic | ||
| port.ludic | ||
| rail.ludic | ||
| rail_into.ludic | ||
| README.md | ||
| system.ludic | ||
ludic.hints
A rail of things that are true now and can be acted on now - thirsty, the fire burning low, a
bear near, a job ready to hand in - sorted by how much they matter, each one a card that teaches
it in three steps and can be muted for good. Uses ludic.base and
nothing else.
import "ludic.hints"
The package never reads a key and never draws: the game's input calls the verbs (the key opens and puts down, the arrows walk, a third key mutes), its interface reads the rail and the card, and its words are the cards' own text keys, translated where they are drawn.
Cards are data
def Hints from "assets/data/hints.lres" # the game's cards, in an open registry
thirsty {
urgency: HINTS_NOTE, icon: "bottle", item: IT_BOTTLE
line: "Thirsty - drink", title: "Water"
s1: "Drink at any shore, for nothing", pic1: "waterfull"
s2: "Fill a bottle there as well", item2: IT_BOTTLE
s3: "Boil it in the pot to be safe", item3: IT_BOILED
later: "Buy or make a bottle, fill it at the shore and boil it."
}
urgency is HINTS_TIP, HINTS_NOTE, HINTS_WARN or HINTS_URGENT. A picture is a glyph by
name (icon, picN) or a thing's picture by number (item, itemN, -1 for none) - both the
game's to interpret.
The rules it keeps
- The most urgent few. Once a pass (a second by default) the rail is the true, unmuted cards,
most urgent first and in registry order within an urgency, up to
hints_config's count. - A card follows its subject. As the rail re-sorts under an open card, the pick follows it; when what it was about stops being true (or the rail stops showing) it is put down, with no fact.
- A lesson lands once.
hints_mute_card()takes the open card off the rail untilhints_unmute_all(). Mutes are kept by key, so a card added or removed moves nobody else's, and a key this build does not know is carried through a load and a save.
The port
export port HintsWorld {
true_now: fn(int) -> bool # is card i true now? pure and cheap (unbound: never)
showing: fn() -> bool # the rail is wanted: in play, the player's switch on (unbound: yes)
}
API
HintCard { key, urgency, icon, item, line, title, s1..s3, pic1..pic3, item1..item3, later }, open registry Hints ... as HINT |
a card |
hints_config(shown, every) |
how many the rail holds (3) and seconds between passes (1) |
hints_tick(dt), hints_sort(), hints_refresh() |
a pass when due, a pass now, the next tick's pass now |
hints_rail() -> []int, hints_count(), hints_at(k), hints_pick(), hints_hot(k) |
the rail |
hints_card(), hints_key(), hints_open(k), hints_close(), hints_move(d) |
the card being read (-1) and its verbs |
hints_step_text(id, n), hints_step_icon(id, n), hints_step_item(id, n) |
a step, n 1..3 |
hints_mute_card(), hints_mute(id, on), hints_muted(id), hints_mute_count(), hints_unmute_all() |
"I know this" |
hints_mutes_save() -> Val, hints_mutes_load(v) |
the mutes as a list of keys, for the game's settings file |
hints_facts() -> Queue<HintsFact> |
{ what, card }: HINTS_F_OPENED, _CLOSED, _MUTED, _UNMUTED |
hints_system() -> System |
"hints", PH_PRESENT: reset and the tick; nothing in a trip's save |
Tests
ludic test packages/ludic.hints