- Home
- Skills
- Game Development
- Game Rules Core
Works with the AI Agents you already use
Game Rules Core
Architecture-first game design for deterministic mechanics, state machines, and genre-specific physics rules.
Free
Game Rules Core
Example session with this skill installed
Design a core rule set for a 2D side-scrolling platformer. Include jump mechanics, win conditions, and the game loop structure.
- Read your context and instructions
- Compiled the game rules core
I have drafted the core rule set for your 2D platformer. The logic is decoupled from the frame rate and includes specific feel-enhancements like coyote time.
Platformer Core Rules (RULES.md)
| Category | Rule / Trigger | Condition | Effect | Edge Case |
|---|---|---|---|---|
| Movement | Input.Jump | IsGrounded OR CoyoteTime < 100ms | Apply JumpImpulse (8.5 units/s) | If Jump held, gravity is 0.5x for 200ms |
| Movement | Input.Left/Right | InPlayState | Apply Accel (20 units/s^2) up to MaxSpeed (12) | Flip sprite/hitbox on direction change |
| Physics | Game Loop | Every 16.6ms (Fixed) | Update -> Collision -> Resolve -> Render | Skip render if delta is too high |
| Combat | Collision (Enemy) | InvulnWindow == 0 | Health -1; Trigger Invuln (1.5s) | If Health <= 0, transition to LoseState |
| Progression | Collision (Goal) | Always | Set WinState; Save CurrentScore | Trigger celebration animation before Menu |
Technical Implementation Details
// Fixed Timestep Loop Structure
const fixedDeltaTime = 1/60;
let accumulator = 0;
function gameLoop(time) {
accumulator += (time - lastTime);
while (accumulator >= fixedDeltaTime) {
updatePhysics(fixedDeltaTime); // Logic decoupled from FPS
accumulator -= fixedDeltaTime;
}
render(time);
requestAnimationFrame(gameLoop);
}
// Coyote Time & Jump Buffering Logic
if (player.isGrounded) {
player.lastGroundedTime = Date.now();
}
const canJump = Date.now() - player.lastGroundedTime < 100; // 100ms window
Next steps
- Define the specific
JumpImpulseandGravityconstants in your physics config. - Implement the
RULES.mdtable into your unit test suite to verify state transitions. - Reference
collision.mdto handle one-way platform logic for the side-scroller.
Connects securely to your tools. The creator never sees your data.
About this skill
Game mechanics often break because logic is tied to frame rates or edge cases aren't defined before coding begins. This skill enforces a rigorous, genre-agnostic framework for designing and implementing core game rules, ensuring stability across 2D and 3D projects. It forces explicit state transitions and provides specific patterns for movement, physics, and game loops.
What it does
- State Machine Definition ensures explicit transitions between boot, menu, playing, and game-over states to prevent silent state changes.
- Physics Normalization implements fixed-timestep updates for physics and collision to decouple logic from variable frame rates.
- Rule Table Generation maps triggers and conditions to effects and edge cases for every mechanic.
- Genre-Specific Scaffolding provides pre-defined rules for platformers, runners, shooters, and puzzles, including coyote time and jump buffering.
- Boundary Enforcement prevents entities from exiting playable bounds without a defined resolution.
How it works
- Context Initialization by identifying the dimension, camera perspective, and input scheme.
- Rule Mapping where entities, states, and win/lose conditions are defined in a structured table.
- Pattern Implementation using the provided universal structure for loops and collision resolution.
- Documentation Export creating a
RULES.mdfile that acts as the single source of truth for testing.
Frameworks & tools
Engine-agnostic: it covers game rules and architecture, not engine-specific API calls. It suits Three.js and web games, and the same rules carry over to Unity, Unreal, Godot, or custom engines.
Why this beats prompting it yourself
Standard prompts often miss critical game-feel mechanics like coyote time or input buffering. This skill enforces seedable randomness and fixed timesteps, preventing the "jittery" physics and non-deterministic bugs that plague amateur implementations.
Use cases
- Drafting a deterministic state machine for a puzzle game with undo functionality.
- Configuring platformer physics with variable jump heights and coyote time windows.
- Designing a racing game checkpoint system with lap validation and anti-shortcut logic.
- Establishing a procedural spawn system for an endless runner with guaranteed passability.
Known limitations
Does not provide engine-specific syntax for shaders or rendering pipelines. Includes a collision and physics reference (references/collision.md), but no engine-specific API code.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Game Development.
Does not provide engine-specific syntax for shaders or rendering. Includes a collision and physics reference, but no engine-specific API code.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
1 use
Times used to date
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 25 days ago
- Free with an Agensi account
Permissions
File Scopes