2d-multiplayer-survival-mmorpg / rules
Cursor rule184 starsChanged 4 months agoApache-2.0View on GitHub
Apply when changing world dimensions; includes deep-sea ring and ambient edge checks
We split this change-map-size.mdc into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 7
Use this when changing world dimensions (for example 800x800 to 1000x1000).
≈ “Common” is an estimate: at least 1 in 5 of the 6,350 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
--- description: Apply when changing world dimensions; includes deep-sea ring and ambient edge checks alwaysApply: false --- # Map Size Change Guide Use this when changing world dimensions (for example `800x800` to `1000x1000`). ## Core Files to Update 1) `server/src/lib.rs` ```rust pub const WORLD_WIDTH_TILES: u32 = NEW_SIZE; pub const WORLD_HEIGHT_TILES: u32 = NEW_SIZE; ``` 2) `client/src/config/gameConfig.ts` ```ts const SERVER_WORLD_WIDTH_TILES = NEW_SIZE; const SERVER_WORLD_HEIGHT_TILES = NEW_SIZE; ``` ## Deep Sea / Edge-Zone Sync (Important) Map-size changes affect edge behavior and ocean presentation. Verify these values remain intentional: 1) Server deep-sea perimeter width: - `server/src/environment.rs` - `DEEP_SEA_OUTER_RING_TILES` 2) Client fallback deep-sea edge width: - `client/src/config/gameConfig.ts` - `DEEP_SEA_EDGE_TILES` These two should stay aligned unless you intentionally want different behavior. ## Why Deep Sea Matters - World-edge ambient logic in `client/src/components/GameCanvas.tsx` uses `gameConfig.worldWidthPx` and `gameConfig.worldHeightPx`. - Ambient selection in `client/src/hooks/useAmbientSounds.ts` uses `distanceToMapEdge` thresholds. - Procedural fallback rendering and minimap deep-sea coloring can look wrong if edge constants are out of sync. ## Build / Republish Sequence From project root: ```bash spacetime build -p ./server spacetime publish -c -p ./server broth-bullets-local spacetime generate --lang typescript --out-dir ./client/src/generated -p ./server ``` Restart client after generation (`npm run dev` if needed). ## Validation Checklist - [ ] Server and client world tile sizes match. - [ ] Server `DEEP_SEA_OUTER_RING_TILES` and client `DEEP_SEA_EDGE_TILES` intentionally match. - [ ] Player edge proximity sounds still feel correct (shore vs deep ocean near map edge). - [ ] Minimap deep-sea ring looks expected. - [ ] Ocean/deep-sea spawn behavior near perimeter still matches design intent. ## Common Pitfalls - Updating only server or only client dimensions. - Forgetting to regenerate bindings after server-side changes. - Assuming deep-sea ring should stay fixed for every map size without re-evaluation.
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 3,978 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository6 other files it gives its agents.
- .cursor/rules/engineering-rigor.mdcCursor rule
- .cursor/rules/john-carmack.mdcCursor rule
- .cursor/rules/spacetimedb-config.mdcCursor rule
- .cursor/rules/spacetimedb.mdcCursor rule
- .cursor/rules/spacetimedb-workflow.mdcCursor rule
- .cursor/rules/windows-commands.mdcCursor rule
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

