Skip to content

Commit 8fb9b5a

Browse files
committed
Add isometric fleet template with mobile agent support
1 parent e6bb6db commit 8fb9b5a

File tree

15 files changed

+2309
-0
lines changed

15 files changed

+2309
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to the MEW Protocol CLI will be documented in this file.
44

55
## [Unreleased]
66

7+
### Added
8+
- **Isometric Fleet template** – Phaser/Electron client, harbor master world server, MCP ship controls, and eight-participant space for multiplayer navigation demos.
9+
- **MobileMEWAgent superclass** – Movement-aware extension of `MEWAgent` with stream bookkeeping, throttled move commands, and grid-based pathfinding for AI locomotion.
10+
711
## [v0.5.1] - 2025-01-06
812

913
### Fixed

docs/templates.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,60 @@ mew client connect
652652

653653
The note-taker agent is designed for simple, conversational note-taking without file system access or complex tool integration.
654654

655+
## Isometric Fleet Template
656+
657+
The **Isometric Fleet** template turns a MEW space into a multiplayer harbor. Four humans can join via the Electron/Phaser client, four MEW agents wander the docks using the new `MobileMEWAgent` superclass, and a rule-based ship sails between waypoints.
658+
659+
### What's Included?
660+
661+
- **Harbor Master** (`harbor-master`): Node-based world server that maintains terrain, players, and ship state, broadcasting positions over a MEW stream.
662+
- **AI Deckhands** (`mew-agent-1``mew-agent-4`): Mobile MEW agents that explore the docks using deterministic pathfinding (no LLM calls required).
663+
- **Electron Client** (`client/`): Cross-platform desktop client with Phaser isometric rendering, connection form, and keyboard controls.
664+
- **Ship MCP Tools**: `ship.set_manual_target` and `ship.resume_autopilot` tools let humans or agents steer the Aurora.
665+
666+
### Quick Start
667+
668+
```bash
669+
mew init isometric-fleet
670+
cd isometric-fleet
671+
mew space up
672+
673+
# Start the desktop client in another terminal
674+
cd client
675+
npm install
676+
npm start
677+
```
678+
679+
1. Launch the Electron app (`npm start`).
680+
2. Enter the gateway URL (`ws://localhost`), port from `mew space up`, target space name, token, participant ID (`human-alpha``human-delta`), and desired display name.
681+
3. Click **Connect**. The harbor renders once the world stream is active.
682+
4. Use **WASD** or arrow keys to walk. Press **B** to request a disembark.
683+
684+
### Participants and Roles
685+
686+
| Participant | Role | Notes |
687+
| -------------------- | ----------------------------------- | ----- |
688+
| `harbor-master` | World server & MCP tool host | Auto-starts, exposes ship controls |
689+
| `mew-agent-1``4` | AI deckhands using `MobileMEWAgent` | Roam the docks at 1.6 tiles/sec |
690+
| `human-alpha``delta` | Human slots for Electron client | Stream permissions + MCP access |
691+
692+
### Ship Controls (MCP Tools)
693+
694+
- `ship.set_manual_target` – Provide `{ "x": number, "y": number }` to direct the Aurora to a specific tile (must accommodate the 3×3 deck footprint).
695+
- `ship.resume_autopilot` – Revert to the default patrol loop through the harbor channel.
696+
697+
### Keyboard Controls
698+
699+
- **Arrow Keys / WASD** – Move one tile (world server enforces speed caps).
700+
- **B** – Attempt to disembark from the ship onto adjacent walkable tiles.
701+
- Boarding is automatic: step onto a deck tile and the harbor master tracks relative deck coordinates.
702+
703+
### MobileMEWAgent Highlights
704+
705+
- Requests a movement stream (`isometric-player-input`) and throttles commands based on configured speed.
706+
- Listens for world broadcast stream (`isometric-world-state`), parses terrain, and uses BFS to pick new destinations.
707+
- Default configuration avoids water tiles (`stayOnGround` optional) and runs with `mockLLM: true` for deterministic behavior.
708+
655709
## Next Steps
656710

657711
- Explore [Testing Guide](testing.md) for automated test scenarios

0 commit comments

Comments
 (0)