Explore the Dragon Realm: Build a C++ adventure game with a little help from AI
about.gitlab.com
about.gitlab.com
old: https://about.gitlab.com/images/blogimages/compassinfield.pn...
After reading your comment, we swapped out the photo so that no one else would have such an unsettling experience! I liked the compass photo, so I feel a bit silly that I didn't notice what you did! I'll remember your comment and zoom the next time we pick a stock photo, haha. Thank you!
The resulting game from the article is a very, very simple text adventure, with what looks like 3 different leaf nodes. A great way for someone to learn control flow and variable management, but it does beg the question, why C++? And further, why AI?
If someone approached and said "Joe - I want to learn more about programming, and eventually make my own game", I don't think I'd tell them to start with a C++ text adventure. Whatever spark they were feeling in the moment would be sufficiently stomped when they notice the first step in the tutorial is to create a Makefile. Keep in mind they also introduce the concept of variables and if statements. This tutorial's aimed at total beginners!
"Joe, what's a Makefile?" "Well..."
"It's this thing you might need for a different C++ project. For this project, one source file is enough"
IOW, for someone who wants to write a tiny program, and wants to do it in C++, a Makefile is pointless.
GitLab team member and author of the blog post here. Both excited and terrified to be on HN, honestly - what a honor!
* Totally agree that the Makefile was a high bar of entry right at the beginning. Since we're working with a single source file, I just opened an MR to update the blog post to compile it directly in the terminal [1]. Do you think this approach would make it more beginner-friendly?
* My fondness for C++ might've steered the direction of the project a bit! I considered a 2D platformer at first, but felt that I/o centric approach would be easier for a beginner. I could always rebuild the text adventure into a 2D platformer - would make for an interesting follow-up post. I hadn't thought of an ASCII crawler at all, so thank you for that idea!
* Lately, everyone's been using AI assisted code as a helping hand, especially in simpler projects like this one where it's likely to provide helpful suggestions. The integration was an attempt to, of course, promote our Code Suggestions feature ;), and also showcase how AI can function something like copy pasting code from a tutorial by providing you with code you can use.
* As for the complexity, I was debating between writing this for beginners vs an intermediate audience and asked myself things like "Can I assume that this person who knows what conditionals like while or for loops are?". After some peer reviews, it became a very introductory C++ lesson. Striking the right balance can be tricky. I'm hoping to get into more complex code in future parts, but first I really need to introduce functions because the code needs it haha.
Thanks for your valuable feedback and things to think on, super appreciated! :)
[1]https://gitlab.com/gitlab-com/www-gitlab-com/-/merge_request...
Thanks for your great feedback. I suggested using a Makefile during blog post review [0], to avoid explaining gcc compiler flags, and have a single command with `make build` available for future, repeated compilation steps. I did not expect this to be an entry barrier, and will reconsider suggesting makefiles in the future. Thanks again.
[0] https://gitlab.com/gitlab-com/www-gitlab-com/-/merge_request...
(GitLab team member here)
Neither provides a 100% working solution out of the box, but I'd rather argue with ChatGPT about a library it hallucinated than dal with the egomaniacs that exist solely to lock threads on StackOverflow.