Skip to content

feat(games): Fruit Merge — Suika-style physics merge puzzle - #371

Merged
slaveofcode merged 2 commits into
developfrom
feat/fruit-merge
Aug 31, 2026
Merged

feat(games): Fruit Merge — Suika-style physics merge puzzle#371
slaveofcode merged 2 commits into
developfrom
feat/fruit-merge

Conversation

@slaveofcode

Copy link
Copy Markdown
Owner

What

  • Suika/watermelon-game style puzzle: drop fruits, same-tier contact merges up an 11-tier chain (cherry → watermelon), triangular scoring, next-fruit preview, drop cooldown, deadline + game over + restart, best score saved locally
  • Hand-rolled circle physics in a pure lib — no new dependency: soft positional correction with zero-restitution impulses, wall/floor constraints, speed cap, deterministic ordering
  • Two solver bugs found via a 100-drop stress sim: restitution pumping launched fruits out of the box (fixed with e=0 impulses + soft capped correction) and speed-based calm detection never fired in jammed piles (fixed with displacement-based calm tracking)
  • Island: DPR-scaled canvas, pointer aim + drop, fixed-step RAF loop with substeps
  • Registered in tools.ts + full EN/ID SEO entries; both locales built

Testing

  • 12 Vitest tests on the physics lib (gravity, settle, walls, merge, chains, game-over, drop clamping)
  • E2E: merge scoring via real pointer drops, game-over + restart flow
  • Verify loop green: 2135 unit tests, e2e 3/3, lint clean, build OK

Spec: docs/superpowers/specs/2026-08-30-fruit-merge-design.md

- Hand-rolled circle physics in a pure lib: semi-implicit Euler, soft
  positional correction (slop + capped) with zero-restitution impulses,
  wall/floor constraints with rest cutoff, speed cap, and deterministic
  ordering — no physics dependency
- Two solver bugs found and fixed via a 100-drop stress sim: restitution
  pumping launched fruits out of the box (fixed with e=0 impulses + soft
  correction), and speed-based calm detection never fired because jammed
  fruits hold phantom velocity while positionally frozen (fixed with
  displacement-based calm tracking)
- 11-tier chain cherry→watermelon, triangular scoring, next-fruit preview,
  drop cooldown, deadline with dashed render
- Island: canvas render (DPR-scaled), pointer aim + drop, fixed-step RAF
  loop with substeps, best score persisted in localStorage
- Registered in tools.ts + full EN/ID SEO entries
- E2E: merge scoring via real pointer drops, game-over + restart flow
…ries

Word-guess and fruit-merge both inserted registry/SEO entries at the same
spots; resolved by keeping both blocks in both locales.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 31, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
goodwebtools 4156b6a Aug 31 2026, 05:21 AM

@slaveofcode
slaveofcode merged commit 8d665f2 into develop Aug 31, 2026
2 of 3 checks passed
@slaveofcode
slaveofcode deleted the feat/fruit-merge branch August 31, 2026 05:20
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.

1 participant