A TypeScript-based 2D farming game where you collect equipment and harvest potatoes while racing against time and snails!
- 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
- Install dependencies:
npm install-
Add your image assets to the
public/folder:Farmer.png- Default farmer spriteFarmer_with_apron_and_StrawHat.png- Equipped farmer spriteapron.png,hat.png- Collectible itemspotato_good.png,potato_rotten.png- Potato spritessnail.png- Snail spritehouse_bg.png,yard_bg.png- Background images
-
Run the development server:
npm run dev- Open your browser to the URL shown (usually
http://localhost:5173)
- 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!
- 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
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!
npm run buildThe built files will be in the dist/ folder, ready to deploy to any web server.