He wrote this out BY HAND? // Code Review
Education
Introduction
Welcome back to another installment of my code review series, where you, the viewers, send me your code, and I provide my feedback. Today, I’m diving into a project called "Skyward Scammer," submitted by Sarab Meta. It’s a unique RPG game where the protagonist leverages wit and charm to scam a dealer, ultimately escaping with balloons. The concept intrigued me right away—let's take a closer look!
This time, I’m trying something different. Instead of rushing through the analysis—as I often do for brevity—I’ll explore the code in greater detail. You can anticipate the full analysis on my Patreon, while here, you’ll see highlighted points. The game uses C++ and the SDL2 library, which supports various platforms, showcasing good developer practices.
Upon inspecting the repository, I noticed some rendering issues during my initial playthrough. The debugging process revealed that certain graphical elements were not being rendered correctly, which detracted from the overall experience. However, the game has ambition; supporting multiple platforms right from the start is commendable.
After starting the game, I found myself in a funny scenario where I had to scam a dealer named Gonzo. The dialogue was quite entertaining, but the movement mechanics felt clunky and affected gameplay negatively. After a few attempts, I managed to escape with balloons—a rather humorous conclusion.
I transitioned to the code review, starting with the main function that initializes the game engine. My initial impression was mixed; the game engine involved some static variables, which complicates maintainability and scalability. Using static members often leads to issues down the line, especially for beginners. Instead, I recommended a tree structure for the code architecture, allowing for cleaner access points without cluttering global state.
When examining the resource loading, I noticed that using plain strings for asset paths wasn’t ideal. Utilizing C++17's filesystem capabilities would promote better practices. Additionally, resource managing through shared pointers (or another form of reference counting) could enhance stability, especially if multi-threading were introduced down the line.
Overall, my feedback highlighted areas for improvement, particularly around structuring and resource management. It was intriguing to see how this project unfolded, and there’s potential yet to be explored further.
Keywords
C++, SDL2, RPG game, code architecture, resource management, asset loading, static variables, game development, code review.
FAQ
Q1: What is the main goal of "Skyward Scammer"? A1: The main goal is to play as a protagonist who scams a dealer while escaping with balloons.
Q2: What programming languages and libraries were used? A2: The game is developed using C++ and the SDL2 library.
Q3: What were the main criticisms in the code review? A3: The main criticisms included the use of static variables, the resource management strategy, and the lack of using modern C++ features for file paths.
Q4: Where can I find the full code review? A4: The full analysis and discussions are available on my Patreon page.
Q5: How can I submit my code for review? A5: You can send your code to my email at CHreview@gmail.com, where guidelines are also provided.