Skip to content

Filszu/samurai-game

Repository files navigation

Samurai Adventure Game

Samurai Adventure

Overview

Samurai Adventure is an action-packed 2D platformer game where you play as a samurai warrior battling against various enemies. The game features fluid animations, multiple enemy types, and different game modes to challenge your skills.

Features

  • Multiple Game Modes:

    • Normal: Standard gameplay with up to 4 enemies
    • Hard: Challenging gameplay with up to 8 enemies
    • Ninja: Face only ninja enemies (up to 7)
    • Samurai: Battle against elite samurai warriors (up to 7)
    • Hardcore: Extreme challenge with up to 15 enemies at once
    • Adventure: Progress through 20 levels, unlocking new enemy types
    • Boss Fight: Face off against a powerful Heavy Warrior with special attacks
  • Diverse Enemies:

    • Goblins: Quick and agile creatures that attack in packs
    • Ninjas: Stealthy assassins with lightning-fast attacks
    • Skeletons: Undead warriors that are slow but resilient
    • Samurai: Elite warriors with exceptional combat skills
    • Heavy Warrior: A formidable boss with powerful flame attacks
  • Game Mechanics:

    • Fluid movement and combat animations
    • Health flasks that appear at score milestones
    • Coin collection for bonus points
    • Platforming elements with randomly generated platforms
    • Responsive controls for both desktop and mobile

How to Play

Desktop Controls

  • A/D or Arrow Keys: Move left/right
  • Space/W/Up Arrow: Jump
  • J: Attack

Mobile Controls

  • Use the on-screen buttons to control your samurai
  • Left/Right buttons in bottom left to move
  • Jump button above movement controls
  • Attack button in bottom right to attack enemies

Game Objectives

  • Defeat enemies to earn points
  • Collect coins to increase your score
  • Avoid enemy attacks to preserve your health
  • Aim for a high score and challenge your friends!
  • In Adventure mode, complete all 20 levels to win
  • In Boss Fight mode, defeat the Heavy Warrior to win

Health Flasks

  • Health flasks restore 10-30% of your health
  • In Normal and Hard modes, flasks appear every 200 points
  • In Ninja, Samurai, and Hardcore modes, flasks appear every 200 points
  • In Adventure mode, one flask appears per level

Technical Details

This game is built with:

  • Next.js for the framework
  • React for the UI components
  • Canvas API for rendering the game
  • TypeScript for type safety
  • Tailwind CSS for styling

The game features:

  • Sprite-based animations
  • Collision detection
  • Physics simulation
  • Parallax backgrounds
  • Responsive design

Development

To run the project locally:

  1. Clone the repository
  2. Install dependencies with npm install
  3. Run the development server with npm run dev
  4. Open http://localhost:3000 in your browser

Author

Created by filszu

Enjoy the game!