
game-physics
Handles physics simulations in games, including collision detection, rigid body dynamics, and force applications.
- Installs
- 62
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/alphaonedev/openclaw-graph --skill game-physics- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads game-physics automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
game-physics
Purpose
This skill handles physics simulations for games, focusing on core mechanics like collision detection, rigid body dynamics, and force applications. It integrates with game engines to simulate realistic interactions, ensuring accurate physics behavior in 2D/3D environments.
When to Use
Use this skill when developing games that require physics, such as platformers, simulations, or multiplayer worlds. Apply it for scenarios involving object interactions (e.g., ball bouncing, character movement), performance-critical simulations, or when extending existing game engines like Unity or Godot. Avoid it for non-game applications or simple animations.
Key Capabilities
- Collision detection: Supports AABB, OBB, and sphere-based checks; uses algorithms like SAT for precise intersections.
- Rigid body dynamics: Simulates velocity, acceleration, and torque; integrates with Newton's laws for force applications.
- Force handling: Applies impulses, gravity, and friction; configurable via vector inputs (e.g., [x, y, z] forces).
- Simulation control: Pauses, steps, or resets simulations; handles time scaling for slow-motion effects.
- Optimization: Uses spatial partitioning (e.g., quadtrees) to reduce computation in large scenes.
Usage Patterns
Invoke this skill via OpenClaw's CLI or API for modular integration. Start by loading a scene configuration, then run simulations in a loop. For CLI, pipe inputs from files; for API, use JSON payloads. Always set up authentication with $OPENCLAW_API_KEY in your environment. Example pattern: Load config → Initialize simulation → Update loop → Output results.
Common Commands/API
Use the following CLI commands or API endpoints for interactions. All commands require authentication via $OPENCLAW_API_KEY.
-
CLI Command:
openclaw game-physics simulate --file scene.json --steps 100 --gravity 9.8- Flags:
--filefor JSON config (e.g., {"objects": [{"mass": 1.0, "position": [0,0,0]}]}),--stepsfor simulation iterations,--gravityfor vector [x,y,z]. - Example: Run with
export OPENCLAW_API_KEY=your_key; openclaw game-physics simulate --file input.json.
- Flags:
-
API Endpoint: POST /api/game-physics/simulate
- Payload: JSON like {"scene": {"objects": [{"id": "ball", "mass": 2.0, "velocity": [1,0,0]}]}, "steps": 50}
- Headers: Include
Authorization: Bearer $OPENCLAW_API_KEY - Response: JSON with results, e.g., {"positions": [{"id": "ball", "newPosition": [5,0,0]}]}
-
Code Snippet (Python CLI wrapper):
import os import subprocess api_key = os.environ.get('OPENCLAW_API_KEY') subprocess.run(['openclaw', 'game-physics', 'simulate', '--file', 'scene.json', '--steps', '10']) -
Code Snippet (API call with requests):
import requests headers = {'Authorization': f'Bearer {os.environ.get("OPENCLAW_API_KEY")}'} data = {'scene': {'objects': [{'mass': 1.0, 'position': [0,0,0]}]}, 'steps': 20} response = requests.post('https://api.openclaw.ai/api/game-physics/simulate', json=data, headers=headers)
Config formats: Use JSON for scenes, e.g., {"objects": [{"id": "obj1", "shape": "sphere", "radius": 1.0, "mass": 5.0, "position": [0,0,0]}]}. Validate with schema: objects must have "id", "shape", and physics properties.
Integration Notes
Integrate by wrapping the skill in your game loop: Call simulate after user inputs or at fixed intervals. For game engines, export results as vectors for rendering. Use hooks for custom callbacks, e.g., via --callback-url in CLI. If using with other OpenClaw skills, chain outputs (e.g., pass simulation results to a rendering skill). Ensure compatibility by matching data formats; physics outputs are in standard arrays [x,y,z]. For async operations, use API with webhooks.
Error Handling
Common errors include invalid configs (e.g., missing "mass" field), authentication failures, or simulation overflows. Handle with:
- Check
$OPENCLAW_API_KEYbefore commands; error if unset. - Validate JSON schemas using a library like jsonschema; example: If response status is 400, parse error message like "Missing field: mass".
- Code Snippet (Error handling in Python):
try: result = subprocess.run(['openclaw', 'game-physics', 'simulate', '--file', 'invalid.json'], check=True) except subprocess.CalledProcessError as e: print(f"Error: {e.returncode} - {e.stderr.decode()}") - For API: Catch HTTP errors (e.g., 401 for auth issues) and retry with exponential backoff. Log detailed errors with
--debugflag in CLI.
Concrete Usage Examples
-
Simulate a bouncing ball: Use for a simple physics demo. Command:
openclaw game-physics simulate --file ball.json --steps 50 --gravity [0,-9.8,0]. In code: Load "ball.json" with {"objects": [{"id": "ball", "shape": "sphere", "position": [0,10,0], "velocity": [5,0,0], "bounciness": 0.8}]}, then apply to update game positions every frame. -
Collision detection in a game level: For a platformer, detect hits. API call: POST /api/game-physics/simulate with {"scene": {"objects": [{"id": "player", "position": [1,2,0]}, {"id": "wall", "shape": "box", "position": [0,0,0]}]}, "steps": 1}. Process response to check for collisions and adjust player movement accordingly.
Graph Relationships
- Related to cluster: game-dev (e.g., shares data with rendering or AI skills).
- Connected skills: rendering (outputs positions for visualization), pathfinding (uses physics for dynamic environments).
- Dependencies: Requires core OpenClaw services for authentication; no direct edges to non-game clusters.
FAQ
What does the game-physics skill do?
Handles physics simulations in games, including collision detection, rigid body dynamics, and force applications.
How do I install game-physics?
Run npx skills add https://github.com/alphaonedev/openclaw-graph --skill game-physics in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/game-physics/ (personal) or .claude/skills/game-physics/ (project).
Which AI agents can use game-physics?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is game-physics safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains game-physics?
It is published by alphaonedev in alphaonedev/openclaw-graph. It has 62 recorded installs.
More from alphaonedev/openclaw-graph
playwright-scraper
alphaonedev/openclaw-graph
Playwright web scraping: dynamic content, auth flows, pagination, data extraction, screenshots
humanize-ai-text
alphaonedev/openclaw-graph
AI text humanization: reduce AI-detection patterns, natural phrasing, tone adjustment
gcp-iam
alphaonedev/openclaw-graph
Manages identity and access control for Google Cloud resources using IAM policies and roles.
macos-automation
alphaonedev/openclaw-graph
AppleScript, JXA, Shortcuts, Automator, osascript, System Events, accessibility API
food-order
alphaonedev/openclaw-graph
Food delivery: DoorDash/UberEats/Grubhub ordering, restaurant search, order status tracking
tavily-web-search
alphaonedev/openclaw-graph
Open the skill to read its SKILL.md instructions.
Popular education & science skills
teach
mattpocock/skills
Teach the user a new skill or concept, within this workspace.
scaffold-exercises
mattpocock/skills
Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.
paper-context-resolver
lllllllama/rigorpilot-skills
Rigor Paper Context helper for README-first deep learning repo reproduction. Use only when the README and repository files leave a narrow reproduction-critical gap and the task is to resolve a specific paper detail such as dataset split, preprocessing, evaluation protocol, checkpoint mapping, or runtime assumption from primary paper sources while recording conflicts. Do not use for general paper summary, repo scanning, environment setup, command execution, title-only paper lookup, or replacing README guidance by default.
caveman-learn
juliusbrussee/caveman
Act on a Caveman learn report - review the ranked token sinks, apply cost-lowering fixes with per-edit consent, and report what those fixes returned. Use when asked to lower an agent's token cost, what caveman has saved, to trim a heavy CLAUDE.md, or to offload re-pasted context into cavemem.
gsap-plugins
greensock/gsap-skills
Official GSAP skill for GSAP plugins — registration, ScrollToPlugin, ScrollSmoother, Flip, Draggable, Inertia, Observer, SplitText, ScrambleText, SVG and physics plugins, CustomEase, EasePack, CustomWiggle, CustomBounce, GSDevTools. Use when the user asks about a GSAP plugin, scroll-to, flip animations, draggable, SVG drawing, or plugin registration.
teach-impeccable
pbakaus/impeccable
DEPRECATED: Use /impeccable teach instead. This command has been folded into the impeccable skill.