A downloadable tool

Buy Now$22.00 USD or more

Majora’s Mask. Outer Wilds. Deathloop. 12 Minutes. The mechanic is easy to describe and miserable to hand-roll — because a time loop is not really about time. It is about bookkeeping: what snaps back, what survives, what the game must remember that the world has forgotten, and how the player is ever shown any of it.

Loop Core is that bookkeeping, plus the screen that makes it legible.

Three ideas, and that is the whole plugin

  • Anchor — the moment a loop begins. Set it once. Every rewind returns the world to exactly this state.
  • Rewind — put the world back. Switches, variables, self-switches, party position and condition, all as they stood at the anchor. Then the loop counter advances.
  • Knowledge — what the player keeps. Facts, carried items, and the record of what they changed. A rewind cannot touch any of it.

The rule that keeps your project safe

Loop Core only ever touches the switch and variable ids you declare. Everything else in your project — every other plugin’s switches, every variable you use for something that is not the world — is not read, not written, and not rewound.

There is deliberately no “reset everything” mode. A loop plugin that clears state it does not own is a plugin that breaks the rest of your game on the second loop.

Loop-gated events, with no scripting at all

Point Loop counter variable at a spare variable and Loop Core keeps it equal to the current loop number. Now every ordinary Conditional Branch in your game can gate on the loop:

Conditional Branch: Variable [Loop] >= 3

For knowledge, the script conditions read like sentences:

  • $gameLoop.knows('mayor_lies')
  • $gameLoop.learnedThisLoop('mayor_lies')
  • $gameLoop.factLoop('mayor_lies')
  • $gameLoop.loopIndex()
  • $gameLoop.divergedFrom('saved_the_smith')

Which gives you the pattern that carries a whole time-loop game:

Page 1, no condition — the mayor gives you the official story.
Page 2, condition $gameLoop.knows('mayor_lies') — you interrupt him, and he goes quiet.

Same NPC. Same map. The world reset; the conversation did not.

The Loop Ledger

One command opens the scene, and the player sees the shape of their own repetition.

  • The dial — one ring per loop, oldest innermost, the live one breathing on the outside.
  • Pins — every divergence marked on its loop’s ring, at an angle derived from its own id, so the same choice always lands in the same place. A crowded ring was a loop where you changed things.
  • The constellation — everything known, laid out from the facts’ own ids so the map is identical in every save on every machine. Facts learned in the same loop are joined, because the story that taught you one taught you the other.

You never author the Ledger. It is generated from the calls you already make.

It does not look like RPG Maker

There is no windowskin in this plugin, and no Window_ class at all. The Ledger is drawn entirely from scratch: tracked uppercase display type, monospaced numerals, a procedural graticule backdrop, and rings that sweep in on a stagger. Measured in the real engine, the scene draws zero RPG Maker windows.

Over the whole scene sits a real fragment shader — chromatic separation that grows toward the edges, a drifting scanline, film grain and a vignette. And the rewind itself is a full-screen time-fold: the image is dragged toward the centre along a spiral, torn into rings that slip against each other, and split per colour channel as it goes. RPG Maker’s own transitions are fades and picture wipes. A time loop should not reset behind a fade to black.

Saves are the part everyone gets wrong

Loop Core stores its state in a versioned record with a migration path, and it stores your fact ids in arrays, never as object keys. That is not a style preference. An id taken from author text can be __proto__, which as an object key sets the prototype instead of storing a value — and the resulting object breaks RPG Maker’s own save serialiser for your entire game, not just for this plugin. The test suite has a case asserting exactly that, and a second script that deliberately breaks the data model to prove the case still fires.

  • Adding Loop Core to an existing save works.
  • Removing it later leaves the rest of the save intact.
  • Saving mid-loop and reloading rewinds correctly, because the anchor is part of the record.

Built and verified

  • 41 headless tests and 42 checks in the real MZ runtime, all green, every suite run separately.
  • 2 draw calls per frame, 0 texture uploads, 0 bitmap redraws, 0 window refreshes, 0 display-object growth — measured over 400 stepped frames. The Ledger draws once and animates sprite properties only.
  • Every per-frame code path is statically proven to allocate nothing, with the scanner proven to fire against a sabotaged copy of each one.
  • Patches applied by prototype extension with the original saved and called. Nothing in the engine is replaced.
  • The rewind visual degrades safely: if the shader will not compile on a player’s hardware, the rewind still happens, immediately and correctly, with no visual.

What ships

Three plugins — the engine, the Ledger scene, and the rewind effect — as raw, readable, uncompressed JavaScript. Six plugin commands, twenty parameters, a full Readme, and a commercial licence. No new database entries, no notetags, no map changes.

Also from CSAF

Chronicle Core — branching quests, foreclosed choices and faction consequence. A choice closed off in one loop can be reopened in the next: Chronicle tracks what your choices do, Loop Core decides which of it survives the reset.

Full catalogue: csaf.itch.io

Purchase

Buy Now$22.00 USD or more

In order to download this tool you must purchase it at or above the minimum price of $22 USD. You will get access to the following files:

loop-core-mz-plugin.zip 32 kB
Version 1

Development log

Leave a comment

Log in with itch.io to leave a comment.