Skip to content

devhitp/FarmSimulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

21 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒพ Farm Simulator

A browser-based farming simulation game built from scratch using HTML5 Canvas, CSS, and Vanilla JavaScript.

Status Version License


๐Ÿ“– About

Farm Simulator is a 2D farming simulation game currently under active development. The goal of this project is to create a complete farming experience entirely from scratch without using any external game engine or JavaScript framework.

Instead of relying on existing libraries, every major systemโ€”including the game loop, rendering engine, camera, world generation, player movement, farming mechanics, inventory, economy, and save systemโ€”is being designed and implemented manually.

This project serves both as a learning journey and as a demonstration of software architecture, clean code principles, and game development using modern JavaScript.


โœจ Current Features (v0.1.0)

๐ŸŽฎ Engine

  • โœ… Custom game loop using requestAnimationFrame()
  • โœ… HTML5 Canvas rendering engine
  • โœ… Delta-time movement
  • โœ… Camera follow system
  • โœ… Tile Registry
  • โœ… Brush System
  • โœ… Procedural world generation
  • โœ… Water collision
  • โœ… Player facing direction
  • โœ… Tool cooldown system

๐ŸŒพ Farming

  • โœ… Hoe tool
  • โœ… Tile interaction system

๐Ÿš€ Planned Features

๐ŸŒฑ Farming

  • Plant seeds
  • Water crops
  • Crop growth stages
  • Harvest crops
  • Multiple crop varieties

๐ŸŽ’ Inventory

  • Item system
  • Inventory management
  • Tool selection
  • Equipment upgrades

๐ŸŒ World

  • Trees
  • Rocks
  • Flowers
  • Procedural decorations
  • Expandable farm

๐Ÿช Economy

  • Shop system
  • Coin system
  • Buying & selling
  • Farm upgrades

๐ŸŒฆ World Systems

  • Day & Night cycle
  • Weather
  • Seasons
  • Save & Load
  • Auto Save

๐Ÿก Living World

  • NPC Villagers
  • Animals
  • Fishing
  • Events
  • Exploration

๐Ÿ”ฅ Future (Hard Mode)

  • Hunger
  • Stamina
  • Wildlife
  • Survival mechanics
  • Dynamic difficulty

๐Ÿ›  Tech Stack

  • HTML5
  • CSS3
  • Vanilla JavaScript (ES6+)
  • HTML5 Canvas
  • Git
  • GitHub

๐Ÿง  Technical Highlights

  • Object-Oriented Design
  • Modular Architecture
  • Procedural World Generation
  • Data-Driven Tile Registry
  • Brush-Based Terrain Generation
  • Camera System
  • Collision Detection
  • Custom Input System
  • Tool System
  • Clean Git Workflow

๐Ÿ“‚ Project Structure

FarmSimulator/
โ”‚
โ”œโ”€โ”€ assets/
โ”œโ”€โ”€ js/
โ”‚
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ TODO.md
โ”œโ”€โ”€ DEVLOG.md
โ”œโ”€โ”€ CHANGELOG.md
โ”œโ”€โ”€ LICENSE
โ””โ”€โ”€ index.html

๐Ÿ“… Development Roadmap

โœ… Sprint 1 โ€” Engine Foundation

  • Project Setup
  • Game Loop
  • Camera
  • Player Movement
  • Procedural World
  • Brush System
  • Tile Registry
  • Hoe Tool

๐Ÿšง Sprint 2 โ€” Core Farming

  • Item Registry
  • Inventory
  • Seeds
  • Watering Can
  • Crop Growth
  • Harvesting

โณ Sprint 3 โ€” Living World

  • Trees
  • Rocks
  • Flowers
  • World Decoration

โณ Sprint 4 โ€” Economy

  • Shop
  • Money
  • Farm Expansion

โณ Sprint 5 โ€” Save System

  • Save / Load
  • World Seed
  • Player Progress

โณ Sprint 6 โ€” Polish

  • Pixel Art
  • Animations
  • Sound Effects
  • UI Improvements

๐ŸŽฏ Learning Goals

This project focuses on improving practical skills in:

  • JavaScript
  • HTML5 Canvas
  • Game Development
  • Object-Oriented Programming
  • Software Architecture
  • Git & GitHub
  • Debugging
  • Performance Optimization

๐Ÿค Development Workflow

Every completed milestone follows a structured workflow:

  • โœ… Planning
  • โœ… Development
  • โœ… Testing
  • โœ… Git Commit
  • โœ… Git Push
  • โœ… TODO Update
  • โœ… DEVLOG Update
  • โœ… CHANGELOG Update
  • โœ… Git Tag
  • โœ… GitHub Release

๐ŸŒŸ Vision

The long-term vision of Farm Simulator is to become a polished browser-based farming game featuring procedural world generation, relaxing gameplay, expandable farming mechanics, and clean software architecture.

Beyond creating a game, the project aims to demonstrate how medium-sized JavaScript applications can be designed, organized, and maintained using professional development practices.


๐Ÿ“œ License

This project is licensed under the MIT License.


โญ If you like this project, consider giving it a star!

About

๐ŸŒพ A 2D Farming Simulator built with HTML5 Canvas, CSS & Vanilla JavaScript. Inspired by Stardew Valley and built completely from scratch.

Topics

Resources

License

Stars

Watchers

Forks

Contributors