Can you believe it, it's already the end of the year! 'tis the season when cars are even more of a public menace than usual, and just about everyone you know has an opinion on the game of the year. Of course, I'm above all of that. Besides, it's obviously AI: The Somnium Files - nirvanA Initiative.
Ah, but where was I? Ah, right. Now that it's been two months since the last update, it's already time to track Mirama's progress with a new dev blog!
My momentum on Mirama's had ups and downs in the past two months. My day job has been more intense, which had a ripple effect on the energy I had left for game development...
These holiday vacations are going to be welcome, is what I'm trying to say!
Still, we have worthwhile topics on the menu today! Especially the main dish: a puzzle mechanic that has helped me figure out where to go with Chapter 1's level design.
That darn puzzle mechanic
Stages risked being repetitive if they only featured bullet dodging for the entire playthrough. Sticking to a single mechanical loop made sense for a small game like the original Miracles and Magic. Stretching that to over 5 hours is a harder sell!
So, in typical dungeon exploration fashion, I wanted to incorporate a tasteful amount of puzzles into the game. But figuring out what these puzzles would be like took some effort.
To give myself some structure, I wanted puzzles in Mirama to follow these principles:
- There should be no randomness. Once you know the solution, you can re-apply it to future playthroughs -- plus you never need to reset a stage to get the RNG you want.
- Clearing a puzzle should be quick. They need to have a good flow when the player knows how to solve them.
- These sections should not pull an average player away from bullet dodging for more than 5 minutes, even on a first playthrough.
Why these three in particular? Well, the goal is to end up with a game that's replayable, both casually and by players who want to beat their best times. These puzzles should not stand in the way of that.
Having this structure written down made a huge difference when brainstorming ideas! Without further ado, say hello to Costagona's mystical wooden logs!

These are used in movement-based puzzles. By pressing one of their sides you're locked into movement in that direction until the log you stand on hits a solid object. It neatly fills the criteria I've set out above -- the initial layout remains the same from playthrough to playthrough, so it's possible to learn their solution. And because the regular control scheme is used, it shouldn't feel like a hassle to go through these sections when replaying the stage.
That's the hope, at least!

It took a little while to get these in a satisfying state. This was the first time I'd added a moving platform that would also move the player along with it, after all, and that led to some... interesting discoveries. Turns out, it's very easy to get the player to clip out of bounds when you tie their position to a moving object!
Everything also just looked wrong before I synchronized the subpixel position of the player with the log they're standing on. They used to move to different pixels at different times, and that is off-putting.

But now these problems are fixed, and I think there's something here! Hope you enjoy!
Cutscenes
These have been pretty tricky to get working! The original Miracles and Magic didn't feature cutscenes, just a handful of static dialogue boxes that could be shown either when walking into a sign, or when triggering a boss fight.
In Mirama, I've gone with a similar approach so far by tying cutscene logic to dialogue entries -- I can use an empty text field with auto-playback if I just want to play animations, for example. So right now, I'm cooking up an entry structured like this for every text box and/or event:
string Text
string Speaker
string Sprite
bool IsMainCharacter
bool Unskippable
TimeSpan TimeUntilAutoPlay
DialogueFont Font
Color TextColor
Action Callback
The Callback is where the magic happens when I want to play animations on-screen. It's not particularly elegant, but it's working out fine!
In action, it can look like this!

Other odds and ends
Apparently, Mirama has always crashed on startup with some system languages?

You know the thing that happened with the Brilliant Diamond/Shining Pearl calculator where it didn't work on Switches set up to use "," to represent decimal numbers? Well, my map loader also suffered from that. Whoops!
Good thing I randomly happened to switch my PC to French. 
Preliminary design for chapter 2
Chapters 2 and 3 are the ones that I'm most excited to get cracking on. So naturally, getting to start on these has been a blast! But I won't let myself go beyond sketches and internal documents until I wrap up Costagona.
In a way, that's a nice way to motivate myself to get things moving!
If everything goes well, in the next update I'll talk a little about Siçikiaak, the WORLD PILLAR of PROSPERITY, and what it will have in store for our heroes.
In the meantime, how about a tease, with this first look at a new NPC, courtesy of ocatg?

I wonder what her deal is!
fmod integration
Until now I've been relying on Monogame's built-in audio playback features, but Saria pointed me in the direction of fmod and it looks super cool! Even before using any of its advanced features, I already know it will be a boon to equalize sound levels among other things. Exciting!
Didn't take too long to integrate its API into the game either. 
Time to wrap up!
Figuring out the puzzle mechanic has been the breakthrough I'd been looking for. Until then, trying to come up with a satisfying layout for Costagona was a fool's errand. Now I've got good hopes that, by the end of January, I'll have something playable from A to Z. That'll be a pretty meaningful milestone in and of itself!
I might just even share a playable build on cohost when the next dev blog comes around. Let me know if that sounds like something that interests you!

Okay, that's all the time I got! Happy holidays everyone!!
Previous dev blogs:
#1: October 2022
