EDITOR’S NOTE: This is part of a series, start here.
Seems like everything about this project is one step forward, two steps back. I was starting to make some progress with my GDNative version, but it just wasn’t making me happy. Godot is a nice engine for doing…something other than what I’m doing. So I’ve decided to ditch not only Godot, but C++ as well in favor of just straight C. While this may seem completely insane, there is a method to this madness.
Because of my frustrations with this project, I’ve actually done a few other things in the interim. One of them was to experiment with writing something that would run on a DOS-based 386 from 25 years ago. I decided to use C and DJGPP. I wrote just about everything I could up from bare metal, just to see how it worked. I wrote code to cram stuff into linear video memory. I wrote code to handle keyboard input from interrupts. Though intended to be a distraction, it was actually a very fruitful exercise, as it gave me the opportunity to rediscover C. I did this with the help of the venerable K&R as well as 21st Century C.
I realized I could do everything I wanted to do in C without constantly feeling like I was doing it wrong in C++. There’s also way less
malloc() and other annoyances than there was the last time I worked with C. I decided to go with mingw64 under Cygwin on Windows 10, but there’s nothing about what I’m doing that wouldn’t compile on any GCC-based compiler on any OS, really. This brings us to the other reason I chose to go as minimalist as possible with C, and that’s that I don’t want to rule out a DOS port of this thing in the future. While I’m planning to use SDL for graphics, I’m going to abstract it in such a way that it should be reasonably easy to hook up some other means of rendering.
So where does that leave the existing codebase? Well, most of the math I worked out is still totally usable, and porting my deterministic hasher code actually involved deleting a bunch of code. I’m starting over on the UI, but that’s okay, I hated the UI I had. I constantly felt like I was trying to overcome Godot’s very nice GUI facilities to make them look like something from a long time ago. Now, I’ll end up doing something that looks the way I want it to from the outset, and is probably not a whole lot different from how I imagine the imaginary people who would have written the fictional code for this ship’s computer.
I’ve also decided to take a different approach to development, in that my first order of business is to get more or less all of the mechanics of this thing working without any GUI at all. I’m going to accomplish this by writing the libraries with extensive unit tests that both ensure things work correctly and document their use. I did write the tiniest little CLI wrapper that lets me experiment with things and dump the output, but that’s it. There are, of course, places where it’s impractical to determine the veracity of data just by looking at text. One such example is the code that procedurally figures out where stars go in the galaxy. For this I use gnuplot, which involves nothing more than dumping my data to a file in gnuplot’s trivial coordinate format.
I’ve decided to use some of the facilities in GLib, particularly for things like dynamic arrays. I may or may not use GObject, that might be overkill for what I want to do.
So now we’re over a year in, and I’m still getting started. Hooray for me.← Xoth Devlog Pt. 8 Xoth Devlog Pt. 10 →