Starshatter: The Open Source Project
Dev Update - April 2022
Published on 2022-04-08 20:13:00+02:00
Around two months have passed since last development update for my for of Starshatter source. In this time I had a
few activity spikes and got some work done. Sad news I'm still at the stage of breaking things rather than implementing
novel things in the game. This theme will keep up until I will feel comfortable with the project structure enough to
add new things to the pile.
Let's get over highlights!
One of the first things I did when I started working on Starshatter was switching to CMake and then MinGW. I left
pieces of MSVC configuration in CMake files and I never actually tested them. Reason was very simple - I have only
Linux and Unix machines at home. That changed and of course first thing I did was setting up build environment there.
I'm not consistent with builds with MSVC - my main focus is still MinGW - still, at least now I have confidence that
CMake configuration works and that the description in readme is valid. But there's one more thing coming from me having
Magic Editor Builds
Yup, the main obstacle in building Magic in MinGW was the fact that it is using AFX. MSVC environment enabled me to
try building it, fix some mistakes in CMake, do some clean-ups, and here we are.
Headless Server Separated from Game Executable
Until now Starshatter.exe (or Stars45.exe) supported
-server CLI option that launched
game in a dedicated server mode with a small window. It used WinApi to exist and I just couldn't tolerate that. It had
to be purged. In its place I added new executable Starserver.exe that operates in console mode. I pretty much
kept removing and cutting the class that implemented the server until I got rid off most of the unwanted parts. After
that I shuffled some interface methods around and this allowed me to cut the structure of the project creating a new
library called StarsEx containing most of the logic and two modules producing own executables:
Starshatter and Starserver.
The plan for now is to keep cutting the StarsEx module in order to limit strong relationships within it,
which in turn will enable me to create new smaller modules that will focus on certain functionality like the current
NetEx. I designated a milestone in this effort which I call "a headless server," which is basically the
Starserver.exe but it doesn't link directly to DirectX or WinApi libraries. Meaning I should be able to build it
on Linux host.
Overall Modernization and Other Useless Refactoring
At all time I keep in mind increasing overall code quality in light of modern C++ standards. I keep moving towards
C++17 and standardized interfaces (e.g., POSIX). This effort includes the shuffles I mentioned above, but other than
the server split there are two more highlights in here: both NetEx and FoundationEx build under Linux
For best description of structure changes see the repository. Even
better, check the log - I sometimes write more detailed explanations of why I do certain things, especially when I
think it might not be clear in future or if there are many good options.
This happened some time ago, but I sit down and created a website for the project. You can see it
here. It includes downloadable pre-built executables of the game.
What's Next? And Some Loose Ideas
My main focus remains on getting building Starshatter fully on Linux. I want to accomplish it by first getting a
completely headless dedicated server working. The intent is that it will imply a good enough separation of rendering
and controls from simulation and overall game logics.
Other than that, I started thinking about some fun stuff. First being Opentrack/Freetrack support for virtual
cockpit. Second being hosting multiplayer games each few weeks or so. Last being starting a Discord server, mostly to
support these multiplayer sessions. I'm still waiting and grokking these ideas. I'll keep you updated.