← صفحه لیگ Air English version
Map Creator / سازنده نقشه
In-app course designer for the FIRA Air Simulator. Maps are ordinary stage manifests (configs/stages/*.json schema, see scripts/course/course_manifest.gd) and are saved to the user folder, where the setup screen lists them next to the shipped stages.
Opening / باز کردن
- On the Category Select screen press M (or use the "Map Creator" button if the UI provides one).
- در صفحه انتخاب رده (Category) کلید M را بزنید (یا دکمه «Map Creator» اگر در رابط موجود باشد).
- Code hook:
AppFlow.open_map_creator()→res://scenes/ui/MapCreatorScreen.tscn.
Layout / چیدمان
| Area | Content |
|---|---|
| Top bar 1 | Map name, Category (U19 / U14 + two robots / single robot), landing policy (read-only: always FIXED_ANNOUNCED -> <the H pad id>), Arena X / Z / wall height (m), Validate, Save, Load, Export to configs/stages, Fly this map, 3D Preview, Back |
| Top bar 2 | Wall style (grid / plain / color), wall color #hex, floor base color #hex, floor style (optical_flow_v1 / uniform_debug / custom), seed |
| Left | Tools: Select/Move, Add Gate, Add Landing Pad (H), Add Floor Shape, Add Zone, Add Wall Panel, Set Start Pad, Add AprilTag, Delete, Undo |
| Center | Top-down arena (meters). North = -Z (top), East = +X (right). Grid every 0.5 m, red dashed box = flight boundary (arena minus 0.4 m). |
| Right | Inspector for the selected object |
| Bottom | Status / validation messages |
Controls / کنترلها
- Left click with an Add tool: place the object at the cursor. With Select: pick and drag to move.
- Mouse wheel: zoom. Middle drag: pan. Right click / Esc: deselect.
- R: rotate the selected gate or AprilTag by 15°. Delete: delete selected. Ctrl+Z: undo.
- کلیک چپ برای قرار دادن / انتخاب و درگ برای جابهجایی؛ چرخ ماوس زوم؛ درگ با دکمه وسط حرکت صفحه؛ R چرخش گیت یا تگ ۱۵ درجه؛ Delete حذف؛ Ctrl+Z بازگشت.
Objects and fields / اشیا و فیلدها
- Gate (magenta bar 0.9 m, arrow = flight direction through the gate): id, x, z, yaw, height low/high (toggle), tag id 0–586 (defaults to the gate index), tag size_m, order up/down (required_order is always contiguous 1..N by list position), obstructions editor (vertical_strip x/width, horizontal_strip y/width, panel x/y/w/h, diagonal x/y/width/length/angle; all gate-local meters).
- Landing pad (H): white square with blue H, fixed 0.5 m, id, x, z. Exactly ONE H pad per map (organizer decision): "Add Landing Pad (H)" adds the pad when there is none and otherwise moves the existing pad;
landing_target_policyis alwaysFIXED_ANNOUNCEDandfixed_target_padis always that pad (both are filled automatically on normalize/save). Validation reports an error when the map has 0 or more than 1 pads. - پد فرود (H): هر نقشه دقیقاً یک پد H دارد (تصمیم برگزارکننده). ابزار «Add Landing Pad (H)» اگر پدی وجود داشته باشد آن را جابهجا میکند و پد دوم نمیسازد. سیاست فرود همیشه
FIXED_ANNOUNCEDروی همان پد است و بهصورت خودکار ذخیره میشود؛ تعداد پد غیر از ۱ خطای اعتبارسنجی است. - AprilTag (free-standing, any number, anywhere): manifest key
apriltags, list of{"id": 0-586, "center": [x, y, z], "yaw_degrees", "size_m", "mount"}whereyis the height of the tag center in meters,size_mis the black square edge (default 0.2) andmountispost(plate on a post at height y),wall(plate only, place near a wall) orfloor(printed flat on the floor, y ignored). Canvas icon: small black/white square with the id and an orange arrow showing the facing direction (from yaw; none for floor tags). Inspector: id, x, z, height y, yaw, size, mount. R rotates by 15°, Delete / Undo work. New tags get the smallest id not used by any gate or tag. Validation warns (not error) when an id is outside 0–586 or the same id is used twice across gates + free tags. Built in 3D byCourseBuilder._build_free_tag. - تگ AprilTag (آزاد، هر تعداد، هر جا): کلید
apriltagsدر مانیفست؛ فیلدها id (۰ تا ۵۸۶)، x، z، ارتفاع y (مرکز تگ، متر)، yaw، size_m (ضلع مربع سیاه، پیشفرض ۰٫۲) و mount (postروی پایه،wallفقط صفحه،floorچاپ روی زمین). روی بوم بهصورت مربع سیاه/سفید کوچک با شماره و فلش جهت رسم میشود. R چرخش ۱۵ درجه؛ Delete و Undo کار میکنند. شناسه تکراری یا خارج از بازه فقط هشدار میدهد (خطا نیست). - Start pad: plain white square labelled START (never an H), x, z, yaw. Safe zone = 1.2 m box around it (automatic).
- Scoring zone: yellow translucent rect; id, score, requires gate, min/max x/z, max y.
- Wall panel: colored bar on a wall (north/south/east/west); x along the wall, y height, w, h, color blue/gray/green.
- Floor shape: manifest key
floor_shapes; type rect/circle/polygon/cross/line, x, z, size, thickness, color yellow/cyan/green/orange/black/white, sides (polygon), angle (line/polygon). Drawn into the procedural floor texture after the regular markings; floor stylecustomgives a plain floor with only your shapes. - Arena:
arena.size[x, wall height, z],arena.wall_style,arena.wall_color,arena.floor_color. Older manifests without these keys render as before. - Category: U19 single lane; U14 describes ONE lane that the simulator duplicates by rigid translation.
u14_mode=two_robots(default) orsingle_robotis saved for the setup screen.
Save / Load / Fly
- Save writes
user://stages/<name>.json(pretty JSON, status PRACTICE_ONLY, schema 1.0, rule scoring constants 25/1/1, boundary and safe zone derived automatically). Windows:%APPDATA%\Godot\app_userdata\FIRA Air Simulator\stages\ویندوز:%APPDATA%\Godot\app_userdata\FIRA Air Simulator\stages\ - Load lists shipped stages (
configs/stages) and user maps ([user]). - Export to configs/stages copies a valid map into the repo
configs/stagesfolder (when writable) so it ships with builds. - Fly this map saves, then builds the lane(s) for the chosen category and opens the arena.
- Validate runs the same checks as the simulator (
CourseManifest.parse): contiguous gate order, AprilTag metadata, gates ≥ 1 m apart, inside the boundary, pads defined, policy/fixed pad consistency. Map Creator adds: exactly one landing pad (error), AprilTag id range and uniqueness across gates and free tags (warnings).
Headless test
Godot --headless --path godot -s scripts/dev/map_creator_probe.gd # prints MAP_PROBE_OK