English | 简体中文
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.
- Move:
W/A/S/Dor Arrow Keys↑/←/↓/→ - Attack/Use:
Left Mouse ButtonorK - Interact:
F - Toggle Character Light (night only):
L - Pause:
PorEsc - 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/\
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 buildNote: 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-rpgfolder (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 (
externalfolder contents) from the Netdisk to this repository for compilation.
- sprite & UI
- font
- sound
- https://ateliermagicae.itch.io/fantasy-ui-sound-effects
- https://freesound.org/people/Benboncan/sounds/69422
- https://freesound.org/people/michaelperfect/sounds/710298/
- https://freesound.org/people/soundscalpel.com/sounds/110393/
- https://freesound.org/people/Valenspire/sounds/699492/
- https://freesound.org/people/wobesound/sounds/488393
- https://kasse.itch.io/ui-buttons-sound-effects-pack
- https://mixkit.co/free-sound-effects/garden/
- https://mmvpm.itch.io/platformer-sound-fx-pack
- https://pixabay.com/sound-effects/pick-axe-striking-rocks-2-63070/
- https://tommusic.itch.io/free-fantasy-sfx-and-music-bundle
- 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!









