Welcome to TimberMan, a game project built using CSFML (C binding for SFML). This document provides an overview of the project, instructions for setup, and details about its functionality.
TimberMan is a simple yet engaging game where a player chops wood while avoiding branches. The project demonstrates proficiency in:
- Game development with CSFML
- Sprite and animation handling
- Sound management
- Basic game mechanics implementation
- The trunk textures dynamically update, simulating a moving tree as the player chops wood.
- Randomized branches for added challenge.
- Responsive player movement between left and right positions.
- Smooth transition between idle, cutting, and death animations.
- Direction-specific sprite scaling.
- Realistic cutting sounds.
- Death sound effects to enhance gameplay immersion.
The UpdateTruncTexture function manages the textures of the tree trunk segments, ensuring they shift properly and new textures are randomly assigned.
void UpdateTruncTexture(Level* const _level)
{
const sfTexture* originalTexture;
// Trunk shifting logic
...
AsigneTruncTexture(&_level->trunc6, rand() % 4, &_level->texture);
}Player movement updates dynamically based on input, and animations transition seamlessly between states.
void PlayerUpdateAnimation(float _dt, Player* const _player)
{
if (!_player->dead)
{
if (_player->isCutting)
{
_player->animation.currentAnim = &_player->animation.woodcutting;
}
else
{
_player->animation.currentAnim = &_player->animation.idle;
}
}
else
{
_player->animation.currentAnim = &_player->animation.dead;
}
AnimateSprite(_player->animation.currentAnim, _dt);
}-
Clone this repository:
git clone https://github.com/username/Timberman.git
-
Open the project with Visual Studio and build it.
-
Run the compiled executable to see the shader in action.
- Add support for additional levels.
- Implement a scoring system.
- Introduce multiplayer functionality.
- Add more animations and sound effects for enhanced gameplay.
- CSFML: For providing a simple and efficient API for multimedia applications.
- Creative Commons Assets: Game sprites and sounds.
Remake made by Klaivert