How to Build a Chicken-Themed Side-Scrolling Platformer Game in Unity

Develop a 16-bit style side-scrolling platformer game featuring chickens as protagonists. The game includes unique size-changing mechanics, farm-themed obstacles, and egg-shooting abilities. Built as a single-player web app using Unity, with high score tracking functionality.

Simple Summary

A side-scrolling Mario-style game featuring chickens instead of traditional characters, developed as a single-player web app using Unity, with unique size-changing mechanics and farm-themed obstacles.

Product Requirements Document (PRD)

Goals:

  • Create a Mario-style side-scrolling game with chickens as main characters
  • Implement unique size-changing mechanics for health/damage system
  • Design farm-themed levels with appropriate obstacles and enemies
  • Develop the game as a single-player web app using Unity
  • Include high score tracking functionality

Target Audience:

  • Casual gamers who enjoy retro-style platformers
  • Players looking for a unique twist on classic game mechanics

Key Features:

  • Chicken protagonist that grows larger by collecting eggs/grain
  • Size-based damage system (shrinking when hit, death at smallest size)
  • Egg-shooting ability for combat
  • Farm-themed obstacles and enemies (scarecrows, windmills, foxes, farmer's tools)
  • 16-bit graphic style
  • Simple controls using ASDW keys and spacebar
  • High score tracking
  • Boss battle against a giant mechanical harvester

User Stories:

  • As a player, I want to control a chicken character that grows larger as I collect eggs/grain
  • As a player, I want to navigate through farm-themed obstacles and defeat enemies by shooting eggs
  • As a player, I want to experience increasing difficulty across 5 levels in a farm world
  • As a player, I want to face a challenging boss battle at the end of the game
  • As a player, I want to see my high score posted after completing the game

User Flows

  1. Main Gameplay Flow:

    • Player starts the game
    • Navigate through farm-themed obstacles and enemies
    • Collect eggs/grain to grow larger
    • Shoot eggs at enemies to defeat them
    • Avoid damage to prevent shrinking
    • Complete the level by reaching the end
  2. Boss Battle Flow:

    • Player reaches the final level
    • Face the giant mechanical harvester boss
    • Use egg-shooting and size-changing skills strategically
    • Defeat the boss to complete the game
  3. High Score Flow:

    • Player completes the game
    • Game calculates the player's score
    • If it's a high score, it's posted to the leaderboard
    • Player can view their ranking on the high score list

Technical Specifications

Recommended Stack:

  • Game Engine: Unity
  • Programming Language: C# (default for Unity)
  • Platform: Web (WebGL build)

Core Technical Decisions:

  • Use Unity for game development due to team experience and suitability for 2D games
  • Implement the game as a web app for easy accessibility
  • Utilize Unity's built-in physics engine for character movement and collisions
  • Use Unity's sprite rendering system for 16-bit style graphics

API Endpoints

N/A

Database Schema

N/A

File Structure

/Assets /Scripts PlayerController.cs EnemyBehavior.cs LevelManager.cs ScoreManager.cs BossController.cs /Sprites /Characters Chicken.png Enemies.png /Obstacles Scarecrow.png Windmill.png FarmerTools.png /Backgrounds FarmBackground.png /Prefabs Player.prefab Enemies.prefab Obstacles.prefab /Scenes MainMenu.unity Level1.unity Level2.unity Level3.unity Level4.unity Level5.unity BossBattle.unity /Audio BackgroundMusic.mp3 SoundEffects.mp3 /ProjectSettings /Packages

Implementation Plan

  1. Set up Unity project and configure for 2D game development
  2. Create basic player character with movement and size-changing mechanics
  3. Implement egg-shooting functionality
  4. Design and create farm-themed obstacles and enemies
  5. Develop level progression system (5 levels with increasing difficulty)
  6. Implement score tracking and high score functionality
  7. Create boss battle mechanics and level
  8. Design and implement UI elements (menus, HUD)
  9. Add sound effects and background music
  10. Optimize for web deployment
  11. Test thoroughly and fix bugs
  12. Deploy as a web app

Deployment Strategy

Build the game for WebGL platform in Unity and host on a web server or game hosting platform that supports Unity WebGL builds.

Design Rationale

Unity was chosen as the game engine due to its suitability for 2D game development and the team's experience level. The decision to implement as a web app allows for easy accessibility across different platforms without requiring installation. The 16-bit art style was selected to match the retro-inspired gameplay and for its relative simplicity in asset creation.