一键导入
sim-test
Launch the Gravity Simulator with UDP server, send commands, and take screenshots for visual verification
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Launch the Gravity Simulator with UDP server, send commands, and take screenshots for visual verification
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | sim-test |
| description | Launch the Gravity Simulator with UDP server, send commands, and take screenshots for visual verification |
| argument-hint | ["command sequence description"] |
Launch the Gravity Simulator with the UDP command server, execute commands, and capture screenshots for evaluation.
cd D:/Projects/Gravity-Simulator && cmake --build build --config Debug --target Gravity-Simulator 2>&1 | tail -5
cd D:/Projects/Gravity-Simulator/build/bin/Debug && ./Gravity-Simulator.exe --skip-launcher --windowed --udp-server 5555 2>&1
Run this as a background task. Wait ~3 seconds before sending commands.
Use Python to send commands to the simulator:
import socket
def cmd(c, host="127.0.0.1", port=5555, timeout=2.0):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.settimeout(timeout)
s.sendto(c.encode(), (host, port))
try:
r = s.recvfrom(4096)[0].decode()
except socket.timeout:
r = "TIMEOUT"
s.close()
return r
Use the existing screenshot script:
python D:/Projects/Gravity-Simulator/.claude/screenshot.py
Then read the output path with the Read tool to view the image.
Kill the simulator when done:
taskkill //F //IM Gravity-Simulator.exe
| Command | Syntax | Response |
|---|---|---|
| PING | PING | PONG |
| ADD | ADD <x> <y> <xv> <yv> <mass> [TYPE] | OK <id> |
| REMOVE | REMOVE <id> | OK / ERR not found |
| PAUSE | PAUSE | OK |
| UNPAUSE | UNPAUSE | OK |
| TOGGLE_PAUSE | TOGGLE_PAUSE | OK paused / OK running |
| TIMESTEP | TIMESTEP <value> | OK |
| RESET | RESET | OK |
| KEY | KEY <key_name> | OK |
| GET_OBJECT | GET_OBJECT <id> | <id> <x> <y> <xv> <yv> <mass> <radius> <type> |
| LIST | LIST | <id1> <id2> ... |
| COUNT | COUNT | <N> |
| STATE | STATE | <paused|running> <timestep> <count> <iteration> |
| SET | SET <key> <value> | OK |
| GET | GET <key> | <value> |
Types: ROCKY, TERRESTRIAL, GASGIANT, BROWNDWARF, STAR, WHITEDWARF, NEUTRONSTAR, BLACKHOLE
Example: ADD 0 0 0 0 100 WHITEDWARF
gravity, heat, bloom, gui, autobound, fuel_burn, render_life, timestep, paused
Boolean settings use 0/1. Example: SET gravity 0, GET bloom
P (pause), R (reset), N, O, A, D, C, G, S, Q, I, F, B, COMMA, PERIOD, F1 (toggle GUI)
RESET before spawning test objects to start cleanSET fuel_burn 0 prevents stars from consuming fuel during tests.claude/screenshots/ with timestamps