ICoop is a 2D grid-based cooperative RPG built in Java, inspired by puzzle-platformers like Fire Boy and Water Girl. Two players share a keyboard to navigate interconnected areas, solve environmental puzzles, manage an inventory, and defeat enemies — cooperation is required, not optional.
- Co-op gameplay: Two elemental characters (Fire and Water) must work together to bypass elemental walls, trigger pressure plates, and collect orbs to gain invulnerability.
- Interaction system: Built on a Visitor pattern supporting both contact and distance interactions — including timed explosives that destroy rock obstacles.
- Inventory & equipment: Collect and switch between items like keys, swords, and magical staves that shoot elemental projectiles.
- Enemies & AI: Fire Skulls shoot projectiles at random intervals; Artificiers hunt players, deploy explosives, and switch between idle, attacking, and defensive states.
- Level progression: Travel from the Spawn and OrbWay zones through a trap-filled Maze to a final Arena challenge that unlocks the Mansion.
Two players, one keyboard.
| Action | Red Player (Fire) | Blue Player (Water) |
|---|---|---|
| Move | W A S D | Arrow keys |
| Use item | E | 0 |
| Switch item | Q | U |
| Key | Action |
|---|---|
| R | Reset game |
| T | Reset current area (restores health) |
- OOP design: Strong encapsulation throughout, avoiding unnecessary getters.
- Entity system: Separates
InteractableandInteractorentities to cleanly handle grid collisions and line-of-sight interactions. - State machines: Enemy and player behaviors driven by finite state logic.
The game features a powerful final boss with escalating abilities:
- Retaliation: Takes damage → unleashes fire in all directions.
- Reinforcements: Spots a player → summons Bombfoes to hunt them down.
- Enrage (50% HP): Drops below half health → simultaneously summons a wave of flamethrowers and 3 Bombfoes.
- Two new maps expanding the game world beyond the base areas.
- Chests scattered across levels containing loot for players to discover.
- Power orbs in inventory — orbs can now be carried and used strategically rather than collected on the spot.
- Elemental resistance — essential for surviving the boss fight; players must leverage their elemental affinity to withstand attacks they'd otherwise take full damage from.
Clone the repo, open it in your IDE (IntelliJ recommended), and run the main class. The game window will launch and guide you from there.