Lofi Valley is a browser-based farming simulation game inspired by Stardew Valley, Animal Crossing, and Fae Farm. Built with performance and player freedom in mind, it features a deterministic headless game engine that separates simulation logic from rendering, allowing for smooth gameplay at variable speeds (x1, x2, x4, x10) without breaking game mechanics.
Warning
Preview Build - Not Production Ready
This is a prototype/preview build shared publicly to showcase the headless architecture concept. The codebase is not yet ready for production development and requires significant cleanup, optimization, and refactoring (DRY principles, performance improvements, etc.).
Feel free to explore the architecture and concepts, but expect rough edges and areas that need improvement. Contributions and feedback are welcome!
- 🎮 Headless Game Engine Architecture - Deterministic simulation independent of rendering
- ⏱️ Variable Time Control - Play at your own pace with adjustable game speed
- 🌱 Farming System - Plant, water, and harvest crops with realistic growth mechanics
- 🛠️ Farm Laboratory - Visual editor for designing and testing farm layouts
- 🌍 Internationalization - Full i18n support (English & Spanish)
- 🎨 Pixel Art Aesthetic - Charming retro-style graphics
- 🖥️ Cross-Platform - Runs in browser and as desktop app (via Tauri)
Before you begin, ensure you have the following installed:
- Microsoft C++ Build Tools (Windows only)
- Rust - Required for Tauri
- Node.js 24.10+
For detailed prerequisites, see Tauri Prerequisites.
# Clone the repository
git clone https://github.com/Leoocast/lofi-valley-engine.git
cd lofi-valley-engine
# Install dependencies
npm install
# Run in development mode (web)
npm run dev
# Run as desktop app (Tauri)
npm run tauri devA visual design tool for creating and testing farm layouts. Features include:
- Terrain painting (grass, dirt, water)
- Object placement (trees, rocks, decorations)
- Real-time weather and time-of-day simulation
- Grid-based layout system
A dedicated environment for testing crop mechanics:
- Plant and grow various crops
- Test watering and growth systems
- Experiment with crop configurations
Lofi Valley uses a Headless Game Engine architecture with three distinct layers:
- Engine Layer - Pure TypeScript simulation logic (no React)
- State Layer - Zustand stores for state management
- View Layer - React components for rendering
This separation ensures:
- ⚡ High performance with minimal re-renders
- 🎯 Deterministic game logic
- 🧪 Easy testing and debugging
- 🔄 Time control without breaking mechanics
For more details, see /docs/game-engine-architecture.md.
- Framework: React 19
- Language: TypeScript
- State Management: Zustand
- Routing: TanStack Router
- Bundler: Vite
- Styling: Sass + Emotion + Tailwind CSS
- i18n: i18next + react-i18next
- Linting: ESLint with Airbnb Extended
- Formatting: Prettier
Press Ctrl + Shift + P, open settings.json, and add:
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "explicit"
},
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"editor.defaultFormatter": "esbenp.prettier-vscode"
}npm run dev # Start Vite dev server (web)
npm run build # Build for production
npm run preview # Preview production build
npm run tauri dev # Run Tauri desktop app in dev mode
npm run tauri build # Build Tauri desktop app/docs/game-engine-architecture.md- Core architecture principles/docs/systems/- Game systems documentation/docs/tools/- Tool implementations/ai/README.md- AI collaboration guidelines
Contributions are welcome! Please read the documentation in /docs to understand the architecture before contributing.
This project is licensed under the MIT License - see the LICENSE file for details.
- Live Demo: dev.lofivalley.com
- Discord: Join our community
- Bluesky: @arkydev
Made with 💚 by Leoocast
