English | 简体中文
TinyFarm
TinyFarm is a cross-platform C++ farming game developed using Entt, SDL3, OpenGL, MiniAudio, Freetype, glm, ImGui, nlohmann-json, and Tiled.
This project is an educational demonstration project and is the 5th part of the “C++ Game Development Journey” tutorial series.
Controls
- Move:
W/A/S/D or Arrow Keys ↑/←/↓/→
- Attack/Use:
Left Mouse Button or K
- Interact:
F
- Toggle Character Light (night only):
L
- Pause:
P or Esc
- Inventory:
I
- Hotbar:
Tab
- Hotbar Slot Selection:
1 ~ 0 (corresponding to slots 1~10)
- Camera Zoom/Reset:
Mouse Wheel/Middle Button
- Game Layer Debug UI:
F5 / `
- Engine Layer Debug UI:
F6/\
Web Demo
TinyFarm
Game Screenshots
Third-Party Libraries
Build Guide
Dependencies will be automatically downloaded via Git FetchContent, making the build process very simple:
git clone https://github.com/WispSnow/TinyFarm.git
cd TinyFarm
cmake -S . -B build
cmake --build build
Note: This project uses paid assets from farm-rpg. Due to copyright reasons, the repository does not include the original asset files, only image placeholders to ensure the program runs properly (sufficient for game development learning purposes).
If you want to achieve the effects shown in the demo project, you can purchase the asset pack and copy all contents to the assets/farm-rpg folder (overwriting the original files).
If you encounter problems downloading this project (especially in mainland China network environment), you can download the complete source code (including third-party libraries) from Baidu Netdisk for compilation.
The project source code version in the Netdisk may lag behind the GitHub repository. It is recommended to download this repository and then copy the third-party library source code (external folder contents) from the Netdisk to this repository for compilation.
Acknowledgements
- sprite & UI
- font
- sound
- music
- Sponsors:
sino, 李同学, swrainbow, 爱发电用户_b7469, 玉笔难图, jl
For support or feedback, please use the Issues section of this repository. Your feedback is essential for improving this tutorial series!
Buy Me a Coffee

QQ Group and My WeChat QR Code
评论