A fast-paced tree-chopping arcade game built with C++17 and SFML 2.5.
Chop as many logs as you can before the timer runs out โ but watch out for branches!
| Key | Action |
|---|---|
Enter |
Start / Restart game |
โ Left Arrow |
Chop left side |
โ Right Arrow |
Chop right side |
Escape |
Quit |
- Each chop adds to your score and grants a small time bonus.
- A branch on your side when you chop kills you instantly.
- The time bar depletes continuously โ keep chopping!
timberman/
โโโ src/
โ โโโ main.cpp # Entry point
โ โโโ Game.cpp # Core game logic
โโโ include/
โ โโโ Game.hpp # Game class declaration
โโโ graphics/ # PNG assets (included)
โโโ fonts/ # TTF fonts (included)
โโโ sound/ # WAV sound effects (included)
โโโ CMakeLists.txt # CMake build script
โโโ README.md
| Dependency | Version |
|---|---|
| C++ compiler (GCC / Clang / MSVC) | C++17 or later |
| SFML | 2.5.x |
| CMake | 3.16+ |
1. Install dependencies
sudo apt install libsfml-dev cmake build-essential2. Clone and build
git clone https://github.com/AKumarOfficial/timberman.git
cd timberman
cmake -S . -B build
cmake --build build3. Run
./build/Timberman1. Install prerequisites
- CMake โ cmake.org/download (check "Add to PATH" during install)
- MinGW-w64 (GCC) โ winlibs.com (download the GCC 64-bit release)
- SFML 2.5.1 โ sfml-dev.org/download.php (pick the "GCC MinGW 64-bit" build)
Extract it somewhere easy, e.g.C:\SFML-2.5.1
2. Clone the repository
git clone https://github.com/AKumarOfficial/timberman.git
cd timberman3. Configure and build
cmake -S . -B build -G "MinGW Makefiles" -DSFML_DIR="C:/SFML-2.5.1/lib/cmake/SFML"
cmake --build buildReplace
C:/SFML-2.5.1with your actual SFML extraction path.
4. Copy SFML DLLs (required on Windows so the .exe can find them)
copy "C:\SFML-2.5.1\bin\*.dll" build\5. Run
build\Timberman.exe1. Install prerequisites
- Visual Studio 2019 or later with the "Desktop development with C++" workload
- CMake โ cmake.org/download
- SFML 2.5.1 โ sfml-dev.org/download.php (pick the "Visual C++ 15 (2017) 64-bit" build)
Extract to e.g.C:\SFML-2.5.1
2. Clone the repository
git clone https://github.com/AKumarOfficial/timberman.git
cd timberman3. Configure and build
cmake -S . -B build -DSFML_DIR="C:/SFML-2.5.1/lib/cmake/SFML"
cmake --build build --config Release4. Copy SFML DLLs
copy "C:\SFML-2.5.1\bin\*.dll" build\Release\5. Run
build\Release\Timberman.exe1. Install dependencies
brew install sfml cmake2. Clone and build
git clone https://github.com/AKumarOfficial/timberman.git
cd timberman
cmake -S . -B build
cmake --build build3. Run
./build/Timberman| Error | Fix |
|---|---|
SFML not found |
Set -DSFML_DIR to the correct path |
Failed to load texture: graphics/... |
Make sure asset folders are inside the project root |
.dll not found on Windows |
Copy all DLLs from SFML/bin/ next to the .exe |
mingw32-make not found |
Add MinGW bin/ folder to your system PATH |
All assets are included in the repository โ no additional downloads needed.
graphics/
โโโ background.png
โโโ tree.png
โโโ branch.png
โโโ player.png
โโโ axe.png
โโโ log.png
โโโ rip.png
โโโ bee.png
โโโ cloud.png
โโโ bird.png
fonts/
โโโ KOMIKAP_.ttf
sound/
โโโ chop.wav
โโโ death.wav
โโโ out_of_time.wav
The project is structured around a single Game class following the classic game loop pattern:
Game::run()
โโโ processEvents() โ keyboard / window events
โโโ update(dt) โ physics, AI, collision, timer
โโโ render() โ clear โ draw โ display
All state is encapsulated in Game; main.cpp is purely an entry point with error handling.
- Fork the repository
- Create a feature branch (
git checkout -b feature/awesome-thing) - Commit your changes (
git commit -m "Add awesome thing") - Push to the branch (
git push origin feature/awesome-thing) - Open a Pull Request
This project is licensed under the MIT License โ see LICENSE for details.