From 787c005fc61b91ebe29867bd975b5bb54ec2b005 Mon Sep 17 00:00:00 2001 From: nicfv Date: Sun, 2 Aug 2026 10:24:15 -0700 Subject: [PATCH 01/29] 3 layers --- www/games/orbit-idle/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/games/orbit-idle/src/index.ts b/www/games/orbit-idle/src/index.ts index c52bfd8..724391d 100644 --- a/www/games/orbit-idle/src/index.ts +++ b/www/games/orbit-idle/src/index.ts @@ -16,7 +16,7 @@ const canv: Canvas = new Canvas({ borderBlur: 'gray', width: 800, height: 600, - numLayers: 2, + numLayers: 3, parent: document.getElementById('game') as HTMLElement, loop(dt) { canv.clear(1); From 898251b7aac84a76d25e137a5ead05444dc0b0a1 Mon Sep 17 00:00:00 2001 From: nicfv Date: Sun, 2 Aug 2026 10:24:25 -0700 Subject: [PATCH 02/29] start working on cursor class --- www/games/orbit-idle/src/cursor.ts | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 www/games/orbit-idle/src/cursor.ts diff --git a/www/games/orbit-idle/src/cursor.ts b/www/games/orbit-idle/src/cursor.ts new file mode 100644 index 0000000..d1347ea --- /dev/null +++ b/www/games/orbit-idle/src/cursor.ts @@ -0,0 +1,7 @@ +import { Drawable } from 'graphico'; + +export class Cursor implements Drawable { + public draw(graphics: CanvasRenderingContext2D): void { + throw new Error("Method not implemented."); + } +} From c1fc9d9c8d02f0be9f9e60bf2820e09a27e08b2d Mon Sep 17 00:00:00 2001 From: nicfv Date: Sun, 2 Aug 2026 10:25:48 -0700 Subject: [PATCH 03/29] add props --- www/games/orbit-idle/src/cursor.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/www/games/orbit-idle/src/cursor.ts b/www/games/orbit-idle/src/cursor.ts index d1347ea..37b98e6 100644 --- a/www/games/orbit-idle/src/cursor.ts +++ b/www/games/orbit-idle/src/cursor.ts @@ -1,6 +1,24 @@ import { Drawable } from 'graphico'; +/** + * Represents the user's cursor + */ export class Cursor implements Drawable { + /** + * X-coordinate [px] + */ + private x: number; + /** + * Y-coordinate [px] + */ + private y: number; + /** + * Create a new instance of a cursor + */ + constructor() { + this.x = 0; + this.y = 0; + } public draw(graphics: CanvasRenderingContext2D): void { throw new Error("Method not implemented."); } From 2b01d26ebd428db5f23e0a8176c894bc2872837c Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 17:29:13 -0700 Subject: [PATCH 04/29] add more class methods --- www/games/orbit-idle/src/cursor.ts | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/www/games/orbit-idle/src/cursor.ts b/www/games/orbit-idle/src/cursor.ts index 37b98e6..3d0586b 100644 --- a/www/games/orbit-idle/src/cursor.ts +++ b/www/games/orbit-idle/src/cursor.ts @@ -4,6 +4,14 @@ import { Drawable } from 'graphico'; * Represents the user's cursor */ export class Cursor implements Drawable { + /** + * Star radius + */ + private static readonly lgR = 4; + /** + * Planet radius + */ + private static readonly smR = 2; /** * X-coordinate [px] */ @@ -12,14 +20,33 @@ export class Cursor implements Drawable { * Y-coordinate [px] */ private y: number; + private planetAngle: number; /** * Create a new instance of a cursor */ constructor() { this.x = 0; this.y = 0; + this.planetAngle = 0; + } + /** + * Move the cursor when the user moves the mouse + */ + public move(x: number, y: number): void { + this.x = x; + this.y = y; + } + public tick(dt: number): void { + this.planetAngle = (this.planetAngle + dt) % (2 * Math.PI); } public draw(graphics: CanvasRenderingContext2D): void { - throw new Error("Method not implemented."); + graphics.fillStyle = 'white'; + graphics.beginPath(); + graphics.arc(this.x, this.y, Cursor.lgR, 0, 2 * Math.PI); + graphics.fill(); + graphics.fillStyle = 'red'; + graphics.beginPath(); + graphics.arc(this.x + (Cursor.lgR + Cursor.smR), this.y, Cursor.smR, 0, 2 * Math.PI); + graphics.fill(); } } From f1601e4dad497da63e725f3c16bba7d56ed105c9 Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 17:29:20 -0700 Subject: [PATCH 05/29] create cursor --- www/games/orbit-idle/src/state.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/games/orbit-idle/src/state.ts b/www/games/orbit-idle/src/state.ts index d4c5190..b80b080 100644 --- a/www/games/orbit-idle/src/state.ts +++ b/www/games/orbit-idle/src/state.ts @@ -1,5 +1,6 @@ import { FullAscendButton } from './button-full'; import { BuyType } from './buy-type'; +import { Cursor } from './cursor'; import { Income } from './income'; import { Menu } from './menu'; import { Pause } from './pause'; @@ -13,6 +14,7 @@ import { Zoom } from './zoom'; export const version = 'v1.1.1'; // UI elements +export const cursor: Cursor = new Cursor(); export const player: Player = new Player(); export const zoom: Zoom = new Zoom(725, 175); export const buyType: BuyType = new BuyType(725, 250); From 94918610557b3d54b0f6dd097e7be35b968a9282 Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 17:29:27 -0700 Subject: [PATCH 06/29] render and move cursor --- www/games/orbit-idle/src/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/www/games/orbit-idle/src/index.ts b/www/games/orbit-idle/src/index.ts index 724391d..7cbed00 100644 --- a/www/games/orbit-idle/src/index.ts +++ b/www/games/orbit-idle/src/index.ts @@ -1,6 +1,6 @@ import './close-info-handler'; import { Canvas } from 'graphico'; -import { ascBtn, buyType, income, menu, paused, player, shop, system, tutorial, zoom } from './state'; +import { ascBtn, buyType, cursor, income, menu, paused, player, shop, system, tutorial, zoom } from './state'; import { GameData } from './gamedata'; /** @@ -17,9 +17,11 @@ const canv: Canvas = new Canvas({ width: 800, height: 600, numLayers: 3, + showMouse: false, parent: document.getElementById('game') as HTMLElement, loop(dt) { canv.clear(1); + canv.clear(2); system.step(dt); menu.autosave(dt); canv.draw(system, 0); @@ -32,8 +34,10 @@ const canv: Canvas = new Canvas({ canv.draw(menu, 1); tutorial.tick(dt); canv.draw(tutorial, 1); + canv.draw(cursor, 2); }, mousemove(x, y) { + cursor.move(x, y); tutorial.checkHover(x, y); zoom.checkHover(x, y); buyType.checkHover(x, y); From b95c5a79aea030457e42c0b772f973b8ce2e9d69 Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 17:32:32 -0700 Subject: [PATCH 07/29] calculate small planet pos --- www/games/orbit-idle/src/cursor.ts | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/www/games/orbit-idle/src/cursor.ts b/www/games/orbit-idle/src/cursor.ts index 3d0586b..c185427 100644 --- a/www/games/orbit-idle/src/cursor.ts +++ b/www/games/orbit-idle/src/cursor.ts @@ -1,4 +1,5 @@ import { Drawable } from 'graphico'; +import { Vec3 } from 'smath'; /** * Represents the user's cursor @@ -13,40 +14,41 @@ export class Cursor implements Drawable { */ private static readonly smR = 2; /** - * X-coordinate [px] + * Mouse coordinates */ - private x: number; + private pos: Vec3; /** - * Y-coordinate [px] + * The angle of the orbiting planet */ - private y: number; private planetAngle: number; /** * Create a new instance of a cursor */ constructor() { - this.x = 0; - this.y = 0; + this.pos = new Vec3(0, 0); this.planetAngle = 0; } /** * Move the cursor when the user moves the mouse */ public move(x: number, y: number): void { - this.x = x; - this.y = y; + this.pos = new Vec3(x, y); } + /** + * Rotate the small planet + */ public tick(dt: number): void { this.planetAngle = (this.planetAngle + dt) % (2 * Math.PI); } public draw(graphics: CanvasRenderingContext2D): void { graphics.fillStyle = 'white'; graphics.beginPath(); - graphics.arc(this.x, this.y, Cursor.lgR, 0, 2 * Math.PI); + graphics.arc(this.pos.x, this.pos.y, Cursor.lgR, 0, 2 * Math.PI); graphics.fill(); + const planetPos: Vec3 = this.pos.plus(Vec3.fromPolar(Cursor.lgR + Cursor.smR, this.planetAngle)); graphics.fillStyle = 'red'; graphics.beginPath(); - graphics.arc(this.x + (Cursor.lgR + Cursor.smR), this.y, Cursor.smR, 0, 2 * Math.PI); + graphics.arc(planetPos.x, planetPos.y, Cursor.smR, 0, 2 * Math.PI); graphics.fill(); } } From b071bcdc4d1e0d1c55c1060eac1a81ab5393dcc5 Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 17:32:44 -0700 Subject: [PATCH 08/29] cursor tick --- www/games/orbit-idle/src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/www/games/orbit-idle/src/index.ts b/www/games/orbit-idle/src/index.ts index 7cbed00..458052b 100644 --- a/www/games/orbit-idle/src/index.ts +++ b/www/games/orbit-idle/src/index.ts @@ -34,6 +34,7 @@ const canv: Canvas = new Canvas({ canv.draw(menu, 1); tutorial.tick(dt); canv.draw(tutorial, 1); + cursor.tick(dt); canv.draw(cursor, 2); }, mousemove(x, y) { From 23f31560bfbd923cfe0af21fa469614d683dc93b Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 17:36:30 -0700 Subject: [PATCH 09/29] rotate the small planet --- www/games/orbit-idle/src/cursor.ts | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/www/games/orbit-idle/src/cursor.ts b/www/games/orbit-idle/src/cursor.ts index c185427..d8122f8 100644 --- a/www/games/orbit-idle/src/cursor.ts +++ b/www/games/orbit-idle/src/cursor.ts @@ -5,6 +5,10 @@ import { Vec3 } from 'smath'; * Represents the user's cursor */ export class Cursor implements Drawable { + /** + * 2pi + */ + private static readonly TAU: number = 2 * Math.PI; /** * Star radius */ @@ -13,6 +17,10 @@ export class Cursor implements Drawable { * Planet radius */ private static readonly smR = 2; + /** + * The rotational speed of the planet + */ + private static readonly planetHz = 1; /** * Mouse coordinates */ @@ -38,17 +46,20 @@ export class Cursor implements Drawable { * Rotate the small planet */ public tick(dt: number): void { - this.planetAngle = (this.planetAngle + dt) % (2 * Math.PI); + const dtheta: number = Cursor.TAU * Cursor.planetHz * dt / 1e3; + this.planetAngle = (this.planetAngle + dtheta) % Cursor.TAU; } public draw(graphics: CanvasRenderingContext2D): void { + // Draw the main sequence star graphics.fillStyle = 'white'; graphics.beginPath(); - graphics.arc(this.pos.x, this.pos.y, Cursor.lgR, 0, 2 * Math.PI); + graphics.arc(this.pos.x, this.pos.y, Cursor.lgR, 0, Cursor.TAU); graphics.fill(); + // Draw the small orbiting planet const planetPos: Vec3 = this.pos.plus(Vec3.fromPolar(Cursor.lgR + Cursor.smR, this.planetAngle)); graphics.fillStyle = 'red'; graphics.beginPath(); - graphics.arc(planetPos.x, planetPos.y, Cursor.smR, 0, 2 * Math.PI); + graphics.arc(planetPos.x, planetPos.y, Cursor.smR, 0, Cursor.TAU); graphics.fill(); } } From 21696dacb9521f9f17fab63631acb4116a4421c0 Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 17:39:15 -0700 Subject: [PATCH 10/29] ascension requirements based on income --- www/games/orbit-idle/src/player.ts | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/www/games/orbit-idle/src/player.ts b/www/games/orbit-idle/src/player.ts index 45eaf97..2a9b20a 100644 --- a/www/games/orbit-idle/src/player.ts +++ b/www/games/orbit-idle/src/player.ts @@ -23,7 +23,6 @@ export class Player implements Drawable { */ public earn(amount: number): void { this.data.money += amount; - this.data.accumulation += amount; } /** * Spend a certain amount of money from the player's bank @@ -38,22 +37,10 @@ export class Player implements Drawable { return this.data.money >= amount; } /** - * Current player score `log10(money)` + * Calculate the income required to ascend (gain another planet/orbit) */ - public score(): number { - return this.data.accumulation > 1 ? Math.log10(this.data.accumulation) : 0; - } - /** - * Calculate the score required to gain another planet/orbit - */ - public scoreRequired(): number { - return (1.25 * (this.data.orbits ** 1.75) + 1) | 0; - } - /** - * Determine if this player can ascend - */ - public canAscend(): boolean { - return this.score() >= this.scoreRequired(); + public incomeRequired(): number { + return 10 ** ((1.25 * (this.data.orbits ** 1.75) + 1) | 0); } /** * Get the total number of orbits @@ -66,7 +53,6 @@ export class Player implements Drawable { */ public ascend(): void { this.data.money = 0; - this.data.accumulation = 0; this.data.orbits++; } /** @@ -80,7 +66,6 @@ export class Player implements Drawable { */ public load(data: PlayerData = defaultPlayerData): void { this.data.money = SMath.clamp(data.money, 0, Infinity); - this.data.accumulation = SMath.clamp(data.accumulation, this.data.money, Infinity); this.data.orbits = SMath.clamp(data.orbits, 2, Infinity) | 0; } public draw(graphics: CanvasRenderingContext2D): void { @@ -100,12 +85,10 @@ export class Player implements Drawable { */ export interface PlayerData { money: number; - accumulation: number; orbits: number; } const defaultPlayerData: PlayerData = { money: 0, - accumulation: 0, orbits: 2, }; From d34c66780f82be671660e1e289b808ae6de6a0d3 Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 17:43:28 -0700 Subject: [PATCH 11/29] update ascension requirements --- www/games/orbit-idle/src/button-full.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/games/orbit-idle/src/button-full.ts b/www/games/orbit-idle/src/button-full.ts index 6fc272b..82c3b66 100644 --- a/www/games/orbit-idle/src/button-full.ts +++ b/www/games/orbit-idle/src/button-full.ts @@ -29,8 +29,8 @@ export class FullAscendButton extends Button { * Update the text property of this button */ private setText(): void { - super.text = `+1 Planet\n${N(player.score())}/${N(player.scoreRequired())}\nNew system`; - super.enabled = player.canAscend(); + super.text = `+1 Planet\n$${N(player.incomeRequired())}/s\nNew system`; + super.enabled = income.getIncomePerSecond() > player.incomeRequired(); } public draw(graphics: CanvasRenderingContext2D): void { this.setText(); From d10a681e09f1f22b6d9c6e5f277a0824aa0598b9 Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 17:51:51 -0700 Subject: [PATCH 12/29] update tutorial wording --- www/games/orbit-idle/src/tutorial.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/games/orbit-idle/src/tutorial.ts b/www/games/orbit-idle/src/tutorial.ts index 9bdb052..858a436 100644 --- a/www/games/orbit-idle/src/tutorial.ts +++ b/www/games/orbit-idle/src/tutorial.ts @@ -72,7 +72,7 @@ export class Tutorial implements Drawable { new Help('This is your total income and\ntotal revolutions per second.\nEach time any planet completes\none full revolution, you earn\nthe income under $/rev.', -10, 0, 600, 50, 200, 80), new Help('Use the Zoom controls on the top right to focus\non different planets. Zooming changes the store\nbuttons and income labels to match the focused orbit.', -10, 0, 675, 150, 100, 60), new Help('For convenience, you can buy\nspeed upgrades in bulk. It\ndoes not affect ascending.', -10, 0, 660, 220, 130, 60), - new Help('When you have accumulated enough income,\nyou will be given the option to perform\na full ascension. This resets the entire\nsolar system, but adds an additional planet.\nThe required "score" is the log10 of your\naccumulated cash. For example, 9 = $1B.', -10, 0, 660, 290, 130, 70), + new Help('When you have make the required income\nper second, you will be given the option\nto perform a full ascension. This resets\nthe entire solar system, but adds\nan additional planet.', -10, 0, 660, 290, 130, 70), new Help('Open Menu > Tutorial anytime to review these slides.\nYour progress saves automatically, and the game\ncontinues earning even when the tab is not active.\nClick "End Tutorial" to close this message.\nGood luck!', -10, 75, 660, 375, 130, 175), ]; this.setButtonAbility(); From d0900d42b0345cb4675c6464102ecb330e12eee7 Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 17:59:02 -0700 Subject: [PATCH 13/29] cleanup some code --- www/games/orbit-idle/src/orbit.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/games/orbit-idle/src/orbit.ts b/www/games/orbit-idle/src/orbit.ts index b4fde60..2d4959f 100644 --- a/www/games/orbit-idle/src/orbit.ts +++ b/www/games/orbit-idle/src/orbit.ts @@ -93,9 +93,10 @@ export class Orbit implements Drawable { * Get the cost for the next `N` levels. */ public getNextNCost(n: number): number { + const ascensionMult: number = this.ascCostIncrease ** this.data.ascensions; let cost = 0; for (let level = this.data.speedLevel; level < SMath.clamp(this.data.speedLevel + n, 0, this.maxSpeedLevel); level++) { - cost += this.baseCost * (this.costIncrease ** level) * (this.ascCostIncrease ** this.data.ascensions); + cost += this.baseCost * (this.costIncrease ** level) * ascensionMult; } return cost; } @@ -135,7 +136,6 @@ export class Orbit implements Drawable { if (this.isMaxed()) { this.data.ascensions += n | 0; this.data.angle = 0; - // this.data.rotations = 0; this.data.speedLevel = 0; } } From 6250e6bea5b9b44631af6975e546b30d55eab9ad Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 18:00:34 -0700 Subject: [PATCH 14/29] make ascensions more expensive --- www/games/orbit-idle/src/orbit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/games/orbit-idle/src/orbit.ts b/www/games/orbit-idle/src/orbit.ts index 2d4959f..05d6879 100644 --- a/www/games/orbit-idle/src/orbit.ts +++ b/www/games/orbit-idle/src/orbit.ts @@ -54,7 +54,7 @@ export class Orbit implements Drawable { this.maxSpeedLevel = 100; this.baseCost = 10 ** index; this.costIncrease = 1.02 + 0.02 * index; - this.ascCostIncrease = 1.25 + 0.05 * index; + this.ascCostIncrease = 2.25 + 0.05 * index; } /** * Copy orbit data for saving this orbit. From 8e5d39e24fef600d6b83eecb51e62098376e52c9 Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 20:41:43 -0700 Subject: [PATCH 15/29] help is now actually a button --- www/games/orbit-idle/src/help.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/www/games/orbit-idle/src/help.ts b/www/games/orbit-idle/src/help.ts index 460760d..e2b2d2e 100644 --- a/www/games/orbit-idle/src/help.ts +++ b/www/games/orbit-idle/src/help.ts @@ -1,11 +1,11 @@ -import { Drawable } from 'graphico'; import { Color } from 'viridis'; import { Label } from './label'; +import { Button } from './button'; /** * Represents a help message */ -export class Help implements Drawable { +export class Help extends Button { /** * Shade color for the background */ @@ -33,7 +33,8 @@ export class Help implements Drawable { /** * Create a new help message with optional highlighted region. */ - constructor(text: string, textOffsetX: number, textOffsetY: number, private readonly x: number, private readonly y: number, private readonly w: number, private readonly h: number) { + constructor(text: string, textOffsetX: number, textOffsetY: number, protected readonly x: number, protected readonly y: number, protected readonly w: number, protected readonly h: number, callback: () => void) { + super('', new Color(0, 0, 0, 0), true, x, y, w, h, callback); this.tip = new Label(text, Help.highlightStroke, 1, false, textOffsetX < 0 ? 'right' : 'left', 'top', x + textOffsetX, y + textOffsetY); } /** @@ -52,11 +53,13 @@ export class Help implements Drawable { // Render label and highlighted region this.tip.draw(graphics); graphics.lineWidth = 2; - graphics.fillStyle = Help.highlightFill.toString(); graphics.strokeStyle = Help.highlightStroke.toString(); graphics.strokeRect(this.x, this.y, this.w, this.h); if (this.time > Help.highlightBlinkMS) { - graphics.fillRect(this.x, this.y, this.w, this.h); + super.color = Help.highlightFill; + } else { + super.color = new Color(0, 0, 0, 0); } + super.draw(graphics); } } From 99b21752be16beaf73324b757ad938297888e0a0 Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 20:42:04 -0700 Subject: [PATCH 16/29] remove tutorial controls --- www/games/orbit-idle/src/tutorial.ts | 99 +++++----------------------- 1 file changed, 15 insertions(+), 84 deletions(-) diff --git a/www/games/orbit-idle/src/tutorial.ts b/www/games/orbit-idle/src/tutorial.ts index 858a436..0477676 100644 --- a/www/games/orbit-idle/src/tutorial.ts +++ b/www/games/orbit-idle/src/tutorial.ts @@ -1,6 +1,5 @@ import { Drawable } from 'graphico'; import { Color } from 'viridis'; -import { Button } from './button'; import { Label } from './label'; import { Help } from './help'; @@ -8,30 +7,6 @@ import { Help } from './help'; * Represents the in-game tutorial. */ export class Tutorial implements Drawable { - /** - * Button sizing - */ - private static readonly btnSize: number = Label.fontSize * 2; - /** - * Button padding - */ - private static readonly btnPad: number = Label.fontSize / 2; - /** - * Button color - */ - private static readonly btnColor: Color = new Color(200, 200, 200); - /** - * Navigation title - */ - private readonly title: Label; - /** - * Next button - */ - private readonly next: Button; - /** - * Back button - */ - private readonly back: Button; /** * Determines whether or not the tutorial is visible */ @@ -55,27 +30,23 @@ export class Tutorial implements Drawable { /** * Create a new tutorial instance. */ - constructor(x: number, y: number) { - this.title = new Label('', new Color(255, 255, 255), 1, false, 'center', 'bottom', x, y - Tutorial.btnPad); - this.back = new Button('<', Tutorial.btnColor, true, x - Tutorial.btnSize - Tutorial.btnPad / 2, y, Tutorial.btnSize, Tutorial.btnSize, () => this.backPage()); - this.next = new Button('>', Tutorial.btnColor, true, x + Tutorial.btnPad / 2, y, Tutorial.btnSize, Tutorial.btnSize, () => this.nextPage()); + constructor() { this.first = new Label('Welcome to Orbit Idle!\n\nNeed help?\n\nOpen Menu and click Tutorial\nfor a quick guided tour.', new Color(255, 255, 255), 1.5, true, 'center', 'top', 0, Label.fontSize * 5); this.visible = false; this.firstDuration = 0; this.helpPage = 0; this.pages = [ - new Help('Welcome!\nOrbit Idle is all about building a strong\nsolar system. Each orbit spins to generate\ncash, and more planets compound your income\nfor faster growth. Click ">" to continue.', 0, -75, 325, 375, 150, 75), - new Help('This is your personal bank.\nThis indicates your spending power.', 0, -30, 5, 550, 790, 45), - new Help('Click the buy buttons to spend cash\nto speed up individual orbits.\nTry upgrading your red planet now!', 140, 0, 5, 100, 130, 400), - new Help('When an orbit reaches its max speed, you\ncan Ascend it. Ascensions are expensive\nand reset speed for that orbit, but\nincrease your long-term income.', 140, 0, 135, 100, 130, 400), - new Help('The breakdown of your income is shown here.\nEach planet gains +0.01 bonus each planetary year\nby completing a full revolution around the sun.\nBonuses from individual orbits are multiplied\ntogether and raised to their ascension level.', 0, 50, 5, 5, 790, 45), - new Help('This is your total income and\ntotal revolutions per second.\nEach time any planet completes\none full revolution, you earn\nthe income under $/rev.', -10, 0, 600, 50, 200, 80), - new Help('Use the Zoom controls on the top right to focus\non different planets. Zooming changes the store\nbuttons and income labels to match the focused orbit.', -10, 0, 675, 150, 100, 60), - new Help('For convenience, you can buy\nspeed upgrades in bulk. It\ndoes not affect ascending.', -10, 0, 660, 220, 130, 60), - new Help('When you have make the required income\nper second, you will be given the option\nto perform a full ascension. This resets\nthe entire solar system, but adds\nan additional planet.', -10, 0, 660, 290, 130, 70), - new Help('Open Menu > Tutorial anytime to review these slides.\nYour progress saves automatically, and the game\ncontinues earning even when the tab is not active.\nClick "End Tutorial" to close this message.\nGood luck!', -10, 75, 660, 375, 130, 175), + new Help('Welcome!\nOrbit Idle is all about building a strong\nsolar system. Each orbit spins to generate\ncash, and more planets compound your income\nfor faster growth. Click to continue.', 0, -75, 325, 225, 150, 150, () => this.helpPage++), + new Help('This is your personal bank.\nThis indicates your spending power.', 0, -30, 5, 550, 790, 45, () => this.helpPage++), + new Help('Click the buy buttons to spend cash\nto speed up individual orbits.\nTry upgrading your red planet now!', 140, 0, 5, 100, 130, 400, () => this.helpPage++), + new Help('When an orbit reaches its max speed, you\ncan Ascend it. Ascensions are expensive\nand reset speed for that orbit, but\nincrease your long-term income.', 140, 0, 135, 100, 130, 400, () => this.helpPage++), + new Help('The breakdown of your income is shown here.\nEach planet gains +0.01 bonus each planetary year\nby completing a full revolution around the sun.\nBonuses from individual orbits are multiplied\ntogether and raised to their ascension level.', 0, 50, 5, 5, 790, 45, () => this.helpPage++), + new Help('This is your total income and\ntotal revolutions per second.\nEach time any planet completes\none full revolution, you earn\nthe income under $/rev.', -10, 0, 600, 50, 200, 80, () => this.helpPage++), + new Help('Use the Zoom controls on the top right to focus\non different planets. Zooming changes the store\nbuttons and income labels to match the focused orbit.', -10, 0, 675, 150, 100, 60, () => this.helpPage++), + new Help('For convenience, you can buy\nspeed upgrades in bulk. It\ndoes not affect ascending.', -10, 0, 660, 220, 130, 60, () => this.helpPage++), + new Help('When you have make the required income\nper second, you will be given the option\nto perform a full ascension. This resets\nthe entire solar system, but adds\nan additional planet.', -10, 0, 660, 290, 130, 70, () => this.helpPage++), + new Help('Open Menu > Tutorial anytime to review these slides.\nYour progress saves automatically, and the game\ncontinues earning even when the tab is not active.\nClick "End Tutorial" to close this message.\nGood luck!', -10, 75, 660, 375, 130, 175, () => this.hide()), ]; - this.setButtonAbility(); } /** * Show the tutorial @@ -83,7 +54,6 @@ export class Tutorial implements Drawable { public show(): void { this.visible = true; this.helpPage = 0; - this.setButtonAbility(); } /** * Close the tutorial @@ -91,55 +61,20 @@ export class Tutorial implements Drawable { public hide(): void { this.visible = false; } - /** - * Go forward one page - */ - private nextPage(): void { - if (this.helpPage < this.pages.length - 1) { - this.helpPage++; - this.setButtonAbility(); - } - } - /** - * Go back one page - */ - private backPage(): void { - if (this.helpPage > 0) { - this.helpPage--; - this.setButtonAbility(); - } - } - /** - * Set the enabled/disabled property for the pagination buttons. - */ - private setButtonAbility(): void { - if (this.helpPage > 0) { - this.back.enable(); - } else { - this.back.disable(); - } - if (this.helpPage < this.pages.length - 1) { - this.next.enable(); - } else { - this.next.disable(); - } - } /** * Check if the mouse is currently hovering over any of the controls. */ public checkHover(mx: number, my: number): void { - if (this.visible) { - this.back.checkHover(mx, my); - this.next.checkHover(mx, my); + for (const page of this.pages) { + page.checkHover(mx, my); } } /** * Check if the mouse has clicked on any of the controls. */ public click(button: number): void { - if (this.visible) { - this.back.click(button); - this.next.click(button); + for (const page of this.pages) { + page.click(button); } } /** @@ -162,10 +97,6 @@ export class Tutorial implements Drawable { public draw(graphics: CanvasRenderingContext2D): void { if (this.visible) { this.firstDuration = 0; - this.title.value = `Help ${this.helpPage + 1}/${this.pages.length}`; - this.title.draw(graphics); - this.back.draw(graphics); - this.next.draw(graphics); this.pages[this.helpPage].draw(graphics); } if (this.firstDuration > 0) { From 6afcf17c6428cbc89da455fa40c1867c63860efa Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 20:44:17 -0700 Subject: [PATCH 17/29] just clear the highlighted area --- www/games/orbit-idle/src/help.ts | 6 ++---- www/games/orbit-idle/src/index.ts | 9 +++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/www/games/orbit-idle/src/help.ts b/www/games/orbit-idle/src/help.ts index e2b2d2e..759fa80 100644 --- a/www/games/orbit-idle/src/help.ts +++ b/www/games/orbit-idle/src/help.ts @@ -46,10 +46,8 @@ export class Help extends Button { public draw(graphics: CanvasRenderingContext2D): void { // Shade in the background graphics.fillStyle = Help.shade.toString(); - graphics.fillRect(0, 0, graphics.canvas.width, this.y); - graphics.fillRect(0, this.y + this.h, graphics.canvas.width, graphics.canvas.height); - graphics.fillRect(0, this.y, this.x, this.h); - graphics.fillRect(this.x + this.w, this.y, graphics.canvas.width, this.h); + graphics.fillRect(0, 0, graphics.canvas.width, graphics.canvas.height); + graphics.clearRect(this.x, this.y, this.w, this.h); // Render label and highlighted region this.tip.draw(graphics); graphics.lineWidth = 2; diff --git a/www/games/orbit-idle/src/index.ts b/www/games/orbit-idle/src/index.ts index 458052b..eacbc30 100644 --- a/www/games/orbit-idle/src/index.ts +++ b/www/games/orbit-idle/src/index.ts @@ -16,12 +16,13 @@ const canv: Canvas = new Canvas({ borderBlur: 'gray', width: 800, height: 600, - numLayers: 3, + numLayers: 4, showMouse: false, parent: document.getElementById('game') as HTMLElement, loop(dt) { canv.clear(1); canv.clear(2); + canv.clear(3); system.step(dt); menu.autosave(dt); canv.draw(system, 0); @@ -33,9 +34,9 @@ const canv: Canvas = new Canvas({ canv.draw(ascBtn, 1); canv.draw(menu, 1); tutorial.tick(dt); - canv.draw(tutorial, 1); + canv.draw(tutorial, 2); cursor.tick(dt); - canv.draw(cursor, 2); + canv.draw(cursor, 3); }, mousemove(x, y) { cursor.move(x, y); @@ -62,7 +63,7 @@ const canv: Canvas = new Canvas({ system.step(dt); }, blur() { - canv.draw(paused, 1); + canv.draw(paused, 2); }, }); From a03f8dfa390ed25dd0c6b1d1bff6653f6f1e3018 Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 20:45:16 -0700 Subject: [PATCH 18/29] remove extra layer --- www/games/orbit-idle/src/index.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/www/games/orbit-idle/src/index.ts b/www/games/orbit-idle/src/index.ts index eacbc30..a72e3f3 100644 --- a/www/games/orbit-idle/src/index.ts +++ b/www/games/orbit-idle/src/index.ts @@ -16,13 +16,12 @@ const canv: Canvas = new Canvas({ borderBlur: 'gray', width: 800, height: 600, - numLayers: 4, + numLayers: 3, showMouse: false, parent: document.getElementById('game') as HTMLElement, loop(dt) { canv.clear(1); canv.clear(2); - canv.clear(3); system.step(dt); menu.autosave(dt); canv.draw(system, 0); @@ -36,7 +35,7 @@ const canv: Canvas = new Canvas({ tutorial.tick(dt); canv.draw(tutorial, 2); cursor.tick(dt); - canv.draw(cursor, 3); + canv.draw(cursor, 2); }, mousemove(x, y) { cursor.move(x, y); From cbf9d234cb824757641043215f13b8e0994e0ee0 Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 20:46:37 -0700 Subject: [PATCH 19/29] access control --- www/games/orbit-idle/src/menu.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/games/orbit-idle/src/menu.ts b/www/games/orbit-idle/src/menu.ts index 417ed7b..cb5c5f0 100644 --- a/www/games/orbit-idle/src/menu.ts +++ b/www/games/orbit-idle/src/menu.ts @@ -122,7 +122,7 @@ export class Menu implements Drawable { /** * Open or close the menu depending on its current state */ - public toggle(): void { + private toggle(): void { this.isOpen = !this.isOpen; this.save.reset(); this.clear.reset(); From e1fda56f0b2cec99fc9e4210b1c3718cb1c1b46d Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 20:55:50 -0700 Subject: [PATCH 20/29] fix bug where you could click basically anywhere --- www/games/orbit-idle/src/tutorial.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/www/games/orbit-idle/src/tutorial.ts b/www/games/orbit-idle/src/tutorial.ts index 0477676..cc08991 100644 --- a/www/games/orbit-idle/src/tutorial.ts +++ b/www/games/orbit-idle/src/tutorial.ts @@ -49,10 +49,10 @@ export class Tutorial implements Drawable { ]; } /** - * Show the tutorial + * Show (or hide) the tutorial */ public show(): void { - this.visible = true; + this.visible = !this.visible; this.helpPage = 0; } /** @@ -65,17 +65,13 @@ export class Tutorial implements Drawable { * Check if the mouse is currently hovering over any of the controls. */ public checkHover(mx: number, my: number): void { - for (const page of this.pages) { - page.checkHover(mx, my); - } + this.pages[this.helpPage].checkHover(mx, my); } /** * Check if the mouse has clicked on any of the controls. */ public click(button: number): void { - for (const page of this.pages) { - page.click(button); - } + this.pages[this.helpPage].click(button); } /** * Run the tick cycle for the active help page From 19e5088a302903ffcd329c73f522bd821d5a50c6 Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 21:01:10 -0700 Subject: [PATCH 21/29] must click end tutorial --- www/games/orbit-idle/src/tutorial.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/games/orbit-idle/src/tutorial.ts b/www/games/orbit-idle/src/tutorial.ts index cc08991..9026f15 100644 --- a/www/games/orbit-idle/src/tutorial.ts +++ b/www/games/orbit-idle/src/tutorial.ts @@ -45,14 +45,14 @@ export class Tutorial implements Drawable { new Help('Use the Zoom controls on the top right to focus\non different planets. Zooming changes the store\nbuttons and income labels to match the focused orbit.', -10, 0, 675, 150, 100, 60, () => this.helpPage++), new Help('For convenience, you can buy\nspeed upgrades in bulk. It\ndoes not affect ascending.', -10, 0, 660, 220, 130, 60, () => this.helpPage++), new Help('When you have make the required income\nper second, you will be given the option\nto perform a full ascension. This resets\nthe entire solar system, but adds\nan additional planet.', -10, 0, 660, 290, 130, 70, () => this.helpPage++), - new Help('Open Menu > Tutorial anytime to review these slides.\nYour progress saves automatically, and the game\ncontinues earning even when the tab is not active.\nClick "End Tutorial" to close this message.\nGood luck!', -10, 75, 660, 375, 130, 175, () => this.hide()), + new Help('Open Menu > Tutorial anytime to review these slides.\nYour progress saves automatically, and the game\ncontinues earning even when the tab is not active.\nClick "End Tutorial" to close this message.\nGood luck!', -10, 75, 660, 375, 130, 175, () => { return }), ]; } /** * Show (or hide) the tutorial */ public show(): void { - this.visible = !this.visible; + this.visible = true; this.helpPage = 0; } /** From a222fd46f18c44868a1024966b2412a07a3f2d69 Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 21:03:03 -0700 Subject: [PATCH 22/29] next page func --- www/games/orbit-idle/src/tutorial.ts | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/www/games/orbit-idle/src/tutorial.ts b/www/games/orbit-idle/src/tutorial.ts index 9026f15..918a251 100644 --- a/www/games/orbit-idle/src/tutorial.ts +++ b/www/games/orbit-idle/src/tutorial.ts @@ -36,16 +36,16 @@ export class Tutorial implements Drawable { this.firstDuration = 0; this.helpPage = 0; this.pages = [ - new Help('Welcome!\nOrbit Idle is all about building a strong\nsolar system. Each orbit spins to generate\ncash, and more planets compound your income\nfor faster growth. Click to continue.', 0, -75, 325, 225, 150, 150, () => this.helpPage++), - new Help('This is your personal bank.\nThis indicates your spending power.', 0, -30, 5, 550, 790, 45, () => this.helpPage++), - new Help('Click the buy buttons to spend cash\nto speed up individual orbits.\nTry upgrading your red planet now!', 140, 0, 5, 100, 130, 400, () => this.helpPage++), - new Help('When an orbit reaches its max speed, you\ncan Ascend it. Ascensions are expensive\nand reset speed for that orbit, but\nincrease your long-term income.', 140, 0, 135, 100, 130, 400, () => this.helpPage++), - new Help('The breakdown of your income is shown here.\nEach planet gains +0.01 bonus each planetary year\nby completing a full revolution around the sun.\nBonuses from individual orbits are multiplied\ntogether and raised to their ascension level.', 0, 50, 5, 5, 790, 45, () => this.helpPage++), - new Help('This is your total income and\ntotal revolutions per second.\nEach time any planet completes\none full revolution, you earn\nthe income under $/rev.', -10, 0, 600, 50, 200, 80, () => this.helpPage++), - new Help('Use the Zoom controls on the top right to focus\non different planets. Zooming changes the store\nbuttons and income labels to match the focused orbit.', -10, 0, 675, 150, 100, 60, () => this.helpPage++), - new Help('For convenience, you can buy\nspeed upgrades in bulk. It\ndoes not affect ascending.', -10, 0, 660, 220, 130, 60, () => this.helpPage++), - new Help('When you have make the required income\nper second, you will be given the option\nto perform a full ascension. This resets\nthe entire solar system, but adds\nan additional planet.', -10, 0, 660, 290, 130, 70, () => this.helpPage++), - new Help('Open Menu > Tutorial anytime to review these slides.\nYour progress saves automatically, and the game\ncontinues earning even when the tab is not active.\nClick "End Tutorial" to close this message.\nGood luck!', -10, 75, 660, 375, 130, 175, () => { return }), + new Help('Welcome!\nOrbit Idle is all about building a strong\nsolar system. Each orbit spins to generate\ncash, and more planets compound your income\nfor faster growth. Click to continue.', 0, -75, 325, 225, 150, 150, () => this.next()), + new Help('This is your personal bank.\nThis indicates your spending power.', 0, -30, 5, 550, 790, 45, () => this.next()), + new Help('Click the buy buttons to spend cash\nto speed up individual orbits.\nTry upgrading your red planet now!', 140, 0, 5, 100, 130, 400, () => this.next()), + new Help('When an orbit reaches its max speed, you\ncan Ascend it. Ascensions are expensive\nand reset speed for that orbit, but\nincrease your long-term income.', 140, 0, 135, 100, 130, 400, () => this.next()), + new Help('The breakdown of your income is shown here.\nEach planet gains +0.01 bonus each planetary year\nby completing a full revolution around the sun.\nBonuses from individual orbits are multiplied\ntogether and raised to their ascension level.', 0, 50, 5, 5, 790, 45, () => this.next()), + new Help('This is your total income and\ntotal revolutions per second.\nEach time any planet completes\none full revolution, you earn\nthe income under $/rev.', -10, 0, 600, 50, 200, 80, () => this.next()), + new Help('Use the Zoom controls on the top right to focus\non different planets. Zooming changes the store\nbuttons and income labels to match the focused orbit.', -10, 0, 675, 150, 100, 60, () => this.next()), + new Help('For convenience, you can buy\nspeed upgrades in bulk. It\ndoes not affect ascending.', -10, 0, 660, 220, 130, 60, () => this.next()), + new Help('When you have make the required income\nper second, you will be given the option\nto perform a full ascension. This resets\nthe entire solar system, but adds\nan additional planet.', -10, 0, 660, 290, 130, 70, () => this.next()), + new Help('Open Menu > Tutorial anytime to review these slides.\nYour progress saves automatically, and the game\ncontinues earning even when the tab is not active.\nClick "End Tutorial" to close this message.\nGood luck!', -10, 75, 660, 375, 130, 175, () => this.next()), ]; } /** @@ -61,6 +61,14 @@ export class Tutorial implements Drawable { public hide(): void { this.visible = false; } + /** + * Navigate to the next help page + */ + private next(): void { + if (this.helpPage < this.pages.length - 1) { + this.helpPage++; + } + } /** * Check if the mouse is currently hovering over any of the controls. */ From d40d68d1f9df8e71ada98f9a4dc6e34d81840bcf Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 21:05:28 -0700 Subject: [PATCH 23/29] fix bug --- www/games/orbit-idle/src/state.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/games/orbit-idle/src/state.ts b/www/games/orbit-idle/src/state.ts index b80b080..233edce 100644 --- a/www/games/orbit-idle/src/state.ts +++ b/www/games/orbit-idle/src/state.ts @@ -26,6 +26,6 @@ export const income: Income = new Income(); export const shop: Shop = new Shop(10, 120); // Additional popups -export const tutorial: Tutorial = new Tutorial(400, 400); +export const tutorial: Tutorial = new Tutorial(); export const menu: Menu = new Menu(725, 400, 100); export const paused: Pause = new Pause('Orbit Idle has lost focus!\nThe game is NOT paused, but has\nstopped rendering to save resources.\nThe game is still running in the background.'); From 1f9a382f6e7a75c92651f80fdd02db83fb45613d Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 21:06:09 -0700 Subject: [PATCH 24/29] update version --- www/games/orbit-idle/src/state.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/games/orbit-idle/src/state.ts b/www/games/orbit-idle/src/state.ts index 233edce..9e91472 100644 --- a/www/games/orbit-idle/src/state.ts +++ b/www/games/orbit-idle/src/state.ts @@ -11,7 +11,7 @@ import { Tutorial } from './tutorial'; import { Zoom } from './zoom'; // Global constants -export const version = 'v1.1.1'; +export const version = 'v1.2.0'; // UI elements export const cursor: Cursor = new Cursor(); From e63c319eea246038cd50a8b2922c85ddfbe1f3c0 Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 21:07:38 -0700 Subject: [PATCH 25/29] remove extra curlies --- www/games/orbit-idle/src/menu.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/www/games/orbit-idle/src/menu.ts b/www/games/orbit-idle/src/menu.ts index cb5c5f0..60953a0 100644 --- a/www/games/orbit-idle/src/menu.ts +++ b/www/games/orbit-idle/src/menu.ts @@ -89,7 +89,7 @@ export class Menu implements Drawable { this.title = new Label('Menu', new Color(255, 255, 255), 1, false, 'center', 'bottom', x, y - Menu.btnPadding); this.autosaveLabel = new Label(`Created by Nicolas Ventura [${version}]`, new Color(255, 255, 255), 1, false, 'right', 'bottom', 0, 0); this.save = new ToggleButton([ - ['Save', Menu.btnColor, () => { this.saveCallback(); }], + ['Save', Menu.btnColor, () => this.saveCallback()], ['Saved!', new Color(150, 250, 150), () => { return }], ], x - (width / 2), y, width, Menu.btnHeight); this.help = new ToggleButton([ @@ -97,13 +97,13 @@ export class Menu implements Drawable { ['End Tutorial', Menu.btnColor, () => tutorial.hide()], ], x - (width / 2), y + Menu.btnHeight + Menu.btnPadding, width, Menu.btnHeight); this.mute = new ToggleButton([ - ['Mute', Menu.btnColor, () => { this.muteCallback(); }], - ['Unmute', Menu.btnColor, () => { this.unmuteCallback(); }], + ['Mute', Menu.btnColor, () => this.muteCallback()], + ['Unmute', Menu.btnColor, () => this.unmuteCallback()], ], x - (width / 2), y + (Menu.btnHeight + Menu.btnPadding) * 2, width, Menu.btnHeight); this.clear = new ToggleButton([ ['Wipe Data', Menu.btnColor, () => { return }], - ['Confirm', new Color(255, 0, 0), () => { this.clearCallback(); }], - ['Reload Page', Menu.btnColor, () => { window.location.reload(); }], + ['Confirm', new Color(255, 0, 0), () => this.clearCallback()], + ['Reload Page', Menu.btnColor, () => window.location.reload()], ], x - (width / 2), y + (Menu.btnHeight + Menu.btnPadding) * 3, width, Menu.btnHeight); this.back = new ToggleButton([ ['Menu', Menu.btnColor, () => this.toggle()], From 79706ec098575ae790e32e0163cb4f30278c6e5f Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 21:08:44 -0700 Subject: [PATCH 26/29] mandatory pun --- www/games/orbit-idle/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/games/orbit-idle/index.html b/www/games/orbit-idle/index.html index c740adf..8f7d124 100644 --- a/www/games/orbit-idle/index.html +++ b/www/games/orbit-idle/index.html @@ -17,7 +17,7 @@

Orbit Idle

-

This is the 4th game in the Revolution Idle series.

+

This game takes a new spin as the 4th game in the Revolution Idle series.

Controls: Mouse/click for everything. Instructions are shown in-game.

The original game: Revolution Idle (2017)

Fan collab/remake: Revolution Idle 2 (2017)

From e9794611094c1a73b470cbef5d27465925033cf8 Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 21:11:52 -0700 Subject: [PATCH 27/29] simplify colorizing a bit --- www/games/orbit-idle/src/help.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/www/games/orbit-idle/src/help.ts b/www/games/orbit-idle/src/help.ts index 759fa80..1159048 100644 --- a/www/games/orbit-idle/src/help.ts +++ b/www/games/orbit-idle/src/help.ts @@ -6,6 +6,10 @@ import { Button } from './button'; * Represents a help message */ export class Help extends Button { + /** + * Transparent color + */ + private static readonly transparent: Color = new Color(0, 0, 0, 0); /** * Shade color for the background */ @@ -34,7 +38,7 @@ export class Help extends Button { * Create a new help message with optional highlighted region. */ constructor(text: string, textOffsetX: number, textOffsetY: number, protected readonly x: number, protected readonly y: number, protected readonly w: number, protected readonly h: number, callback: () => void) { - super('', new Color(0, 0, 0, 0), true, x, y, w, h, callback); + super('', Help.transparent, true, x, y, w, h, callback); this.tip = new Label(text, Help.highlightStroke, 1, false, textOffsetX < 0 ? 'right' : 'left', 'top', x + textOffsetX, y + textOffsetY); } /** @@ -53,11 +57,7 @@ export class Help extends Button { graphics.lineWidth = 2; graphics.strokeStyle = Help.highlightStroke.toString(); graphics.strokeRect(this.x, this.y, this.w, this.h); - if (this.time > Help.highlightBlinkMS) { - super.color = Help.highlightFill; - } else { - super.color = new Color(0, 0, 0, 0); - } + super.color = (this.time > Help.highlightBlinkMS) ? Help.highlightFill : Help.transparent; super.draw(graphics); } } From aaef70e2edf5019de49e653d827cc27a63623d02 Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 21:13:28 -0700 Subject: [PATCH 28/29] fix bad doc --- www/games/orbit-idle/src/tutorial.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/games/orbit-idle/src/tutorial.ts b/www/games/orbit-idle/src/tutorial.ts index 918a251..dcab659 100644 --- a/www/games/orbit-idle/src/tutorial.ts +++ b/www/games/orbit-idle/src/tutorial.ts @@ -49,7 +49,7 @@ export class Tutorial implements Drawable { ]; } /** - * Show (or hide) the tutorial + * Show the tutorial */ public show(): void { this.visible = true; From dc6aba74c1e86edbeb6dbc7def0402c7be8a23f4 Mon Sep 17 00:00:00 2001 From: nicfv Date: Mon, 3 Aug 2026 21:17:20 -0700 Subject: [PATCH 29/29] update ci versions --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e54ace4..f48d7c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,15 +15,15 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Setup Bun uses: oven-sh/setup-bun@v2 - name: Build Project run: bun start && bun clean prod - name: Setup Pages - uses: actions/configure-pages@v5 + uses: actions/configure-pages@v6 - name: Upload artifact - uses: actions/upload-pages-artifact@v4 + uses: actions/upload-pages-artifact@v5 with: path: 'www' deploy: @@ -36,4 +36,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@v5