Code

Pig Avoider - Phaser 3

Pig Avoider - Phaser 3

Cart 1 sale
Recently Updated

Pig Avoider is a fast, easy-to-pick-up 2D arcade game template. You move by tap/click, avoid pigs that roam the map, collect coins for bonus points, and keep moving to survive longer while chasing the highest score.

Core Gameplay

  • Goal: survive as long as possible and achieve the highest score by avoiding pigs, collecting coins, and staying in motion.
  • Player moves toward the tapped/clicked target position, creating simple one-touch controls for mobile and desktop.
  • Touching a pig triggers game over, ending the current run immediately.
  • Score increases from coin pickups and distance-based movement scoring during active play.
  • Coins respawn after collection, while pigs keep spawning and moving to maintain pressure and replayability.

Template Features

  • Clean scene flow: boot → loading → title → game.
  • Gameplay is split into dedicated managers for input, collisions, pig spawning, velocity handling, effects, and UI flow.
  • Tuning data is centralized so balancing can be done without changing core logic.
  • Reskin friendly.
  • Base resolution 1920×1080 (landscape) with Scale.FIT scaling for different screen sizes.

Tech Stack

  • Phaser 3.90 (HTML5 game framework).
  • TypeScript codebase for maintainability and safe refactors.
  • Vite for the development server and production builds.
by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey