A PokΓ©mon-inspired creature battling game built entirely with Phaser 3, TypeScript, and Vite. All visuals are generated with Phaser's graphics primitives β no external images required.
npm install
npm run dev # start dev server on http://localhost:3000Other commands:
npm run build # type-check + production build β dist/
npm run preview # preview the production build
npm test # run tests once
npm run test:watch # run tests in watch mode- New Game β pick a starter creature (Fire, Water, or Grass).
- Explore β move with WASD or Arrow keys. Walk through dark-green tall grass for wild encounters. Pick up the Fishing Rod if it appears on the map; from the menu, open Items and use the rod while standing next to water to fish for Water-type wild battles.
- Battle β choose from four actions:
- β Fight β pick one of your creature's four moves.
- π― Catch β throw a capture orb (unlimited supply). Lower the wild creature's HP first for a better chance.
- π Switch β swap to another party member (the enemy gets a free hit).
- π Run β attempt to flee.
- Level up β defeating wild creatures awards XP. Stats recalculate on each level up.
- Catch 'em all β your party holds up to 6 creatures; extras go to the box.
Progress is saved to localStorage automatically after every battle.
Multipliers show damage when the row type attacks the column type (src/core/types.ts).
| Attacker β | vs Normal | vs Fire | vs Water | vs Grass | vs Dark | vs Psychic | vs Fighting |
|---|---|---|---|---|---|---|---|
| Normal | 1Γ | 1Γ | 1Γ | 1Γ | 1Γ | 1Γ | 1Γ |
| Fire | 1Γ | Β½Γ | Β½Γ | 2Γ | 1Γ | 1Γ | 1Γ |
| Water | 1Γ | 2Γ | Β½Γ | Β½Γ | 1Γ | 1Γ | 1Γ |
| Grass | 1Γ | Β½Γ | 2Γ | Β½Γ | 1Γ | 1Γ | 1Γ |
| Dark | 1Γ | 1Γ | 1Γ | 1Γ | Β½Γ | 2Γ | Β½Γ |
| Psychic | 1Γ | 1Γ | 1Γ | 1Γ | Β½Γ | Β½Γ | 2Γ |
| Fighting | 1Γ | 1Γ | 1Γ | 1Γ | 2Γ | Β½Γ | Β½Γ |
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Emberlynx | Fire | A fiery feline that prowls volcanic slopes. |
| 2 | Pyrowl | Fire | An owl wreathed in perpetual flames. |
| 3 | Magmite | Fire | A living lump of molten rock. |
| 4 | Cinderpup | Fire | A playful pup that leaves embers in its wake. |
| 5 | Blazardon | Fire | A fearsome fire dragon that scorches the sky. |
| 6 | Splashlet | Water | A cheerful tadpole creature. |
| 7 | Tideclaw | Water | A crustacean with razor-sharp claws. |
| 8 | Coralisk | Water | Coral growths form its armored shell. |
| 9 | Drizzowl | Water | An owl that summons rain wherever it flies. |
| 10 | Abyssail | Water | A deep-sea leviathan that commands the abyss. |
| 11 | Sproutail | Grass | A small lizard with a leafy tail. |
| 12 | Thornbug | Grass | An insect covered in thorny armor. |
| 13 | Bloomox | Grass | A bovine creature with flowers on its back. |
| 14 | Fungowl | Grass | A mushroom-capped owl that drifts through forests. |
| 15 | Terravine | Grass | A walking tangle of vines with glowing eyes. |
| 16 | Fluffkit | Normal | An impossibly fluffy kitten creature. |
| 17 | Rumbear | Normal | A large, sleepy bear that packs a wallop. |
| 18 | Skychick | Normal | A tiny chick that zooms through the sky. |
| 19 | Ironsnout | Normal | An armored boar with a metallic snout. |
| 20 | Glimmouse | Normal | A tiny glowing mouse, fast as lightning. |
| 21 | Shadewisp | Dark | A wisp of living shadow that flits through the night. |
| 22 | Duskprowler | Dark | A stealthy predator that hunts at twilight. |
| 23 | Voidling | Dark | A creature born from the void between stars. |
| 24 | Nightmareon | Dark | A fearsome beast that feeds on nightmares. |
| 25 | Mentite | Psychic | A small creature with powerful mental abilities. |
| 26 | Oraclop | Psychic | A seer creature that glimpses the future. |
| 27 | Cerebrix | Psychic | Its massive brain pulses with psychic energy. |
| 28 | Aetherion | Psychic | A being of pure mental energy floating through the cosmos. |
| 29 | Punchpup | Fighting | A scrappy pup always ready for a sparring match. |
| 30 | Monkala | Fighting | A disciplined fighter that meditates between battles. |
| 31 | Brawlbear | Fighting | A massive bear whose fists can shatter stone. |
| 32 | Dojodrake | Fighting | A dragon that has mastered the ancient martial arts. |
- Individual Values (IVs) β each caught creature gets random 0β15 bonuses to HP, Attack, Defense, and Speed, making every individual unique.
- Randomized Moves β creatures learn 4 random moves from their species' pool upon creation.
- Stat Formula β
floor(((2 Γ base + iv) Γ level) / 100) + 5(HP adds+ level + 10instead). - Damage Formula β
((2L/5 + 2) Γ Power Γ A/D) / 50 + 2) Γ effectiveness Γ random(0.85β1.0). - Catch Rate β
(1 β currentHP/maxHP) Γ 0.65 + 0.3per shake (3 shakes needed). Ranges from ~2.7% at full HP to ~86% at 1 HP. - Wild Level Scaling β when you have a single creature, wild encounters are always a lower level. With 2+ creatures, wilds spawn at party average Β± 2.
- XP Curve β cubic:
floor(levelΒ³ Γ 0.8).
src/
βββ main.ts # Phaser game config & entry point
βββ core/
β βββ types.ts # Interfaces, enums, type chart
β βββ creatureFactory.ts # Creature instantiation, IVs, leveling
β βββ battleEngine.ts # Damage calc, turns, catching, XP
β βββ saveManager.ts # localStorage save / load / delete
β βββ eventBus.ts # Typed events between scenes/systems
β βββ random.ts # Injectable RNG (tests + gameplay)
β βββ *.test.ts # Unit tests for core modules
βββ data/
β βββ attacks.ts # Move definitions + ALL_ATTACKS list
β βββ creatures.ts # CREATURE_DEX species definitions
βββ utils/
β βββ creatureRenderer.ts # Procedural creature drawing
βββ scenes/
βββ BootScene.ts # Title screen
βββ StarterSelectScene.ts # Starter picker
βββ OverworldScene.ts # Tile map exploration + encounters
βββ BattleScene.ts # Battle UI + animations
βββ SettingsScene.ts # Settings + Fresh Start
βββ PartyScene.ts # Party management
βββ CreatureDexScene.ts # Dex list
βββ CreatureDetailScene.ts # Single species view
βββ systems/ # Overworld/battle subsystems + tests
βββ EncounterSystem.ts
βββ BattleStateMachine.ts
βββ OverworldHub.ts
βββ OverworldMenuController.ts
βββ TouchInputController.ts
βββ MapItemSystem.ts
βββ index.ts
See AGENTS.md for an agent-oriented map of how gameplay code fits together. For adding moves, species, or types, see .cursor/skills/tiny-creatures-content/SKILL.md (Cursor skill).
Open β Settings from the title screen or the in-game menu bar. The Fresh Start button wipes all localStorage data after a confirmation prompt β handy for starting over.
- Phaser 3 β game framework (rendering, input, tweens, scenes)
- TypeScript β type-safe game logic
- Vite β dev server & bundler
- Vitest β unit tests (
npm test; 12 test files insrc/)