Skip to content

jorrit-stack/Farmer_Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Potato Harvest Game

A TypeScript-based 2D farming game where you collect equipment and harvest potatoes while racing against time and snails!

Features

  • Visual Assets: Uses proper sprite images for farmer, potatoes, and other game objects
  • Two Scenes: House (collect equipment) and Yard (harvest potatoes)
  • Smart AI: Snails that target the nearest potatoes
  • Equipment System: Collect apron and hat to unlock the yard
  • Scoring: Points for good potatoes, penalties for rotten ones
  • Timer: 60-second time limit

Setup

  1. Install dependencies:
npm install
  1. Add your image assets to the public/ folder:

    • Farmer.png - Default farmer sprite
    • Farmer_with_apron_and_StrawHat.png - Equipped farmer sprite
    • apron.png, hat.png - Collectible items
    • potato_good.png, potato_rotten.png - Potato sprites
    • snail.png - Snail sprite
    • house_bg.png, yard_bg.png - Background images
  2. Run the development server:

npm run dev
  1. Open your browser to the URL shown (usually http://localhost:5173)

Controls

  • WASD or Arrow Keys - Move the farmer
  • Collect both apron and hat in the house
  • Walk to the door to enter the yard
  • Harvest all good potatoes before time runs out!

Game Mechanics

  • House Scene: Collect the red apron and yellow hat
  • Yard Scene: Harvest brown potatoes (good) and avoid black ones (rotten)
  • Snails: AI-controlled enemies that eat your potatoes
  • Scoring: +10 points for good potatoes, -5 points for rotten ones
  • Win Condition: Harvest all good potatoes before time runs out

Asset Fallbacks

The game includes fallback graphics if image files are missing, so it will work even without custom sprites. However, adding your own images will make it much more visually appealing!

Building for Production

npm run build

The built files will be in the dist/ folder, ready to deploy to any web server.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors