AgentSkillsCN

Engine Setup

在搭建IKEMEN Go项目、配置引擎、梳理项目结构,或初始化一款全新格斗游戏时,可选用此技能。涵盖引擎下载、文件夹布局、mugen.cfg配置,以及IKEMEN Go与经典MUGEN之间的差异对比。

SKILL.md
--- frontmatter
description: Use this skill when setting up an IKEMEN Go project, configuring the engine, understanding project structure, or initializing a new fighting game. Covers engine download, folder layout, mugen.cfg configuration, and IKEMEN Go vs classic MUGEN differences.

Engine Setup

Overview

IKEMEN Go is a modern, open-source fighting game engine written in Go. It's fully backward-compatible with classic MUGEN content while adding modern features like online play, Lua scripting, widescreen support, and the ZSS state format.

Quick Setup Checklist

  1. Download IKEMEN Go from https://github.com/ikemen-go/Ikemen-GO/releases
  2. Extract to project directory
  3. Verify Ikemen_GO.exe (Windows) or equivalent binary exists
  4. Configure data/mugen.cfg for your game
  5. Set up folder structure: chars/, stages/, data/, font/, sound/
  6. Create or edit data/select.def for your roster
  7. Launch engine to verify setup

Project Directory Structure

code
MyGame/
├── Ikemen_GO.exe              # Engine binary
├── data/
│   ├── mugen.cfg              # Master configuration
│   ├── select.def             # Character/stage roster
│   ├── system.def             # Screenpack (menus, UI)
│   ├── fight.def              # In-match UI (lifebars, timer)
│   ├── common1.cns            # Common state definitions
│   └── common.air             # Common animations
├── chars/                     # Character folders
│   └── charactername/
│       ├── charactername.def  # Character definition
│       ├── charactername.cns  # Constants + states
│       ├── charactername.cmd  # Command inputs
│       ├── charactername.air  # Animations
│       ├── charactername.sff  # Sprites
│       └── charactername.snd  # Sounds
├── stages/                    # Stage folders
│   └── stagename/
│       ├── stagename.def      # Stage definition
│       └── stagename.sff      # Stage sprites
├── font/                      # Font files (.fnt, .def)
├── sound/                     # Music and global sounds
├── external/                  # External Lua modules (IKEMEN Go)
│   └── mods/                  # Lua game mode scripts
└── save/                      # Save data (auto-created)

IKEMEN Go vs Classic MUGEN

FeatureClassic MUGENIKEMEN Go
LicenseProprietary, discontinuedMIT open source
LanguageC (closed)Go (open)
Resolution320x240 fixedAny (default 1280x720)
ScriptingNoneLua scripting
State format.cns only.cns + .zss (modern)
Online playNoYes (GGPO rollback)
Max players2Up to 8
Tag/SimulBasicFull team modes
Palette limit12Unlimited
Sprite formatSFF v1/v2SFF v1/v2 + PNG fallback
Story modeStoryboard onlyFull Lua story system
Audio.wav/.mp3.wav/.mp3/.ogg/.flac

mugen.cfg Key Sections

[Options]

  • difficulty (1-8, default 4): AI difficulty
  • life (1-999, default 100): Life percentage
  • time (-1 to 999, default 99): Round time (-1 = infinite)
  • GameWidth / GameHeight: Internal resolution
  • GameSpeed (default 60): Ticks per second (always 60 for standard)
  • team.1vs2life (default 150): Life boost for 1v2

[Rules]

  • default.attack.lifetopowermul (default 0.7): Power gain from dealing damage
  • default.gethit.lifetopowermul (default 0.6): Power gain from taking damage
  • super.targetdefencemul (default 1.5): Defense multiplier during supers

[Config]

  • GameWidth, GameHeight: Window resolution
  • RenderMode: OpenGL rendering options
  • FullScreen: Fullscreen toggle

[Debug]

  • Debug (0/1): Enable debug mode (Ctrl+D in game)
  • AllowDebugMode (1): Allow debug key shortcuts
  • ClsnDraw (0): Draw collision boxes by default

Key Concepts

Ticks and Frames

  • IKEMEN Go runs at 60 ticks per second
  • 1 tick = 1 frame of game logic
  • Animation times in .air files are in ticks
  • A move at 3 startup + 4 active + 6 recovery = 13 frames total

State Machine

  • Every character is always in exactly one state
  • States 0-199 are "common states" (idle, walk, jump, etc.)
  • States 200+ are character-specific (attacks, specials)
  • States 5000-5999 are common hit states
  • The engine transitions between states via ChangeState controllers

Coordinate System

  • Origin (0,0) is at the character's feet, center
  • X increases to the right (in character's facing direction)
  • Y increases upward (negative Y = below ground)
  • All positions are relative to character facing direction