1---2name: game-platformer3description: Design and build side-scrolling platformer games — movement, combat, ultimate skills, enemy AI, level templates, and common mistakes.4metadata:5 source: https://skillmd.com/skills/yhyu13/game-platformer6---78# Platformer Game Design910## When to use1112- The game is side-view with gravity: characters fall and jump.13- Brawlers, action platformers, run-and-gun, fighting-style games.1415## Mechanics1617- **Movement**: walk with configurable speed; jump with configurable power. Optional: coyote time (grace after leaving a ledge), jump buffering, one double jump.18- **Combat**: melee (alternating punch/kick combo) and/or ranged (projectiles). Both can coexist.19- **Ultimate skills** — pick by character fantasy:2021| Skill | Style | Best for |22|---|---|---|23| Dash attack | Linear charge with trail | Melee, fast characters |24| Targeted AOE | Lock target, strike at position | Ranged, area denial |25| Area damage | Burst around player | Berserker, close combat |26| Beam | Horizontal laser | Tech, long range |27| Ground quake | Slam, grounded enemies only | Heavy, crowd control |28| Targeted execution | Lock target, instant kill | Assassin |29| Boomerang | Returning projectile | Thrown weapons |30| Multishot | Spread of N projectiles | Gunner/mech |31| Arc projectile | Gravity arc, optional explosion | Siege, arcing throws |3233- **Enemy AI**: patrol (back-and-forth), chase (follow when detected), stationary (turrets), or custom (phase-based bosses — e.g., patrol above half health, chase below).3435## Level design discipline3637- If the user doesn't specify level count: design **one level**.38- **Copy predefined map templates** (tutorial flatlands, vertical climb, combat fortress, boss chamber). Never invent ASCII maps from scratch — downstream tooling validates known templates.39- Allowed modifications only: add/remove coins, platforms, enemies (max ~4); adjust solid block shapes while keeping 2-tile thickness.40- Never change: map dimensions, the solid bottom rows, spawn position (left), exit/boss position (right). Enemy spawns need 3+ tiles of flat floor.41- Symbols: dot = air, hash = solid, equals = one-way platform, P = player spawn, E = enemy spawn, B = boss, C = coin, D = door.4243## Animation rules4445- Exactly 2 frames per action.46- Three-layer sync: manifest frame keys → animation definition keys → the character's animation-key mapping. The mapping must define idle, walk, jump-up, jump-down, punch, kick, die — and fall back to idle for the ultimate if no unique animation exists. Missing punch/kick keys fall back to defaults that don't exist and crash.47- Tilemap layer names are case-sensitive ("Ground", "Objects").4849## Feel and presentation5051- Camera follows with the player in the lower third of the screen and smooth lerp — standard for side-scrollers.52- Keep a short victory delay (~half a second) after the last kill so the win registers before the victory screen.53- Damage numbers: yellow for damage dealt, red for damage taken — show on every hit.5455## Multi-character games5657Add a character-select stage before levels; each character is a separate player class with distinct stats/skills; route selection into level scenes through a player-class registry.5859## Common mistakes6061| Wrong | Right |62|---|---|63| Implement jump physics | Use the movement behavior; set jump power |64| Write a patrol AI | Use the patrol behavior with a speed |65| Design maps from scratch | Copy a template, tweak platforms/coins |66| One attack animation | Provide both punch and kick (the combo needs both) |67| Front-view character art | Side view facing right |68| Missing level-order update | First entry must be the actual first scene, or the game crashes on start |