Greetings! Here comes a guest post from me, Teddy, since this update relates basically only to the technical side of the game!
Let’s begin with a screenshot from the game. I hear screenshots are popular here on TikTok!
Wow! What a screenshot!
So that’s some very rudimentary stuff going on in bona fide split-screen local co-op. It mostly works! And by mostly, I mean barely.
We at first actually wanted shared-screen co-op (like Secret of Mana), but we quickly realized we had way too many mechanics that made almost zero sense like that (Phase Shifting), and some mechanics that made exactly zero sense like that (Twilight Shift). So, uh, we’re doing it split screen!
Like the people know who’ve rummaged around in my code (an activity only slightly more pleasant and nearly as unsafe as rummaging through a landfill), the game is an architectural wonder. Kind of like the leaning tower of Pisa! Or the sprawling favelas of Rio!
I don’t obfuscate my code (for non-coders: obfuscating code means using tools that will turn the code into gibberish, making it nearly unreadable after a decompilation). I’m proud to say that the code base of Secrets of Grindea is the only code in the world which would actually be easier to read if it was obfuscated!
Alright, enough of my patented humor! It’s Halloween, not Ha-ha-ween!
Seriously though, while Grindea’s code strangely enough hasn’t been a problem in the development of the game, it is very McGyver, and “if it works it works”. We haven’t really been hampered by it since I’m the only programmer on the project, and most of the Clean Code-things are aimed at teams where it’s important that everyone writes somewhat sane code since they’re all going to interact with each others’ stuff. That is, until now!
While the game obviously is made to be played in multiplayer already, it functions with a very strong assumption that there will only be one player per machine. Thus, here are the systems that are currently functionally singletons:
PlayerInput
Dialogue
UI Rendering
Menus
Other menus
More menus
Lighting
Sound
The camera
Same-zone teleporting
The local player itself
And all that delicious pasta will now have to be separated and remade into proper tortellini! So far, player input, dialogue, cameras, HUD, zoning and the ingame menu work in local co-op mode. Some are fully functional, and others work with caveats!
It’s an interesting task though, to be sure! But it’s also a bit scary, because for the first time of the development, I actually feel like there might be a point where it turns out it doesn’t work as well as we want it to. Or, that some change has worsened the “normal” playing of the game in some unacceptable way. Perhaps in some way that we can’t reasonably fix, causing us to not be able to release the local co-op (or release it on a permanently separate branch).
Now, apart from the local co-op, there’s something else going on in that screenshot, which is impossible to see visually!
And that is that the game is now running with FNA instead of XNA!
XNA was an experiment by Microsoft, that got initiated in the late 1980s, and discontinued a few years later. In 2010, I met a guy in an alley who had secured a floppy disk (8-inch) with the last release they ever made, XNA 4.0.
Now, people who’ve been in the game long or know their way around code knows that XNA was the bee’s knees there for a while. Truly revolutionary stuff. Creme de la creme, as it were.
And here I was, with a fresh install.
Anyway, since it got discontinued around 2013, and tapered down much earlier, the last Visual Studio version that actually worked well with it was Visual Studio 2010. You could hammer it into later versions as well, but there were a lot of issues and both the IDE itself and build time was slower. It was so crazy, that when my Windows 7 computer started to wheeze and cough, it turned out it was literally more efficient for me to emulate my old Windows 7 machine from Windows 10, than to try to cram XNA into Visual Studio 2017 and the likes. Yes, I benchmarked this. I will say though that OS emulation is insanely good, so maybe it isn’t that crazy.
Here is a screenshot of the start of my workdays for the past 7 years or so:
Ah, good old VMWare! And look at that toxic productivity LinkedIn-fodder background I’m sporting! Living the dream!
But anyway, even emulated Windows 7 is starting to be eaten up by the Langoliers now, and almost every program in existence constantly reminds you about the security risk you’re exposing yourself to, and how they’re going to end support any day now! I’m happy to report though that not a single service I used actually ended their support, but with Visual Studio 2022 (and Visual Studio Code) actually being pretty good, and FNA being a necessary step anyway if we want to port the game to consoles – which local co-op is a stepping stone towards (fingers crossed) – I felt that the time had finally come!
FNA works well, but there are certainly some unexpected differences. For one, my preloading system was, uh, quite naïve. It just ran in the background when it felt like it, and loaded whatever was coming on up. It… works, but sometimes everything wasn’t preloaded in time – which meant that the main thread also needed to load something. And in XNA, when two threads (in this case a background thread and the main thread) tries to load content for the game at the same time, one of them will simply interrupt the other, which leads to gibberish for one or both of the textures. Some of you might’ve seen corrupted textures in the game at some point (people with slow machines more than others). That’s the reason for it!
In FNA, though, this doesn’t lead to the occasional buggy texture, it crashes. So a lot of my time (and the time of our new intern, Charles G.P. Thomàs-Coudex, who if he’s going to replace me can at least show me the decency of acting as my intern for a year or two before the singularity hits) has been spent making a more robust background loading system. Unfortunately it’s a bit less performant (going full yolo tends to be efficient), but it’s passable and I think I’ll be able to tweak it into being more than fine!
So. Uh. I don’t really know where I’m going with this. It’s fun but a lot of work, I guess! And that’s pretty much that, I think!
Happy Halloween, everybody!







































