guide

guide is a cursor rule for Cursor from thinktidevibes/2D-Survival-Multiplayer-Game. It costs 0 tokens per session (1,225 once invoked), scanned A, original, MIT.

A set of architecture rules for a 2D survival multiplayer game. The project uses a Rust server, a React and TypeScript client, and SpacetimeDB to keep game state synchronized between players.

In plain words
What is it for?
Use it when adding or changing multiplayer gameplay, server tables and reducers, inventory or environment systems, React interfaces, or client-server synchronization.
Why use it?
It explains where game logic, data tables, user-interface code, and real-time communication belong, reducing the chance of changes being placed in the wrong layer.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/thinktidevibes/2d-survival-multiplayer-game/guide
Clone the repo
git clone --depth 1 https://github.com/thinktidevibes/2D-Survival-Multiplayer-Game

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for guide

README.md
[![agentmods](https://agentmods.dev/badge/rules/thinktidevibes/2d-survival-multiplayer-game/guide.svg)](https://agentmods.dev/rules/thinktidevibes/2d-survival-multiplayer-game/guide)
Your own site
<a href="https://agentmods.dev/rules/thinktidevibes/2d-survival-multiplayer-game/guide"><img src="https://agentmods.dev/badge/rules/thinktidevibes/2d-survival-multiplayer-game/guide.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,225 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01225
Opus 5 $0.00000 $0.00613
Sonnet 5 $0.00000 $0.00245
Haiku 4.5 $0.00000 $0.00122

Measured 4d ago against content hash 013cee65ec07, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

guide scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/guide.mdc · 152 lines

How it starts

The opening of the file, as written. The whole thing — 152 lines — stays where its author put it; the contents beside it link to each section on GitHub.

2D Survival Multiplayer Architecture Guidelines

This rules file specifies the architecture, patterns, and conventions for the Vibe Coding 2D Survival Multiplayer project. AI assistants should use this information to understand the codebase structure and make appropriate recommendations.

Core Architecture

The project implements a client-server architecture with these primary components:

  1. Backend: SpacetimeDB module written in Rust (server/) for game logic, state management, and data persistence
  2. Frontend: React/TypeScript client (client/) for rendering, input handling, and user interface
  3. Communication Layer: SpacetimeDB for real-time synchronization between clients and server

Server Architecture

The backend is organized into these logical components:

  • Schema Definitions: Tables defined in server/lib.rs with #[spacetimedb::table] attributes
  • Game Logic: Reducer functions (#[spacetimedb::reducer]) implementing core gameplay mechanics
  • Module Organization: Functionality separated into domain-specific files (e.g., environment.rs, inventory_management.rs)

Key Server Patterns

  1. Table Schema Convention:

    • Use snake_case for table names (name = "player")
    • Mark tables as public when client access is required
    • Use Identity type for player identification
    • Implement Clone for all table structures
  2. Reducer Implementation:

    • Use #[spacetimedb::reducer] and appropriate return types
    • Implement core game logic in separate modules
    • Handle identity connection/disconnection explicitly
    • Use ctx.db to access database tables
  3. Database Access Pattern:

    • Access tables via ctx.db.table_name()
    • Use .identity().find(id), .identity().update(data), etc. for operations
    • Handle errors with Result<(), String> return types

Client Architecture

The client follows these organizational principles:

  • Core Components: Main game loop in App.tsx, rendering in GameScene.tsx
  • Component Structure: Character system in Player.tsx, UI in PlayerUI.tsx
  • State Management: React hooks for local state, SpacetimeDB subscriptions for shared state

Read the full file on GitHub · 152 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 152 lines · 0 tokens per session scan A 013cee65ec07

Subscribe to this mod's changes

guide is a cursor rule published in the GitHub repository thinktidevibes/2D-Survival-Multiplayer-Game (11 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,225 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.