Guide 13 — A Spark of Corruption
Kathryn Groover
What you're building
An action-adventure platformer across four worlds — Fiery Kingdom, Forest, Ruins, Starry Wastelands — with a party of four: an attacking Fire Aprice, a Servant who moves objects, an Archer who works by stealth and distraction, and an elemental Sorcerer. Shadow creatures oppose you.
Yours is the largest 2D build in the class: character swapping and the full combat stack and four worlds. Your art is also the most developed of anyone's — characters, enemies, and a colour palette per world already designed.
A word before you start: this is a lot. Build one world with two party members completely before adding the rest. A finished quarter of your game beats an unfinished whole one, and everything you learn on world one makes worlds two to four faster.
Time: four-plus hours for the foundation. The rest is content.
1. Before you start
- Finish Guide 0.
- Read Guide B §B1 and §B4.
- Read Guide 12 §3 — your swapping works the same way as Joshua's, with one key difference (section 3).
- One new input action:
Dash.
2. Scripts you'll use
Core — Guide B
PlayerController2D · PlayerAnimatorBridge · Health · DamageOnContact · Checkpoint · RespawnManager · CameraTargetAssigner · SceneLoader · GameManager · AudioManager · HUDController · MovingPlatform · ParallaxBackground
Combat (Tier 2)
Team · Hurtbox · Hitbox · Knockback · MeleeAttack · Projectile · ProjectileShooter · EnemyPatrol · EnemyChase · BossController · BossArenaTrigger
Movement (Tier 3)
Dash · DoubleJump · WallSlideJump · Ladder + LadderClimber · GrapplingHook · CharacterDefinition · CharacterSwapper
Level (Tier 4)
Breakable · Door · PuzzleSwitch · SwitchGroup · KillZone · LevelExit · ChoiceFlagManager
Collectibles
ItemType · Collectible · CollectionTracker
3. Shared health or separate?
Joshua's game (Guide 12) gives each character their own health. You have a choice, and it changes the feel:
| Setting | Plays like |
|---|---|
| Separate Health ✓ | Each party member has their own HP. Losing one is a real loss. Party-management, higher tension. |
| Separate Health ✗ (recommended for you) | One shared health pool; swapping changes abilities only. Simpler, faster, and it keeps the focus on using the right tool rather than protecting a resource. |
I'd start with ✗. Your game already has four abilities, four worlds and a combat system — shared health removes one layer of bookkeeping and one whole category of bugs. You can flip the tickbox later; it's one setting.
If you tick ✓, follow Guide 12 §3's death wiring instead of the standard one. If you leave it ✗, wire death normally (Health.OnDied → RespawnManager.OnPlayerDied).
This guide assumes shared health.
4. Build the one player object
Same structure as Guide 12: one object with every ability component, and a CharacterDefinition per party member.
- Empty GameObject
Player, Tag →Player, Sprite Renderer. - Rigidbody2D (Gravity Scale 3, Freeze Rotation Z, Continuous), Capsule Collider 2D.
- Player Input — Behavior: Send Messages.
PlayerController2D+GroundCheckchild + Ground LayerGround.Health— Max Health 6, Invulnerability 1.Animator+PlayerAnimatorBridge+Knockback.- Every ability component:
DashDoubleJumpWallSlideJump(+ aWallCheckchild on the right side)LadderClimberGrapplingHook(+ aRopechild with a Line Renderer — Guide 3 §4 has the recipe)MeleeAttackProjectileShooter(+ aFirePointchild)
CharacterSwapper.- Children:
Hurtbox— trigger collider, Hurtbox (Team Player), layerHurtboxAttackHitbox— trigger collider in front, Hitbox (Target Enemy, Damage 1, Knockback 8), layerHitbox, GameObject unticked
Wire the components to their children
MeleeAttack→ Hitbox =AttackHitbox; Windup 0.08 / Active 0.12 / Recovery 0.2ProjectileShooter→ Fire Point =FirePoint; Team = Player; Mode = Manual (see the warning below)WallSlideJump→ Wall Check = the child; Wall LayerGroundGrapplingHook→ Rope = the child; Grapple LayerGround; Aim Facing
⚠️
MeleeAttackandProjectileShooterboth listen toAttack. With the shooter in PlayerInput mode, your Fire Aprice would swing and shoot. Set the shooter to Manual, then either add a separateShootaction (ask for the two-line script that callsFire()), or accept that ranged characters shoot onAttackand melee ones swing — by disabling whichever component that character doesn't use. The second option needs no script, and it's what the character definitions below assume.
5. Create the four party members
Right-click Project → Create → GAME1303 → Character, four times. Enabled Abilities holds component class names as exact text.
Fire Aprice — attack
| Field | Value |
|---|---|
| Display Name | Aprice |
| Max Health | 6 |
| Move Speed | 8 |
| Jump Force | 14 |
| Gravity Scale | 3 |
| Enabled Abilities | MeleeAttack, Dash |
| Animator Controller | Aprice's |
| Tint | white |
The Servant — support, moves objects
| Field | Value |
|---|---|
| Display Name | Servant |
| Move Speed | 8 |
| Jump Force | 15 |
| Enabled Abilities | GrapplingHook, DoubleJump |
Your sketch describes the Servant as flying/moving objects — the grappling hook is the closest fit in the kit, and it doubles as a traversal tool. It can pull the Servant to anchors and be your "move things" verb if you place grabbable anchors on objects.
The Archer — support, stealth and distraction
| Field | Value |
|---|---|
| Display Name | Archer |
| Max Health | 6 |
| Move Speed | 9 (fastest) |
| Jump Force | 14 |
| Enabled Abilities | ProjectileShooter, WallSlideJump |
The Sorcerer — attack/support, elemental
| Field | Value |
|---|---|
| Display Name | Sorcerer |
| Move Speed | 7 |
| Jump Force | 13 |
| Enabled Abilities | ProjectileShooter, LadderClimber |
The Archer and Sorcerer both shoot — differentiate them with two bullet prefabs and swap which one ProjectileShooter uses. Simplest version: give the Sorcerer a slower, higher-damage, piercing projectile and the Archer a fast, weak, rapid one. That needs one line of a helper script or you can leave both the same for now and differentiate by animation.
Animator warning
All four controllers must use identical parameter names. Build one, duplicate it three times, change only the clips. Mismatched names silently reset animation on every swap.
6. Configure the swapper
On Player, CharacterSwapper:
| Field | Value |
|---|---|
| Characters | all four assets, in cycle order |
| Start Index | 0 |
| Swap Cooldown | 0.3 |
| Separate Health Per Character | ✗ (see section 3) |
| Allow Swap In Air | ✓ |
| Ability Components | (leave empty — auto-fills) |
Add Character1–Character4 input actions bound to 1–4 if you want direct selection. Q/E cycling works out of the box.
7. Build the shadow enemies
Your sketch shows shadow blobs. Three variants:
Shadow crawler — Guide B §B4: EnemyPatrol (Sensors), Health 3, Hurtbox (Team Enemy), BodyHitbox (Damage 1, Repeat Delay 1). Invulnerability 0.
Shadow drifter — Rigidbody2D Gravity Scale 0, FloatingEnemy (Wander, radius 4), EnemyChase (Movement Free, Detect 6, Speed 3).
Shadow archer — a crawler plus ProjectileShooter (Team Enemy, Mode AutoFire, Aim TowardPlayer, Fire Rate 2) and a FirePoint child. Needs an enemy bullet prefab: Rigidbody2D (Gravity 0) + trigger collider + Projectile (Damage 1, Speed 10, Blocking Layers Ground).
Give each world a tinted variant using its palette — same prefab, different Sprite Renderer colour. Four worlds of enemies for almost no extra work.
8. Build world one
Pick one world (I'd suggest Fiery Kingdom, since it's first in your art) and build it completely.
- Ground on
Groundwith colliders; include vertical walls so the Archer's wall-slide matters KillZoneunderneathCheckpointsLadders for the Sorcerer- Grapple anchors for the Servant — just Ground-layer platforms placed out of jump range
Breakablewalls: sprite + Rigidbody2D + collider +Health(3) +Breakable(Min Damage To Break 2) + aHurtboxchild with Team = NeutralPuzzleSwitch+DoorpairsLevelExit- Camera per Guide B §B3, with a confiner
Puzzles that need the party
This is where your design earns its four characters:
| Puzzle | Needs |
|---|---|
| A ledge beyond jump range with an anchor above | Servant (grapple) |
| A switch behind a grate you can shoot through | Archer (projectile) |
| A wall needing 2 damage to break | Sorcerer (heavier projectile) or a charged hit |
| A shaft with walls both sides | Archer (wall slide) |
| A room of shadow crawlers | Aprice (melee) |
| Two switches to press at once | SwitchGroup — see below |
The two-switch puzzle
- Two
PuzzleSwitchobjects, One Shot ✗, Activation Stand. - Empty GameObject
SwitchGroup+ the SwitchGroup component. Drag both switches in, Required 0 (means all), Reset If Broken ✓. - Wire
SwitchGroup.OnGroupComplete → Door.Open.
With Reset If Broken ticked, the player has to hold both — which needs a pushable object or careful timing. Without it, they can press them in sequence.
9. The HUD
- Canvas →
PortraitImage,NameText, a health bar Slider, an item counter if you have collectibles. - Empty child
HUDwith HUDController; assign the health bar. - Wire
CharacterSwapper.OnCharacterChangedto update the portrait — this needs a two-line script since the event sends aCharacterDefinition. Ask for it; it's the readout your mechanic depends on.
A stand-in that needs no script: four small portrait Images always visible, with a highlight frame you move. Not automatic, but it shows the whole party at once, which is arguably better.
10. Wire it up
| On this object | Event | Drag in | Choose |
|---|---|---|---|
Player → Health | On Died | RespawnManager | RespawnManager.OnPlayerDied |
Player → Health | On Health Changed | HUD | HUDController.UpdateHealth (Dynamic) |
AttackHitbox → Hitbox | On Hit | AudioManager | PlaySFX (string) → hit |
PuzzleSwitch | On Activated | Door | Door.Open |
SwitchGroup | On Group Complete | Door | Door.Open |
Player → CharacterSwapper | On Character Changed | AudioManager | PlaySFX (string) → swap |
Player → Dash | On Dash Started | AudioManager | PlaySFX (string) → dash |
Boss → BossController | On Boss Defeated | GameManager | GameManager.LevelComplete |
(If you chose separate health in section 3, swap row 1 for Guide 12's two rows.)
11. First playtest
Small room: a ladder, a wall, a grapple anchor, a breakable wall, two shadow crawlers.
- Q/E cycle all four party members, and the sprite/stats change.
- Only Aprice can melee. Swap to the Archer and press Attack — she should shoot, not swing.
- Only the Servant can grapple.
- Only the Archer can wall-slide.
- Only the Sorcerer can climb.
- A projectile breaks the
Breakablewall; a melee hit doesn't (Min Damage To Break 2). - Shadow enemies patrol, chase and shoot.
- Switches open doors.
- The camera follows and stays in bounds.
Steps 2–5 are the mechanic. If everyone can do everything, your Enabled Abilities lists have typos or the Ability Components list was filled manually.
12. Then add
- Finish world one. Levels, puzzles, a boss.
- A boss — Guide 7 §9 recipe, Resistance 1, two phases.
- Animation — four controllers, identical parameters. This is your biggest remaining art job.
ParallaxBackgroundper world, using your palettes. Fiery Kingdom warm, Forest green, Ruins grey, Starry Wastelands blue-violet — this is where your colour work pays off most visibly.- Worlds two to four — duplicate the scene, restyle, redesign. Much faster the second time.
- Collectibles if you want optional content: an
ItemType, pickups, a counter. - Dialogue between party members using Guide 10 §5's panel — your characters have distinct designs and deserve voices.
13. Design notes for your game specifically
Scope is your real challenge, not any single system. Four worlds × four characters × full combat is more than a semester. The good news is that the systems are done once world one works — everything after is content, and content can be trimmed without breaking anything. Build one complete world and treat the others as stretch goals. A polished Fiery Kingdom with a boss is a better portfolio piece than four rough ones.
Your abilities need to be required, not just available. Right now they're four ways to play. The design gets interesting when a room needs the Servant, and the player has to think "which of my four" rather than "which do I like." One required-ability puzzle per section is enough to make swapping habitual.
Attack/Support is a good frame — use it in your level design. Your sketch labels each character. Design encounters where an attacker alone loses: shadow archers on a ledge the Servant must grapple to, or a group that must be distracted before it can be fought. That's what makes a party rather than four skins.
Min Damage To Break is your quiet puzzle tool. A wall that ignores a sword but yields to a sorcerer's bolt is a locked door that needs no key and no explanation. Cheap, readable, and it teaches the player to think about who they're playing as.
Your four palettes are an asset most people don't have. Enemy tinting, parallax layers, and lighting per world means each one feels distinct with no new art. Push that further than you think you need to — a player should know which world they're in from a single screenshot.
14. Common problems
| What you see | What's wrong |
|---|---|
| Everyone has every ability | Enabled Abilities typo, or Ability Components filled manually — clear it |
| An ability works for nobody | The component isn't on the player object at all |
| Character swaps but stats don't change | Characters list holds the same asset repeatedly |
| Animation resets on swap | The four controllers use different parameter names |
| Melee character also shoots | ProjectileShooter in PlayerInput mode — set to Manual, or disable it for melee characters via Enabled Abilities |
| Attack does nothing | AttackHitbox not assigned, or not disabled at start, or wrong layer |
| Breakable wall breaks on any hit | Min Damage To Break is 0 |
| Breakable never breaks | Min Damage To Break higher than any attack's damage |
| Grapple does nothing | Grapple action missing, or Grapple Layer not Ground, or no Rope assigned |
| Rope is magenta | Line Renderer has no material — assign Sprites-Default |
| Switch group never completes | Required isn't 0 and doesn't match how many switches you added |
| Enemy bullets pass through walls | Blocking Layers not set to Ground |