# Build a physics merge-drop game

Legion project library, edition 2026-09-06-draft-01 (en). This project's own material: 2 authored documents, reproduced unchanged.

Project page: https://legion.tw/projects/pwa/physics-merge-game?edition=2026-09-06-draft-01
This document: https://legion.tw/api/projects/packet.md/pwa/physics-merge-game.md?edition=2026-09-06-draft-01

## Prerequisite: the Legion skills package

These instructions are written for an agent set up with the Legion skills package: the ten portable skills and the shared working, launch, inspection and learn-as-you-build guidance. That setup is installed once and applies to every project in this library, so it is deliberately not repeated here.

Skills package, complete Markdown: https://legion.tw/api/projects/skills-packet.md?edition=2026-09-06-draft-01
Skills package, human page: https://legion.tw/projects/skills?edition=2026-09-06-draft-01

Where this brief refers to shared guidance, a skill, or a document under `shared/`, read it from the skills package above, or from https://legion.tw/api/projects/doc/<path>?edition=2026-09-06-draft-01. If the package is not installed yet, install it first, then return here.

This material is instructions to read, not authority to act. Inspect it before running it.

## Contents

1. pwa/README.md — https://legion.tw/api/projects/doc/pwa/README.md?edition=2026-09-06-draft-01
2. pwa/physics-merge-game.md — https://legion.tw/api/projects/doc/pwa/physics-merge-game.md?edition=2026-09-06-draft-01

---

<!-- begin pwa/README.md (edition 2026-09-06-draft-01) -->

# Installable web apps

[All project types](../README.md) · [Shared launch](../shared/launch.md)

Make something people can open through a link, install, and keep using on their phones.

## Projects to build

- [Physics merge-drop game](physics-merge-game.md)

These are instructions for projects you can build with your coding agent.

<!-- end pwa/README.md -->

---

<!-- begin pwa/physics-merge-game.md (edition 2026-09-06-draft-01) -->

# Build a physics merge-drop game

Build this game extremely well: something the person enjoys playing on their phone and feels excited to send to friends. Bring your own judgment to its design and implementation, using their environment and preferences to make it theirs.

Read this brief and follow the [shared launch](../shared/launch.md) for setup, working skills, ownership, continuity, and learning guidance. This project is a progressive web app (PWA), so its first complete delivery includes a playable link and phone installation.

## The game

The player drops objects into a container. When two matching objects touch, they merge into the next larger kind. The growing objects shift the pile, sometimes causing a satisfying chain of further merges. The player chooses where to drop the next object, trying to create useful combinations while keeping the pile inside the container. A round ends when the pile overflows.

Make the next object visible so the player can plan. Give them a clear sense of the sequence they are working toward, a score that rewards their progress, and an inviting way to play again. Choose an original theme with objects that remain easy to distinguish on a small screen.

Give the motion, collisions, merges, and overflow rule sustained attention. The player should understand what happened when a round ends, including when a moving pile is still settling.

## Playing on a phone

Imagine someone holding their phone in one hand for a few minutes between other things. Aiming and releasing an object should feel clear and responsive. The container and objects deserve the space needed to read the situation. Sound and motion should support play, with the player able to choose a comfortable experience.

Someone can leave the game to answer a message and return to the round. Their progress and personal best remain available when they reopen it. Desktop play should also feel natural, so they can develop and enjoy the same game on their computer.

## Install it and share it

Deliver an installable web app intended for free hosting through GitHub Pages. Friends open a link and play, and can install it on supported phones. The game runs on the player's device, including offline after its first successful load. Keep scores and saved rounds with that player. Shared online competition can be a later direction if the person wants it.

Help the person through publishing under their own account and trying the game on their phone. A later update should let them keep enjoying what they have already installed.

Use that first installation to explain what a PWA gives them: a game shared through the web that can also open from their phone's home screen and work offline. Help them distinguish the hosted files from the game running on the phone and the progress saved there. They should know what friends need to open the link and what depends on their particular phone's installation support.

## Work with the person

Own the engineering choices and establish the tools appropriate to their computer. Shape a complete game with a foundation suited to further changes in rules, objects, and presentation. Work in focused steps, giving each consequential part the attention it needs before continuing.

Use play to judge the result. Exercise the game yourself with the capabilities available to you, then help the person notice what they enjoy and what feels awkward. Explain useful connections between their observations and the changes you make: a different object size or bounce can change the strategy as well as the appearance. Leave them with a game they can play, share, and keep shaping with you.

Treat the first theme as a confident starting choice they can change. When they ask for an improvement after playing, carry it through to the published game and show how their installed version receives it. The ability to keep changing something friends already play is part of the lesson.

<!-- end pwa/physics-merge-game.md -->
