Public: anyone can read this; the crew can change it.
Migrated from github.com/amirmushichge/pixel-plays
i want the age of empires and clash royale clones at the top #383
Merged 11h 7m ago, live in production
vesper/pixel-plays:vesper/382-i-want-the-age-of-empires-and-clash-roya → main 0 commits fork
5 files
changed +18
−6
README.md +2 −2
| @@ -9,6 +9,8 @@ Concept by [abhi](https://x.com/awwbhi2). Game by [AmirMushich](https://x.com/Am | ||
| 9 | 9 | ## Games |
| 10 | 10 | | Game | What you do | Input | |
| 11 | 11 | |------|-------------|-------| |
| 12 | | [](empire/) | A real-time strategy game on a 44 by 44 map against a red bot (easy, normal or hard): four villagers and a town center each, gather food, wood, gold and stone, build houses, camps, farms and military buildings, climb the Dark, Feudal, Castle and Imperial Ages, research upgrades, train militia, spearmen, archers, knights and rams, and destroy every town center and castle of the enemy; fog of war, a minimap, attack alerts, pause, 1x/2x/4x speed, an autopilot, a save that survives a reload and a best time per level (forged by the crew on the engine and shell above, not by the original creators) | Tap or drag a box to select, tap to command, panel buttons to build and train; arrows move the view, Enter taps its centre cross, 1-9 press buttons | | |
| 13 | | [](tower-duel/) | A 90-second two-lane card battle against a seeded rival on a field split by a river with a bridge in each lane: elixir fills over time (twice as fast in the last 30 seconds), pick a card from a hand of four (Knight, Archers, Giant, Goblins, Brute, Fireball) and put its troops on your half, and they walk over a bridge to fight and hit the rival towers; Fireball lands anywhere; toppling the rival king tower wins at once, otherwise more towers down, then more tower health, wins on the clock; a homage to Supercell's Clash Royale in idea only (forged by the crew on the engine and shell above, not by the original creators; rules in `tower-duel/duel.js`) | Tap a card, then tap your half; 1-4 to pick, arrows move a ring, Space plays | | |
| 12 | 14 | | [](balote/) | Bocce against a bot, first to 5 | Drag back and release; arrows + space | |
| 13 | 15 | | [](paper-route/) | Ten newspapers thrown from a passing bike: porch 3, lawn 1, a window costs 2 (forged by the crew on the engine and shell above, not by the original creators) | Tap; space | |
| 14 | 16 | | [](stari-most/) | Five dives off the old bridge, flip and enter the water vertically | Hold and release | |
| @@ -68,11 +70,9 @@ Concept by [abhi](https://x.com/awwbhi2). Game by [AmirMushich](https://x.com/Am | ||
| 68 | 70 | | [](chimney-sweep/) | A cut-away brick chimney stack with four flues side by side, rooftops along the top and a sweep with a top hat and a brush: pull to climb 1 m (the brush then cools for half a second before the next pull and you slide back down), change flue to dodge the round grey smoke puffs rising up the flues, a hit knocks you down 3 m and costs a brush of three, and reaching the roof 20 m up within 60 seconds wins, scored for speed and brushes left; the lives show as brushes (forged by the crew on the engine and shell above, not by the original creators; rules in `chimney-sweep/roofs.js`) | Tap or space to pull; left/right arrows or swipe to change flue | |
| 69 | 71 | | [](fence-posts/) | A meadow staked with a four-by-four grid of posts and one to five sheep grazing in each pen: you and a farmer take turns building one length of fence between two posts, whoever closes a pen's fourth side claims it, its sheep and its flag and fences again, and when all 40 lengths stand the most sheep wins (a tie goes to more pens); your fences are blue rails with striped flags and the farmer's are woven wattle with checked flags, so they differ by pattern as well as colour, and the farmer's turn plays out a length at a time (forged by the crew on the engine and shell above, not by the original creators; rules in `fence-posts/field.js`) | Tap between two posts; arrows move the highlight, Enter builds | |
| 70 | 72 | | [](conkers/) | A school playground under a horse-chestnut tree, your conker (double knot and a chalk cross) and the rival's hanging side by side on their strings, and a power meter that sweeps up and down: tap the canvas, or press Space or Enter, to swing when the meter is where you want it; the gold sweet spot (marked by a notch) does 4 damage, anywhere else up to the hatched end does 1, and the hatched end tangles the strings, does nothing and passes the turn; you and the rival swing in turn (their reading comes from the seed, shown as a red pointer), crack all 3 rivals' conkers (6, 8 and 10 hit points) before yours (12) cracks, scoring 100 for each and 10 for each hit point left; cracks show on the conkers (forged by the crew on the engine and shell above, not by the original creators; rules in `conkers/match.js`) | Tap, or Space | |
| 71 | | [](empire/) | A real-time strategy game on a 44 by 44 map against a red bot (easy, normal or hard): four villagers and a town center each, gather food, wood, gold and stone, build houses, camps, farms and military buildings, climb the Dark, Feudal, Castle and Imperial Ages, research upgrades, train militia, spearmen, archers, knights and rams, and destroy every town center and castle of the enemy; fog of war, a minimap, attack alerts, pause, 1x/2x/4x speed, an autopilot, a save that survives a reload and a best time per level (forged by the crew on the engine and shell above, not by the original creators) | Tap or drag a box to select, tap to command, panel buttons to build and train; arrows move the view, Enter taps its centre cross, 1-9 press buttons | | |
| 72 | 73 | | [](hot-air-balloon/) | Five flights over patchwork farm fields with hedgerows, a windsock and one field marked with a white cross: hold the burner and the balloon climbs slowly after a short lag, let go and it sinks; the air has three height bands that each blow their own way and a little differently each flight, shown by drifting cloud wisps, three arrows at the left and a pennant on the basket, so you steer only by choosing a height (the ready screen before each flight already shows that flight's winds, so read them first); touching the ground ends the flight and the landing scores by distance from the cross (on it 5, inside its field 3, a neighbouring field 1, trees or the pond 0), each flight from a new launch point; 15 or more of 25 wins; the balloon's shadow on the fields shows where it is over (forged by the crew on the engine and shell above, not by the original creators) | Press and hold the canvas; hold space or the up arrow | |
| 73 | 74 | | [](go-kart/) | Three races of three laps round a village track against three rivals: hold to drive, let go to brake, and a yellow board before each bend shows the fastest speed to enter it at; go in faster and you sit a second in the hay bales; first scores 3, second 2, third 1, and 6 points wins (forged by the crew on the engine and shell above, not by the original creators) | Hold; space | |
| 74 | 75 | | [](cloakroom/) | A coat check with two rails of coats, each with a paper tag: turn two tags at a time, a matching pair is handed back and a mismatch turns back after 0.8 s; three rounds of 6, 8 and 10 pairs, 90 seconds each, and more than 12 mismatches in all (or a clock at zero) ends it; the coats sway and light moves under the door, the number and colour on a turned tag mean it plays muted too (forged by the crew on the engine and shell above, not by the original creators) | Tap a coat; arrows move a ring, space or enter turns | |
| 75 | | [](tower-duel/) | A 90-second two-lane card battle against a seeded rival on a field split by a river with a bridge in each lane: elixir fills over time (twice as fast in the last 30 seconds), pick a card from a hand of four (Knight, Archers, Giant, Goblins, Brute, Fireball) and put its troops on your half, and they walk over a bridge to fight and hit the rival towers; Fireball lands anywhere; toppling the rival king tower wins at once, otherwise more towers down, then more tower health, wins on the clock; a homage to Supercell's Clash Royale in idea only (forged by the crew on the engine and shell above, not by the original creators; rules in `tower-duel/duel.js`) | Tap a card, then tap your half; 1-4 to pick, arrows move a ring, Space plays | | |
| 76 | 76 | | [](lily-pond/) | Six levels on a six-by-six pond: the frog starts on a lily pad and hops north, east, south or west to the nearest pad in that line, up to three squares away, and the pad it leaves sinks; land on every pad once (level n has n + 3 pads) and the level is cleared, but a frog with no pad left in reach loses the level, which restarts as the same pond and costs a retry; clearing all six levels with three retries or fewer wins, and a seventh retry ends the game (forged by the crew on the engine and shell above, not by the original creators; rules in `lily-pond/pond.js`) | Swipe or tap beside the frog; arrow keys | |
| 77 | 77 | | [](curling/) | One end on a sheet of ice: eight stones slid from the hack toward the house, against four opponent stones already in play (two guards, two in the rings); drag back to set power, tilt the drag to set curl (arrow keys nudge the aim and curl, hold Enter to charge a throw), and hold anywhere or Space to sweep while the stone runs, which lowers the friction so it carries further; stones that touch exchange speed, and one past the back line or over a side line is out; when the last stone stops, your stones in the house nearer the button than every opponent stone score, and 2 or more win; the crowd breathes and the ice glints (forged by the crew on the engine and shell above, not by the original creators; rules in `curling/rink.js`) | Drag back, hold to sweep; arrow keys, Enter, Space | |
| 78 | 78 | | [](hedge-maze/) | A garden maze of hedges carved from a seed, 5 by 5 cells for the first and one cell larger for each one solved, up to 12 by 12: walk from the gate to the stone fountain at the far end of the only path, one cell a step, before the gardener's bell rings 45 seconds after each maze begins (the bell starts afresh with every maze); solving 5 or more by the last bell wins, rules in `hedge-maze/maze.js`; the fountain splashes (forged by the crew on the engine and shell above, not by the original creators) | Swipe or tap beside the walker; arrow keys | |
index.html +2 −2
| @@ -63,6 +63,8 @@ footer a::after { content: none; } | ||
| 63 | 63 | </form> |
| 64 | 64 | <p id="status" role="status"></p> |
| 65 | 65 | <ul id="games"> |
| 66 | <li data-kind="Strategy" data-input="Tap" style="--accent:#3a5fa8"><a href="empire/">Empire Age</a><span>A real-time strategy game against a bot: gather, build, climb four ages, train an army and destroy the enemy town center</span><span>Game forged by the crew</span><span class="tags">Strategy · Tap</span></li> | |
| 67 | <li data-kind="Strategy" data-input="Tap" style="--accent:#8a3b3b"><a href="tower-duel/">Tower Duel</a><span>Tap a card, tap your half: send troops over the bridges and topple the rival king tower</span><span>Game forged by the crew</span><span class="tags">Strategy · Tap</span></li> | |
| 66 | 68 | <li data-kind="Throwing" data-input="Drag" style="--accent:#d9a441"><a href="balote/">Balote</a><span>Bocce against a bot, first to 5</span><span class="tags">Throwing · Drag</span></li> |
| 67 | 69 | <li data-kind="Puzzle" data-input="Tap" style="--accent:#d9822b"><a href="pumpkin-patch/">Pumpkin Patch</a><span>Water each plot and its neighbours until every pumpkin has exactly what it needs</span><span>Game forged by the crew</span><span class="tags">Puzzle · Tap</span></li> |
| 68 | 70 | <li data-kind="Timing" data-input="Hold" style="--accent:#3f8fb5"><a href="stari-most/">Stari Most</a><span>Five dives off the old bridge, flip and enter the water vertically</span><span class="tags">Timing · Hold</span></li> |
| @@ -111,11 +113,9 @@ footer a::after { content: none; } | ||
| 111 | 113 | <li data-kind="Strategy" data-input="Tap" style="--accent:#d8b25a"><a href="sandcastle/">Sandcastle Tide</a><span>Pat down sand walls between tides and keep the castle dry through five high waters</span><span>Game forged by the crew</span><span class="tags">Strategy · Tap</span></li> |
| 112 | 114 | <li data-kind="Strategy" data-input="Tap" style="--accent:#5a6e8a"><a href="lock-keeper/">Lock Keeper</a><span>Work the paddles and gates to bring every narrowboat through the flight of locks</span><span>Game forged by the crew</span><span class="tags">Strategy · Tap</span></li> |
| 113 | 115 | <li data-kind="Strategy" data-input="Tap" style="--accent:#7a8f3a"><a href="allotment/">Allotment</a><span>Plant a season of crops where each one scores by its neighbours</span><span>Game forged by the crew</span><span class="tags">Strategy · Tap</span></li> |
| 114 | <li data-kind="Strategy" data-input="Tap" style="--accent:#3a5fa8"><a href="empire/">Empire Age</a><span>A real-time strategy game against a bot: gather, build, climb four ages, train an army and destroy the enemy town center</span><span>Game forged by the crew</span><span class="tags">Strategy · Tap</span></li> | |
| 115 | 116 | <li data-kind="Precision" data-input="Hold" style="--accent:#d0453c"><a href="hot-air-balloon/">Hot Air Balloon</a><span>Five flights over the farms: hold the burner to climb into a different wind, land on the cross for 5</span><span>Game forged by the crew</span><span class="tags">Precision · Hold</span></li> |
| 116 | 117 | <li data-kind="Racing" data-input="Hold" style="--accent:#e0a526"><a href="go-kart/">Go-Kart Fete</a><span>Hold to race, let go for the bends: three laps round the hay bales against three rivals</span><span>Game forged by the crew</span><span class="tags">Racing · Hold</span></li> |
| 117 | 118 | <li data-kind="Memory" data-input="Tap" style="--accent:#9c3d6b"><a href="cloakroom/">Cloakroom</a><span>Turn two tags at a time and hand back every matching coat before the dance lets out</span><span>Game forged by the crew</span><span class="tags">Memory · Tap</span></li> |
| 118 | <li data-kind="Strategy" data-input="Tap" style="--accent:#8a3b3b"><a href="tower-duel/">Tower Duel</a><span>Tap a card, tap your half: send troops over the bridges and topple the rival king tower</span><span>Game forged by the crew</span><span class="tags">Strategy · Tap</span></li> | |
| 119 | 119 | <li data-kind="Puzzle" data-input="Keys" style="--accent:#2f7a6a"><a href="lily-pond/">Lily Pond</a><span>Hop the frog onto every lily pad once before they sink</span><span>Game forged by the crew</span><span class="tags">Puzzle · Keys</span></li> |
| 120 | 120 | <li data-kind="Sport" data-input="Drag" style="--accent:#4a7bb7"><a href="curling/">Curling Rink</a><span>Slide and sweep your stones closest to the button</span><span>Game forged by the crew</span><span class="tags">Sport · Drag</span></li> |
| 121 | 121 | <li data-kind="Puzzle" data-input="Tap" style="--accent:#8a4b2f"><a href="shunting-yard/">Shunting Yard</a><span>Shunt the wagons through the sidings until the train leaves in order</span><span>Game forged by the crew</span><span class="tags">Puzzle · Tap</span></li> |
og/home.png
Binary file not shown.
serve.test.mjs +12
| @@ -810,3 +810,15 @@ test('Tide Crossing and its rules script are served without a track', async () = | ||
| 810 | 810 | expect(page.headers.get('content-type')).toBe('text/html; charset=utf-8'); |
| 811 | 811 | expect((await fetch(base + '/tide-crossing/causeway.js')).status).toBe(200); |
| 812 | 812 | }); |
| 813 | ||
| 814 | test('Empire Age and Tower Duel, the two strategy headliners, come first on the home page and in the catalogue', async () => { | |
| 815 | const html = await (await fetch(base + '/')).text(); | |
| 816 | const list = html.slice(html.indexOf('<ul id="games">'), html.indexOf('</ul>')); | |
| 817 | const hrefs = [...list.matchAll(/<a href="([^"]+)\/">/g)].map(m => m[1]); | |
| 818 | expect(hrefs.slice(0, 2)).toEqual(['empire', 'tower-duel']); | |
| 819 | globalThis.window = globalThis; | |
| 820 | try { | |
| 821 | await import('./shell.js?headliners'); | |
| 822 | expect(window.PixelPlays.GAMES.slice(0, 2).map(g => g.id)).toEqual(['empire', 'tower-duel']); | |
| 823 | } finally { delete globalThis.window; delete globalThis.PixelPlays; } | |
| 824 | }); |
shell.js +2 −2
| @@ -3,6 +3,8 @@ | ||
| 3 | 3 | window.PixelPlays = (() => { |
| 4 | 4 | // add a game here and give it a folder, a one-line `blurb`, a `kind` (Sport, Throwing, Timing, Catching, Precision, Racing, Memory, Strategy, Puzzle, Climbing, Arcade), an `input` (Tap, Hold, Drag, Keys) and an `accent` colour for its card (the home page lists it from here) (`music: false` when it has no track, `forged: true` when it was made on the forge rather than by the original creators); `soon` entries show in the menu but do not link |
| 5 | 5 | const GAMES = [ |
| 6 | { id: 'empire', title: 'Empire Age', blurb: 'A real-time strategy game against a bot: gather, build, climb four ages, train an army and destroy the enemy town center', kind: 'Strategy', input: 'Tap', accent: '#3a5fa8', music: false, forged: true }, | |
| 7 | { id: 'tower-duel', title: 'Tower Duel', blurb: 'Tap a card, tap your half: send troops over the bridges and topple the rival king tower', kind: 'Strategy', input: 'Tap', accent: '#8a3b3b', music: false, forged: true }, | |
| 6 | 8 | { id: 'balote', title: 'Balote', blurb: 'Bocce against a bot, first to 5', kind: 'Throwing', input: 'Drag', accent: '#d9a441' }, |
| 7 | 9 | { id: 'stari-most', title: 'Stari Most', blurb: 'Five dives off the old bridge, flip and enter the water vertically', kind: 'Timing', input: 'Hold', accent: '#3f8fb5' }, |
| 8 | 10 | { id: 'laundry', title: 'Rooftop Laundry', blurb: 'Get the washing into the basket before the storm', kind: 'Catching', input: 'Drag', accent: '#c8604a' }, |
| @@ -49,11 +51,9 @@ window.PixelPlays = (() => { | ||
| 49 | 51 | { id: 'sandcastle', title: 'Sandcastle Tide', blurb: 'Pat down sand walls between tides and keep the castle dry through five high waters', kind: 'Strategy', input: 'Tap', accent: '#d8b25a', music: false, forged: true }, |
| 50 | 52 | { id: 'lock-keeper', title: 'Lock Keeper', blurb: 'Work the paddles and gates to bring every narrowboat through the flight of locks', kind: 'Strategy', input: 'Tap', accent: '#5a6e8a', music: false, forged: true }, |
| 51 | 53 | { id: 'allotment', title: 'Allotment', blurb: 'Plant a season of crops where each one scores by its neighbours', kind: 'Strategy', input: 'Tap', accent: '#7a8f3a', music: false, forged: true }, |
| 52 | { id: 'empire', title: 'Empire Age', blurb: 'A real-time strategy game against a bot: gather, build, climb four ages, train an army and destroy the enemy town center', kind: 'Strategy', input: 'Tap', accent: '#3a5fa8', music: false, forged: true }, | |
| 53 | 54 | { id: 'hot-air-balloon', title: 'Hot Air Balloon', blurb: 'Five flights over the farms: hold the burner to climb into a different wind, land on the cross for 5', kind: 'Precision', input: 'Hold', accent: '#d0453c', music: false, forged: true }, |
| 54 | 55 | { id: 'go-kart', title: 'Go-Kart Fete', blurb: 'Hold to race, let go for the bends: three laps round the hay bales against three rivals', kind: 'Racing', input: 'Hold', accent: '#e0a526', music: false, forged: true }, |
| 55 | 56 | { id: 'cloakroom', title: 'Cloakroom', blurb: 'Turn two tags at a time and hand back every matching coat before the dance lets out', kind: 'Memory', input: 'Tap', accent: '#9c3d6b', music: false, forged: true }, |
| 56 | { id: 'tower-duel', title: 'Tower Duel', blurb: 'Tap a card, tap your half: send troops over the bridges and topple the rival king tower', kind: 'Strategy', input: 'Tap', accent: '#8a3b3b', music: false, forged: true }, | |
| 57 | 57 | { id: 'lily-pond', title: 'Lily Pond', blurb: 'Hop the frog onto every lily pad once before they sink', kind: 'Puzzle', input: 'Keys', accent: '#2f7a6a', music: false, forged: true }, |
| 58 | 58 | { id: 'curling', title: 'Curling Rink', blurb: 'Slide and sweep your stones closest to the button', kind: 'Sport', input: 'Drag', accent: '#4a7bb7', music: false, forged: true }, |
| 59 | 59 | { id: 'shunting-yard', title: 'Shunting Yard', blurb: 'Shunt the wagons through the sidings until the train leaves in order', kind: 'Puzzle', input: 'Tap', accent: '#8a4b2f', music: false, forged: true }, |
new above
offline