As a way to understand the advantages of modern OOP over older coding practices, I followed along with the 1983 book Write Your Own Adventure: Programs for Your Microcomputer and created its BASIC text adventure in an online Applesoft BASIC emulator.
After creating the original BASIC adventure, I began re-creating it within C++ using our university's barebones OpenGL engine. I opted to read in item and map data from a JSON file for modularity, and did so through a library known as JSON for Modern C++. With this functionality, you can add/edit items and rooms without recompiling the game which was great for last minute fixes and small tweaks.
My aim was to re-create the game as faithfully as possible in C++, however along the way I fixed a number of issues with the mechanics and made a few features easier to access - all of which was detailed in a changelog document.
The game plays and functions almost identical, and although obviously a larger codebase than the BASIC game, allows for easier modularity for future updates and improved code readability for bug fixes. As well as this, the ability to re-use code sections through functions without relying on BASIC's GOTO functionality is far more easily understandable, and with modern day IDEs, being able to jump to a function definition makes that even better.
The C++ project can be downloaded on itch.io below, and its source code along with the BASIC game and documentation can be found at the GitHub link, also below.