Just completed section 5 of my Udemy course for learning C++. Overall it’s been a great experience! As well as completing that section, I have completed my first C++ game! (Whoo-hoo! Praise God!) “TIMBER!”

output2.gif

I have a Linux version that you can download from my GitLab. Most likely, the pre-compiled version will error for you depending on where your SFML is installed, but I’ve made a handy build script just to make it easy.

You will need SFML installed on your Linux system. If you use Debian/Ubuntu, you can use:

# apt-get install libsfml

Then, download or clone my GitLab project, extract, and go into the Timber folder. In a terminal run the ./build.sh file, and it should build and launch the game!

Controls are simple:

  • Left or Right arrows to move the character to the left or right and to chop with the ax.
  • Escape key should exit (as will the right click of the mouse)
  • Return key to start over!

Try not to get squished and see how many logs you can cut before you run out of time!

That’s it! I hope you enjoy it. I added a few little enhancements after the class was over. The lumberjack faced the wrong way on the left side of the tree, and a few nit picky things like that. I just felt that, while the class had instructed me how to do many things, some clean up was in order.

Feel free to let me know what you think if you tried it out!

Linux – keep it simple.

Leave a Reply

Your email address will not be published. Required fields are marked *