Text
The current mockup of the SWN GM Tool:
Pretty simplistic currently, but I have an idea for how to arrange it that will hopefully not be too much work 😄
Project Updates - Aug 6, 2024
Back at it again! I'm hoping to get these devlogs up to at least once a month, if possible, assuming I can keep up this kind of pace with coding. Updates under the cut~
SWN GM Tool
When I decided to update my project list, I said I was moving my old SWN GM Tool down to a sort of backburner status. It felt a bit like the end of an era; the GM tool was my first real personal project that I had started after college and had been poking at it for the last ten years or so, so officially putting it on hold with a desire to come back to it one day was a little interesting.
Especially since I started working on it again that very same week.
I decided to start the whole project over, essentially, and use this as an opportunity to learn to use Godot more at the same time. Within a few days, I had made a simple Faction creation widget as well as a list of factions. In a week, I had a mechanism for saving that faction list to a file and loading it back up as well. All in a simple application made with Godot UI nodes!
I haven't touched the project again in a little over a month, now, but I'm feeling very good about returning and working more on it. Next steps are to make a Faction View scene that shows the stats and assets of the faction, and allows adding and removing assets. Once I feel like I have a good enough user experience for it - something that's not really my specialty - I'll probably upload it to itch.io with just the Faction and asset tracking. After that, I'd like to include a simple map and then a way to run the Faction Turn.
Libtcod Tutorials
Over a year after I received feedback from r/roguelikedev about my attempt at making a C++ tutorial for libtcod, I have begun making a concerted effort to continue working on the codebase again!
After the whole effort of getting a simple eventing system using double-dispatch in place, I took a pretty good break before returning. I decided to make sure the code was working on both Linux and Windows, and updated to the C++23 standard at the same time, which introduced some issues. At first I thought it was a problem with MSVC, but was able to replicate it with Clang as well. It turns out that the way I was doing virtual inheritance for the event handlers worked perfectly fine in C++20, but broke in C++23. Getting that figured out took a few days, but after that I confirmed it worked on GCC, Clang, and MSVC :D
Next I'm going to continue working on the actual tutorial code before I return to writing the tutorials for C++ again, to make sure that there's not more optimizations or architectural changes I'll want to do down the line that would be better to backport again.
3 notes
·
View notes
Text
Project Updates - Aug 6, 2024
Back at it again! I'm hoping to get these devlogs up to at least once a month, if possible, assuming I can keep up this kind of pace with coding. Updates under the cut~
SWN GM Tool
When I decided to update my project list, I said I was moving my old SWN GM Tool down to a sort of backburner status. It felt a bit like the end of an era; the GM tool was my first real personal project that I had started after college and had been poking at it for the last ten years or so, so officially putting it on hold with a desire to come back to it one day was a little interesting.
Especially since I started working on it again that very same week.
I decided to start the whole project over, essentially, and use this as an opportunity to learn to use Godot more at the same time. Within a few days, I had made a simple Faction creation widget as well as a list of factions. In a week, I had a mechanism for saving that faction list to a file and loading it back up as well. All in a simple application made with Godot UI nodes!
I haven't touched the project again in a little over a month, now, but I'm feeling very good about returning and working more on it. Next steps are to make a Faction View scene that shows the stats and assets of the faction, and allows adding and removing assets. Once I feel like I have a good enough user experience for it - something that's not really my specialty - I'll probably upload it to itch.io with just the Faction and asset tracking. After that, I'd like to include a simple map and then a way to run the Faction Turn.
Libtcod Tutorials
Over a year after I received feedback from r/roguelikedev about my attempt at making a C++ tutorial for libtcod, I have begun making a concerted effort to continue working on the codebase again!
After the whole effort of getting a simple eventing system using double-dispatch in place, I took a pretty good break before returning. I decided to make sure the code was working on both Linux and Windows, and updated to the C++23 standard at the same time, which introduced some issues. At first I thought it was a problem with MSVC, but was able to replicate it with Clang as well. It turns out that the way I was doing virtual inheritance for the event handlers worked perfectly fine in C++20, but broke in C++23. Getting that figured out took a few days, but after that I confirmed it worked on GCC, Clang, and MSVC :D
Next I'm going to continue working on the actual tutorial code before I return to writing the tutorials for C++ again, to make sure that there's not more optimizations or architectural changes I'll want to do down the line that would be better to backport again.
3 notes
·
View notes
Text
Project Updates - 5/7/24
Looks like it's time for my bi-yearly "remember this blog exists and post an update"! 😄It's been another few months of off and on work due to my day job and other life things going on, but still trying to chip away at things.
More on the individual projects under the cut~
libtcod tutorials
Since my first crack at writing up the C++ tutorials for libtcod, I've mostly been trying to decide what I want to show for them. Part of the feedback I received on the first tutorial was that it didn't have a clear audience, whether it was for beginners to programming or to more advanced developers. I've gone back and forth on this, and I think I've settled on making it more accessible to newer programmers, though that does mean I have some reworking to do. On the upside, I was able to fairly easily change the code on the early tutorials to account for newer versions of libtcod.
I have also been working through reimplementing later tutorials. Most recently worked on the fourth tutorial, where I decided to introduce an event handling system using double dispatch (specifically using the way outlined in this blog post). This approach is a bit complex to implement and describe since it uses certain template patterns, but overall it should allow for the rest of the tutorials to easily add functionality by simply adding events and new event handlers. Actually implementing it took a couple of days of trial and error due to a lot of factors (mostly trying to understand how it all worked myself), but now it's in a good state and pretty easily extendable! Explaining it in the tutorial, however, will be a different story 😅
OpenHomeworld
This is mostly still in the rough design phase still. Most of the tinkering I've done has been around loading and listing the Bigfile contents, and optimizations around that. I'm tempted to start working on a GUI archive tool to display items as well as insert and extract files from the Bigfile, though I'm not sure if I want to make something in Qt or try my hand at making a plugin for Godot. The Qt tool would probably end up being pretty simple and just show a list of files like how 7zip or WinRAR work, which itself would be just a UI around a command line tool, really. If I tried creating a Godot plugin, I'd also want to handle viewing and editing the files extracted from the Bigfile, too, and that would probably also require implementing the way to handle the Homeworld texture, mesh, script, and other files that have their own format internally. The Godot option is tempting, since I would want to have some sort of editor for the project at some point, but I'll probably keep is simple at this point and just make some small command line utilities. Options, though!
At the same time, I've been playing with the source port of the original game and trying my hand at updating the build system to CMake. This has gone mostly smoothly, except for one snag that I have yet to figure out a good way to handle. You see, the old Homeworld source code is written in C, but the game levels were created in a scripting language that the Relic devs used called KAS (which I think stands for Kick-Ass Scripts lol). Essentially these KAS files would get converted into C code and compiled into the main game executable, and the way the game is built with Makefiles makes it pretty easy to hook in calls to the utility programs to convert these files. In all my messing around, though, I have not been able to successfully replicate that process using CMake. I might need to specify all of the mission files explicitly to have them build and link properly, but I worry I'll end up running into a situation where the build will fail due to things being run out of order in multi-threaded builds (which is already a problem with the source port process though). Analysis continues...
Metal Max Redux - GBC game project
In my last devlog, I mentioned that I was interested in making a game based on a series of obscure JRPGs. The Metal Max/Metal Saga games are ones that I found last year and fell in love with, so much so that I wanted to create a game based off them. The first game in the series was an NES game that was never released in North America, but has a wonderful fan translation patch that I was playing through, but have not actually completed quite yet. It's a fun little RPG where you can drive tanks around a post-apocalyptic world fighting monsters, and has a pretty open structure to it, not unlike the first Dragon Quest or Final Fantasy.
Last year I also came across GB Studio, a free and open source all-included editor for creating GameBoy and GameBoy Color games from scratch, and this gave me a great idea: since I was a huge fan of the GBC port of Dragon Quest I+II, I thought I would make a similar port of Metal Max. So Metal Max Redux was born!
I'm still mostly in the beginning stages with this project still, but I've created a basic mock-up of overworld movement and triggering random battles. The random battle system took a while to puzzle out, and at one point I thought I was going to have to extend the engine that GB Studio uses, but I was able to make it work using a step counter attached to an invisible player object that seems to work well enough. Next steps will probably be analyzing how the NES battle code worked, so I'll be looking at lots of assembly. Fun times! 😄
Free City-States - lewd city management game
Finally, a project to earn my screenname 😄 I really enjoy city builder and management games like the Caesar series and Dwarf Fortress, and within the last few years games like Crusader Kings and Stellaris.
A while back, I was starting to help out with a project called Free Cities Reborn, itself a reimagining of an HTML game called Free Cities, a lewd management game with some city building aspects. I couldn't continue with FCR after a while due to some growing reservations about the content and focus of the game which extends somewhat to the original too, since its core gameplay is around the raising, training, and sale of sex slaves. It's a fun indulgence, if somewhat of a guilty pleasure, and it's certainly not the first game that's concerned with the subject matter, but I still felt weird contributing to a project where it was so focused on that. But at the same time I started to think about creating my own spin on the core ideas, and creating my own lewd game in general.
So that's how Free City-States came to be envisioned. The core game concept in my mind is more akin to Crusader Kings and Stellaris than to Caesar and Dwarf Fortress, but focused on the management of a fantasy city-state. I've created a small mock-up in Godot as my first real foray into that game engine so far, and hoping to continue chipping away at it as the concept becomes more fleshed out 😊
Wow, this ended up way longer than I thought it would, and this doesn't even cover all the small ideas and tinkerings I've been working on! Putting it down into words, I guess I really did do a lot between the last post and this one 😅 Hopefully future posts will be a little shorter, but this was a fun way to reflect on the things that I'm working on. I think I'll try to make fortnightly updates if I can, going forward.
0 notes
Text
Just a note, but please don't use "typedef" in C++11 and newer. Instead use "using", so rather than
typedef std::string Employee_ID;
Instead do
using Employee_ID = std::string;
It's more readable and conformant with modern C++ standards and practices. :)
(Nearly) Never use auto in C++!!!
So I used to be amongst the people who thought "Yeah ok, auto hides the type. But if the type is not really important to understand the code, and was really long and confusing then it is worth it"
Like this: std::vector<std::pair<std::string, Employee>> MyFunction(); To turn it into: auto MyFunction();
And I was wrong. Do NOT use auto to hide that monstrosity. You FIX it. auto hides that awful thing and dumps the problem on the next poor fucker who will use it. ( People writing and using metaprogramming libraries are especially prone to doing this, since their typenames can fill entire screens ).
YOU just looked at YOUR code. Found it confusing... And decided... to HIDE it??? What it is the next person who did NOT write this code going to do when they read this going to do???
No. I beg of you. Use typedef.
You can create aliases of anything and make your code easy to read. And this only "hides" the code as much as auto and you can get the types the alias points to by musing over it. So it is auto... but way better. Because it is a UNIQUE name. Which can DESCRIBE things.
Like, with the horror in the previous example. Let us have a typedef in the .hpp file where "MyFunction" is declared. Now it reads MUCH better:
std::vector<std::pair< Employee_ID, Employee>> MyFunction();
I actually understand what the pair is now! Key value pairs! And screw it. Let us typedef the pair too now that we understand it!
std::vector<Employee_KeyValuePair> MyFunction();
And fuck it. Once more! Typedef the vector too!
Employee_Roster MyFunction();
I will bet most of you reading this only realized what the hell that moster was when you got near the end. BECAUSE THE FIRST THING IS FREAKING UNREADABLE! Fix it. Make your code readable. If you feel the urge to use an auto to hide a typename, it is time to typedef that motherfucker!
227 notes
·
View notes
Text
Project Updates - 10/7/23
It seems like every time I make progress on something and put it out there for people to see, my motivation to continue just tanks and I forget to work on it for a while 😅 (Plus day job stress and other general life things working against me too lol) That said! I have been doing a bit of rework on my libtcob tutorials following some good feedback from the r/roguelikedev Sharing Saturday thread I posted in a few months ago. I worked on getting the project to build using vcpkg on Linux and Windows, which actually wasn't too difficult to get set up. Originally I wanted to stay away from using package managers and really any other libraries and things besides what was absolutely necessary for getting the tutorials up and running, but my system wasn't exactly the most straightforward either, so I think the vcpkg solution works. I also updated the code to use the newer libtcod system of contexts for rendering, which was also fairly simple to implement. Now I just need to rework the tutorial text, hopefully I can find time to work on that this weekend!
Additionally, I messed around some with Ogre3D the last couple days and got a minimal setup running to evaluate using it for OpenHomeworld. Initially I thought about using a more bare-bones setup and building it out from scratch for a more bespoke engine using something like raylib, but I think getting something running first with a robust and full-featured library like Ogre is probably a better way to go about things. If I can keep the code modular enough, I can always go back and start replacing the Ogre code if needed, but I think that Ogre will end up being the main rendering framework that the project will use anyway. No need to reinvent the wheel and all.
Speaking of bespoke systems and raylib, I am tinkering around with a little project that's been in my mind for a little while, a little RPG project based on some mostly obscure JRPGs. At this point I'm not sure if I want to take the time building a full game engine from scratch or if I should learn Godot instead. Maybe I can do a small scale implementation in libtcod even, and then port some of it to Godot. Lots of options here, but mostly still in the basic design stage.
All in all, I have a lot of ideas for things and finally have energy and motivation to try to work on them! :) It's an exciting time, and I hope that I can continue to make updates like these, too!
1 note
·
View note
Text
I'm back
The recent Unity kerfuffle got me thinking about implementing a game engine again and reinvigorated me to work on the libtcod tutorials. Ended up reworking the first tutorial code to use the newer Contexts that libtcod has moved to, and even refactored my second tutorial code as well!
The actual tutorial text will hopefully come later this week sometime, though I did diagnose a weird issue with the CSS I was using on my pages so that it doesn't show a white bar on the side of the code blocks while in dark mode :D
Getting excited to be in C++ programming land working on engine stuff again!
1 note
·
View note
Text
Woo, it's online! Tutorial 1 for the #cpp libtcod #roguelike #programming tutorial series is finally up.
Please check it out if you like, and let me know what you think! It's my first time creating anything like this, so feedback of any kind is appreciated 😊
8 notes
·
View notes
Text
Woo, it's online! Tutorial 1 for the #cpp libtcod #roguelike #programming tutorial series is finally up.
Please check it out if you like, and let me know what you think! It's my first time creating anything like this, so feedback of any kind is appreciated 😊
8 notes
·
View notes
Text
Woo, it's online! Tutorial 1 for the #cpp libtcod #roguelike #programming tutorial series is finally up.
Please check it out if you like, and let me know what you think! It's my first time creating anything like this, so feedback of any kind is appreciated 😊
8 notes
·
View notes
Text
No file extraction just yet, but did do some work to allow both the original Homeworld BigFile format as well as the Classic release format to be opened and loaded.
As a plus, this also confirmed that the Cataclysm/Emergence file format is the same as the original HW release!
1 note
·
View note
Text
Refactored the way that the BigFile is loaded. Now it is using the cereal library to load the table of contents instead of trying to load bytes directly.
Next, extracting the files!
1 note
·
View note
Text
Worked a little on making some documentation for the Homeworld BigFile format, and some refactoring.
I figure that if nothing else comes of it, having a record of the format might be useful to someone :D
0 notes
Text
Did some work last night on loading the Homeworld BigFile format, and realized partway through that the HW Classic format is slightly different from the original format, but they didn't update the file versioning >.< Still got it to load the file table of contents in the end, at least!
Will have to figure out a way to check which format the file is in.
0 notes
Text
Libtcod Tutorials Update
Been a little bit since my last post about the tutorials, so here's an update!
I haven't finished the code for the tutorial 8 yet, instead I've been going back and refactoring some of the older code and consolidating some things.
Besides that, I've been slowly working on doing the writeups for the tutorials themselves, and currently have the basic setup as well as the website hosting the tutorials through Gitlab. Check it out here!
I'm hoping to have more code and writeups soon, definitely want to finish them up for this year so I can start on tutorials for the newer implementation of libtcod! :D
3 notes
·
View notes
Text
Finally have been making more progress with the libtcod tutorials. The last time I worked through the older C++ tutorials I got a little stuck at tutorial 6, and figured I needed to do some more reading on architecture concepts. Now, I have gotten through #7 and am on my way into #8.
This time, I am working off of the Python tutorials that HexDecimal made a couple years ago though, which are better broken out in general so it's a bit easier to work through and convert to C++. Though there are still some architecture and best practices work to be done for modern C++ and general software engineering. I started reading the Gang of Four software engineering book recently, so I did a pass through of the code so far to check through the code architecture to see if there was anything that could be improved, and it felt good to put some of the theory I've read into practice.
At some point I'll still have to write up the actual tutorial part of it so others can actually follow along, but I'm overall a lot happier with how it's all turned out so far!
0 notes
Text
Welp, wanted to get to transforms and get the triforce to spin, but wound up refactoring a ton of the main engine code to be more straightforward, and then got stuck trying and failing to get the scene to render correctly after the window is resized. Will continue at it tomorrow, hopefully!
For a while now I've been looking into the Homeworld 1 source code (namely the HomeworldSDL port), and I've been played around with rewriting it in C++ to make a sort of OpenHomeworld project for fun. Eventually I'd love to be able to make that and then extend it into it's own general game engine, though that's a bit of a lofty goal at this point
3 notes
·
View notes
Text
Learned how to use element buffer objects in the best way possible.
For a while now I've been looking into the Homeworld 1 source code (namely the HomeworldSDL port), and I've been played around with rewriting it in C++ to make a sort of OpenHomeworld project for fun. Eventually I'd love to be able to make that and then extend it into it's own general game engine, though that's a bit of a lofty goal at this point
3 notes
·
View notes