Roguelike Game in C++17

Introduction

Goal of this project

This project documents my attempts at going through the process of making a Roguelike game in Modern C++. The associated source code lives in GitHub Repository. At the end of each milestone, there will be a link to state of the repository to that point in time.

Code is heavily commented, so it should not require any "getting into writer's mind" on reader's part. If some aspect is confusing to you, the dear reader, please open an issue on github repo. Alternatively you can reach out to me on Afternet.org's #GameDev IRC channel.

All the code is written and tested on MS Windows OS, version 7 and 10. I do not have a Apple MacOS nor do I have access to a GNU/Linux based OS. However, given that none of the code is utilizing Win32 specific functionality, it should be relatively easy to build this project on those OSes, given appropriate development environment setup.

Influences on the approach

The project is based on and follows the approach taken/presented by Roguelike Tutorials as well as the variant Roguelike Tutorials in Rust. Project uses the same library libtcod referred here on out as tcod.

The C++ code itself is written in ISO Standard C++ 17, it does not utilize any compiler specific extensions. It is formatted in Allman style, with snake_case naming, and TAB for indent and SPACE for alignment. On my machine TAB Size is configured to be 4, you can change it for your specific preference. I prefer to use Trailing Return Types for method and function declarations and definitions. Other C++ coding guideline, loosely, being followed is C++ Core Guidelines.

Actually, I lied about writing purely Standard C++ 17. There is one non-standard feature that is used in every header file. And that is #pragma once, which is a short hand way of defining include guards, not to mention less error prone. Every compiler capable of C++17 supports it.

Another aspect of the approach is how the code is written and refactored. I tended to write a functioning implementation and then refactor it to make the code more scalable/safer/usable.

Log of Code

References

Licence

All code in this repo is marked as being under MIT licence. Only the code i.e. *.cpp, *.hpp and CMakeLists.txt.


Author: Neel Raiyani [Roy Fokker]

Created: 2019-11-03 Sun 17:03

Validate