Skip to content

feat(vibenet): share Base Runner score on X and ramp difficulty - #225

Merged
soheimam merged 3 commits into
mainfrom
toshi/add-x-sharing-text-for-base-runner
Nov 9, 2026
Merged

soheimam merged 3 commits into
mainfrom
toshi/add-x-sharing-text-for-base-runner

Conversation

@soheimam

@soheimam soheimam commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a Share on X button to the Base Runner (/vibenet/demos/200) game-over overlay. It shows after any run that scored above 0. Clicking it opens X's post composer (x.com/intent/post) with one of two lines, picked at random on each game over:

I ate [XX] blocks on Base Runner

How long can you survive? https://chain.base.org/vibenet/demos/200
I survived [XX] blocks on Base Runner

See how long you can last: https://chain.base.org/vibenet/demos/200

Both use the run's score (blocks eaten). The game doesn't count blocks survived separately.

  • app/vibenet/demos/200/lib/share.ts: share copy, X intent URL, random line pick.
  • BlockRunner.tsx: the game-over overlay now always shows when the score is above 0. The "Post N onchain" prompt keeps its old conditions and sits next to the share button.
  • Block Runner page copy now says Denim mints a block every 200 ms (it said Cobalt). 200 ms blocks and millisecond timestamps ship in Denim; the game's code comments are updated to match.
  • New analytics helper trackBlockRunnerShare(variant, score) (block_runner_share event), listed in AGENTS.md.

Harder runs

Before this change, self-play bots never died in 10 minutes (~950+ blocks): the difficulty curve flattened after about a minute. Now:

  • Speed keeps rising past 60 blocks (+0.8 px/s per block, up to +240; top speed 960 px/s, was 720), and walls keep getting taller and wider up to ~300 blocks.
  • A heart takes 25 bites to come back (was 12).
  • FULL lasts 1.5 s (was 2.5 s), and each FULL needs 25% more food than the last.
  • Chewing slows as the belly fills, phased in over the first 240 blocks, so a wall right after a bite on a full belly costs a heart.
  • Each block gets a stable random height nudge (±20 px) seeded from its block number, so quiet stretches of the chain no longer look like rows of identical walls. Spawn timing is untouched: still exactly one block per 200 ms.

Self-play bots (perfect tapper, every-frame masher, ~7 taps/s with jitter) now average ~50 s per run, best ~160–180 blocks. The onchain leaderboard is unchanged, so existing high scores stay on top.

Screenshots

Game-over overlay at 1280×800 (forced to a 42-block game over through the dev-only __blockRunner hook):

Base Runner game over with Share on X

Clicking Share on X opened https://x.com/intent/post?text=I ate 42 blocks on Base Runner… (checked with Playwright).

Test plan

  • npx vitest run app/vibenet/demos/200: 50/50 pass, including new tests for the late ramp, chew time, FULL cost, block salt, and a self-play check that perfect tapping dies within 30–120 s.

  • Played locally on next dev.

  • npx vitest run app/vibenet/demos/200: 43/43 pass, including new lib/share.test.ts (exact copy for both lines, URL round-trip, random pick mapping).

  • Playwright against next dev: forced a game over, captured the overlay, clicked Share on X and checked the popup URL text.

  • npx eslint app/vibenet/demos/200 app/analytics/events.ts: clean.

Adds a Share on X button to the game-over overlay. Each run picks one of two share lines at random, and clicks are tracked as block_runner_share.
@vercel

vercel Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
omni-ui Ready Ready Preview Nov 9, 2026 1:11pm UTC

Request Review

@cb-heimdall

cb-heimdall commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Heimdall Review Status

Requirement Status More Info
Reviews ✅ 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
1 if authored by an app that is not allowlisted and lacks verified human attribution 0
Sum 1

Block Runner said Base Cobalt mints a block every 200 ms. 200 ms blocks and millisecond timestamps ship in Denim, so the page copy and game comments now name Denim.
Speed and wall size keep rising past the early caps, hearts refill every 25 bites, FULL lasts 1.5 s and costs more each time, and chewing slows on a full belly as the run goes on. Each block gets a stable random height nudge seeded from its block number; spawn timing stays one block per 200 ms. Self-play now asserts that perfect tapping dies within 30-120 s.
@soheimam soheimam changed the title feat(vibenet): share Base Runner score on X feat(vibenet): share Base Runner score on X and ramp difficulty Nov 9, 2026
@0x00101010
0x00101010 added this pull request to the merge queue Nov 9, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Nov 9, 2026
@soheimam
soheimam added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit db4d6ea Nov 9, 2026
13 checks passed
@soheimam
soheimam deleted the toshi/add-x-sharing-text-for-base-runner branch November 9, 2026 16:45

This branch was successfully deployed

1 active deployment
Preview — 79f1188e Deployed Nov 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants