AgentSkillsCN

build-editor

使用 Mac 的 Makefile 构建 Asciicker 地图编辑器(asciiid)。当需要构建编辑器、在修改后重新编译,或应用户要求构建/编译编辑器时,可使用此功能。

SKILL.md
--- frontmatter
name: build-editor
description: Build the Asciicker map editor (asciiid) using the Mac makefile. Use when building the editor, recompiling after changes, or when the user asks to build or compile the editor.
allowed-tools: Bash, Read

Build Editor Skill

Builds the Asciicker map editor (asciiid) for macOS using the project's makefile.

Quick Commands

Build the editor:

bash
make -f makefile_asciiid_mac

Clean build (rebuild everything):

bash
make -f makefile_asciiid_mac clean && make -f makefile_asciiid_mac

Build for Linux:

bash
make -f makefile_asciiid

Build Output

The compiled editor will be at: .run/asciiid

Launch After Build

To run the editor after building:

bash
./.run/asciiid

Or on macOS (to launch as app):

bash
open .run/asciiid.app

What Gets Built

The editor includes:

  • Terrain editing tools
  • Material painting system (grass, water, etc.)
  • Sprite placement
  • Enemy generator placement
  • Map save/load functionality
  • Camera controls

Common Build Issues

  1. Missing dependencies: Ensure OpenGL, SDL2, X11 libraries installed
  2. Compilation errors: Check for syntax errors in .cpp files
  3. Linking errors: Verify all object files compiled successfully

Files Compiled

Main sources:

  • asciiid.cpp - Main editor logic
  • terrain.cpp - Terrain rendering
  • render.cpp - OpenGL rendering
  • game.cpp - Game logic
  • Plus ImGui and other dependencies

Instructions

When the user asks to build the editor:

  1. Run make -f makefile_asciiid_mac
  2. Report any compilation warnings or errors
  3. Confirm successful build with "Linking: .run/asciiid"
  4. Optionally launch the editor if requested