Skip to content

mataktelis11/Simple-SFML-2D-Game

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SFML Simple 2D Game: Scroll of the Undead

GitHub GitHub top language

This is a free and open-source game based on the source code provided by the book SFML Game Development By Example (ISBN 9781785287343).

Alt text

Intro

This repository is a fork from sschellhoff who provided the original book's source code in a runnable version.

Here is a video demo

demo.webm

Build Instructions

Linux

Prerequisites

Install SFML from your package manager. Also, make sure you have cmake and g++.

For Debian based distros:

$ sudo apt install libsfml-dev cmake build-essential

For Arch-based distros:

$ pacman -Syu cmake sfml base-devel 

Build

Build from source

$ git clone https://github.com/mataktelis11/Simple-SFML-2D-Game.git
$ cd Simple-SFML-2D-Game
$ mkdir build && cd build
$ cmake ..
$ cmake --build .

This will generate an executable file called ScrollOfTheUndead in the current dir.

Windows

Prerequisites

Make sure that CMake, git, SFML and mingw are in your path. If this is your first time compiling an SFML project on Windows you can check out this helpful guide.

Build

Open cmd or gitbash and type the following commands to build from source

$ git clone https://github.com/mataktelis11/Simple-SFML-2D-Game.git
$ cd Simple-SFML-2D-Game
$ mkdir build 
$ cd build
$ cmake -G "MinGW Makefiles" ..
$ mingw32-make

An .exe file should now exist in the build folder called ScrollOfTheUndead.exe.

Details

This is game is an improvement of the book's Chapter 7. More specifically the following additions have been made:

  • Added a healthbar for the player.
  • Added a new spritesheet for the player.
  • Added music and sounds (not with the book's sound manager but with a much less sophisticated implementation)
  • Added a new tileset (16 * 16) Added an new Tile Set (32x32).
  • Added a Python script that generates .map files from .csv files made with Tiled (This makes it easier to create a map)
  • Added CMakeLists.txt a based on this amazing guide.
  • Minor other changes...

This project started because I wanted to create a video game from scratch. Thankfully the book does a good job providing and explaining a template that can be a good start as my very first game. I strongly recommend you check out this book if you want to see what game development really is.

I chose Chapter 7 as I feel it is a good middle ground for everyone how have read the book. Do not expect this to be the most amazing game ever.

Before checking out the source code I strongly recommend to read the book first (especially if you are relatively new to C++ like me). There is also documentation (in Greek) provided in the docs folder.

Assets used

  1. Textures:
  2. Music:
  3. Sound effects:
  4. Backgrounds:
  5. Fonts:
  6. Logo made with placeit.net

Huge shout out to all those amazing creators!

Tools used

Important

I do NOT own the mentioned book, and this project is not made to be sold in any way.

License

GPL-3.0 license - Check the LICENSE.md file.

Releases

No releases published

Languages

  • C++ 93.7%
  • Python 4.4%
  • CMake 1.9%