modscode / Gallery / coaster-tycoon
coaster-tycoon
A RollerCoaster Tycoon-style park that Claude builds while it works: tool calls lay track, coasters get test runs, crowds pour in, and parks compete on a global leaderboard.
What it does
- Draws a pane
- Adds /park
- Watches tool calls
- Hooks session.end, session.start, turn.complete, turn.start and 1 more
- Keeps its own state between turns
Good points
- Written in TypeScript
- Has a desktop-specific branch
- Handles errors
- Writes no files
Code to start from
Two kinds: a starter modscode writes from the design above, and the lines of the mod's own code that draw it.
Starter (register.tsx)
import type { Register } from 'claude-code'
// Drawn like coaster-tycoon by thickiran (pane, status, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/thickiran-coaster-tycoon/
// Written by modscode from that reading, not copied from the mod: use it as you like.
// Each value below stands for one the mod works out at run time; put in your own.
export const register: Register = on => {
// the pane: open it with $.ui.open({ id: 'my-pane', title: "Claude Park" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Button, Svg } = $.ui.resolve(e)
const money = '…'
const length = '…'
const guestsTotal = '…'
const parkRating = '…'
const length2 = '…'
const cols = '…'
const svg = '…'
const displayName = '…'
const job = '…'
const ticker = '…'
const name = '…'
const kind = '…'
const builtBy = '…'
const excitement = '…'
const ratingLabel = '…'
const intensity = '…'
const nausea = '…'
const price = '…'
const riders = '…'
const name2 = '…'
const kind2 = '…'
const builtBy2 = '…'
const name3 = '…'
const kind3 = '…'
const builtBy3 = '…'
return (
<Box flexDirection="column" gap={1}>
<Box flexDirection="row" justifyContent="space-between">
<Text bold>
Claude Park
</Text>
<Text bold color="#f0d020">
{money}
</Text>
<Text>
{"👥 "}
{length}
{" in park ("}
{guestsTotal}
{" total)"}
</Text>
<Text>
{"⭐ "}
{parkRating}
</Text>
<Text>
{"🎢 "}
{length2}
{" open · "}
{cols}
{" plots"}
</Text>
<Button label="🏆 #0" />
</Box>
<Svg source={`${svg}`} alt={`${displayName}: ${length} rides open, ${length} guests`} />
<Text>
{job}
</Text>
<Text dimColor>
{ticker}
</Text>
<Box flexDirection="column">
<Text wrap="truncate">
<Text bold>
{name}
</Text>
<Text dimColor>
{" "}
🎢
{" "}
{kind}
{" by "}
{builtBy}
{" · "}
</Text>
{`E ${excitement} (${ratingLabel}) · I ${intensity} · N ${nausea} · $${price} · ${riders} riders`}
</Text>
<Text wrap="truncate">
<Text bold>
{name2}
</Text>
<Text dimColor>
{" "}
🎢
{" "}
{kind2}
{" by "}
{builtBy2}
{" · "}
</Text>
{`E ${excitement} (${ratingLabel}) · I ${intensity} · N ${nausea} · $${price} · ${riders} riders`}
</Text>
<Text wrap="truncate">
<Text bold>
{name3}
</Text>
<Text dimColor>
{" "}
🎢
{" "}
{kind3}
{" by "}
{builtBy3}
{" · "}
</Text>
{`E ${excitement} (${ratingLabel}) · I ${intensity} · N ${nausea} · $${price} · ${riders} riders`}
</Text>
</Box>
</Box>
)
})
}
The mod's own code
Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.
plugins/coaster-tycoon/hooks/register.tsx lines 329–447 · Pane
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
await read($, tick)
const w = await park($)
const showing = await read($, view)
const els = $.ui.resolve(e) as Record<string, (props: object) => unknown>
const Box = els.Box as any
const Text = els.Text as any
const Button = els.Button as any
const open = w.rides.filter(r => r.status === 'open')
if (showing === 'leaderboard') {
const b = await read($, board)
const acct = await account($)
const cols: [string, number, boolean][] = [['#', 4, true], ['Player', 16, false], ['Park', 22, false], ['Score', 7, true], ['⭐', 5, true], ['Guests', 7, true], ['Rides', 6, true], ['Updated', 10, true]]
const row = (cells: (string | number)[], isMine: boolean, isHead = false) => (
<Box flexDirection="row">
{cells.map((c, i) => (
<Box width={cols[i]![1] + 1}>
<Text bold={isHead || isMine} dimColor={isHead} color={isMine ? '#f0d020' : undefined} wrap="truncate">
{pad(c, cols[i]![1], cols[i]![2])}
</Text>
</Box>
))}
</Box>
)
const entries = b.board?.entries.slice(0, 20) ?? []
return (
<Box flexDirection="column">
<Box flexDirection="row" justifyContent="space-between">
<Text bold>🏆 Global leaderboard{b.board ? ` · ${b.board.players} players · updated ${ago(b.board.updatedAt, Date.now())}` : ''}</Text>
<Box flexDirection="row" gap={1}>
<Button key="refresh" label="Refresh" onPress={() => fetchBoard($)} />
<Button key="to-park" label="Back to park" variant="primary" onPress={() => update($, view, () => 'park')} />
</Box>
</Box>
{row(cols.map(c => c[0]), false, true)}
{entries.map(x => row(
[x.rank, x.user, x.name, x.score.toLocaleString('en-US'), x.rating, x.guestsTotal.toLocaleString('en-US'), x.ridesOpen, ago(x.updatedAt, Date.now())],
acct?.user === x.user && x.id === myParkId,
))}
{entries.length === 0 && <Text dimColor>{b.error ? `Could not load the board: ${b.error}` : b.board ? 'No parks yet. Be the first: /park join' : 'Loading...'}</Text>}
<Text dimColor>
{w.isShared
? `You're playing as ${acct?.user ?? '?'} with ${displayName(w)}${myRank ? `, rank #${myRank}` : ', waiting for the next board update'}.`
: 'This park is not on the board. Type /park join [name] to enter it. Only game stats and the park name are shared.'}
</Text>
</Box>
)
}
const crews = buildingRides(w)
const testing = w.rides.filter(r => r.status === 'testing')
const hasNews = w.time - w.newsAt < 7 || !w.thought
const ticker = hasNews ? `📰 ${w.news}` : `💭 ${w.thought}`
const jobs = [
...testing.map(r => `🧪 Testing ${r.name}`),
...crews.map(r => `🚧 ${r.builtBy} crew: ${r.name} (${r.kind}) ${Math.min(r.built, r.size)}/${r.size}${w.isWorking ? '' : ', finishing up'}`),
]
const job = jobs.length > 0
? jobs.join(' · ')
: w.isWorking ? '🚧 Crews standing by for the next ride' : '🌳 Crews on break. Give Claude work to build more rides.'
const header = (
<Box flexDirection="row" justifyContent="space-between">
<Text bold>{displayName(w)}</Text>
<Text bold color="#f0d020">{money(w.money)}</Text>
<Text>👥 {w.guests.length} in park ({w.guestsTotal} total)</Text>
<Text>⭐ {parkRating(w)}</Text>
<Text>🎢 {open.length} open · {w.cols * 2} plots</Text>
<Button key="to-board" label={myRank && w.isShared ? `🏆 #${myRank}` : '🏆 Leaderboard'} onPress={() => showBoard($)} />
</Box>
)
if (e.surface === 'terminal') {
const Raster = els.Raster as any
const cols = Math.max(24, Math.min(512, e.props.bodyColumns))
const rows = Math.max(8, Math.min(120, e.props.scroll.bodyRows - 4))
const px = renderFrame(w, cols, rows * 2, 4)
return (
<Box flexDirection="column">
{header}
<Raster key="park" columns={cols} rows={rows} cells={toRasterCells(px, cols, rows)} />
<Text wrap="truncate">{job}</Text>
<Text wrap="truncate" dimColor>{ticker}</Text>
</Box>
)
}
const Svg = els.Svg as any
const W = 220
const H = 150
let svg = renderSvg(w, 6)
if (svg.length > 130_000) svg = toSvg(renderFrame(w, W, H), W, H, 4)
if (svg.length > 130_000) svg = toSvg(renderFrame(w, 160, 110), 160, 110, 5.5)
const best = [...w.rides].sort((a, b) => b.excitement - a.excitement)
return (
<Box flexDirection="column" gap={1}>
{header}
<Svg source={svg} alt={`${displayName(w)}: ${open.length} rides open, ${w.guests.length} guests`} />
<Text>{job}</Text>
<Text dimColor>{ticker}</Text>
{best.length > 0 && (
<Box flexDirection="column">
{best.map(r => (
<Text wrap="truncate">
<Text bold>{r.name}</Text>
<Text dimColor> {r.tier === 'big' ? '🎢' : r.tier === 'medium' ? '🎠' : '🎡'} {r.kind} by {r.builtBy} · </Text>
{r.status === 'open'
? `E ${r.excitement.toFixed(2)} (${ratingLabel(r.excitement)}) · I ${r.intensity.toFixed(2)} · N ${r.nausea.toFixed(2)} · $${r.price} · ${r.riders} riders`
: r.status === 'crashed' ? '💥 crashed, awaiting repairs' : r.status === 'testing' ? '🧪 testing' : '🚧 under construction'}
</Text>
))}
</Box>
)}
</Box>
)
})Licence text (MIT)
MIT License Copyright (c) 2026 thickiran Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
What its code calls
networkruns programstool callsremembers
The design, read from code
Drawn from the mod's source at the commit read, not from a run: a list is drawn three times, a condition takes its first branch that draws in the desktop app, and a value only the run time knows is shown as a made-up sample (dotted underline) or left out. Colours and type are this site's.
What its code shows
Read from the source at commit e0a5d334761d on 2026-10-06. The first group decides whether a mod is listed; the rest is for you to weigh. A later commit is not read until the next crawl.
| Decides the listing: code you can check | |
|---|---|
| Entry read | Every module hooks/hooks.json names was read.plugins/coaster-tycoon/hooks/register.tsx |
| Parses | Every file parses as TypeScript or JavaScript.5 files parsed |
| All its code is in the mod | Every import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod |
| Readable | No minified lines, no eval or new Function, no import of a computed path, no encoded blobs.no minified code, no eval, no encoded blobs |
| Calls in the open | Network and programs are reached as $.http.fetch and $.process.run in place, never passed around.every call outside goes through $ in the open |
| For you to weigh before installing | |
| Where it draws | The terminal, the desktop app, both, or nothing (hooks only: a guard or a prompt rewriter), as its code says. Shown, never a reason to leave a mod out.draws in the terminal and the desktop app, the same in both |
| Install line | Whether its repository's own .claude-plugin/marketplace.json lists it, so it installs from that marketplace with the lines on its page.listed in its repository's .claude-plugin/marketplace.json: installs from there |
| Programs on Windows | Whether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).runs no program a Windows PC lacks |
| Network | Whether every fetch names its https host in the code.https://raw.githubusercontent.com |
| Programs | Whether every program it starts is named in the code and is not a shell, an interpreter or a network tool.git (reaches the network), gh (reaches the network) |
| Reads and sends | Whether it both reads files or environment variables and reaches the network.reaches the network, but reads no files and no environment variables |
| Keys in the source | Whether the source holds what looks like an API key or a private key.no keys in the source |
| Licence | An open licence (MIT, Apache-2.0, BSD, ISC, Unlicense, 0BSD, CC0) with its text lets modscode show its code; otherwise the code is linked.MIT |
This is a reading of the code text, not a security review: it does not run the mod, and it cannot see what a program the mod starts does. The check before installing is yours. How mods are chosen
Install it
Check it yourself before you install it. Mods run unsandboxed, with your permissions, and modscode does not vouch for what this code does. Read the code below (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.
Its repository is its marketplace. Add that marketplace (in the terminal with these commands, or in the desktop app's plugin settings) and install the mod from it:
/plugin marketplace add thickiran/claude-coaster-tycoon/plugin install coaster-tycoon@claude-coaster-tycoonThis installs the marketplace's latest commit, which may not be the one read here (e0a5d334761d). Compare them before you install.
Ask Claude about it
With the modscode connector added, Claude can read this design, what its code reaches and its code, and build on them. Ask it like this:
Read the modscode design "thickiran-coaster-tycoon" with its code and make me a pane like itSearch them from Claude: the MCP connector
Similar designs
-
spending-effort-with-jev: no TypeSafe API key, so effort tips are off. Set it in /plugin.⚠ effort: long run, fuzzy spec → have Claude interview you, then go maxAsk Claude…
-
✦ explain as pick how Claude answers×3 ● build3 ● build3 ● build▸ VideoAsk Claude…
-
Ask Claude…Usage▲usage-meterokPlan limitsNo rate-limit windows reported (API key, or a plan without limits).note▲ 42%2h 10m · +14:32%/h this session · full in ~4mnote▲ 42%2h 10m · +14:32%/h this session · full in ~4mnote▲ 42%2h 10m · +14:32%/h this session · full in ~4m⋯This sessionCostUsageTimeUsageTurnsUsageOutputUsageCache readUsageCache writeUsageLow cache hit: long pauses or edits to early context break the cache.Cache hitUsage
-
Ask Claude…superpowersϟ Arc tokens showing buildNot now██ FinalFinal42%:1 ✓██ FinalFinal42%:1 ✓██ FinalFinal42%:1 ✓███ brand gradient (OKLCH)Not now██ FinalFinal42%:1 ✓██ FinalFinal42%:1 ✓██ FinalFinal42%:1 ✓███ brand gradient (OKLCH)Not now██ FinalFinal42%:1 ✓██ FinalFinal42%:1 ✓██ FinalFinal42%:1 ✓███ brand gradient (OKLCH)d darkl lightz daltonizeda ansiu auto
-
What it does
- Draws a band above the prompt, a pane, the status line, toasts in the terminal
- Adds /agentzero
- Watches Bash calls and can refuse them
- Hooks command.register, env.get, fs.read, fs.stat and 13 more
-
Ask Claude…Timer● MonAprNo timer runningStopResume last CollapseFri week./meter.tsxUnbilled Wed h$1.24 · expenses MarMayToday, Oct 6This week