NokiMo
Tinon
Tinon

patreon


Dev Log — July 2025

Hi everyone!

Last month, I managed to finish the Favor system, add audio support to the game, and make huge progress on the new authoring tool and pipeline for the PvE overhaul!

After months of struggling with implementing desires and sexual preferences, which continued to grow in content and complexity beyond what I could've ever imagined, it feels nice to wrap up several features in a single month ❤️

Game Audio

Browsers, unlike game engines such as Unity and Unreal, don't come with audio systems designed with games in mind. Even most game engines come with relatively simple systems that the developer must expand on to suit their needs, and I'd like to take a moment to tell you about common use-cases for game audio that are now supported in Battle Mages.

Master Mixer & Channels

The master mixer is an architecture of nodes and channels that eventually feed into a master channel, before being fed into a speaker or other output device.

Battle Mages uses Web Audio API, which is a relatively new browser-based system that allows developers to create complex architectures using nodes. Many modern browsers and the Steam client fully support this system, but players on older browsers might not be able to play the game with sound on.

Dynamic Compressor

In Battle Mages, and as is often the case, the final node in the mixer has a compressor on it that prevents or mitigates audio clipping. In any audio system, there is a limit on the volume of the output, and when multiple audio sources play simultaneously, their combined volume can exceed the limit, which causes clipping. Clipping is caused by data loss when values above the limit are clamped to the limit, which creates loud and jarring noise. Many people will have experienced this when someone shouts or yells into a microphone. A compressor works by reducing the signal below the limit to reduce or prevent clipping.

Other common nodes are special effect nodes (like a reverb effect) that only affect diegetic sound, and volume nodes for controlling volume separately for music, sound effects, etc.

Music

Battle Mages uses a simple music setup, where the only thing we need to concern ourselves with is that music loops, no two tracks play at the same time, and music is preloaded and unloaded properly.

Music tracks are often large files that can easily be multiple minutes long, so preloading helps with making sure the track is loaded and ready before it has to be played. More important, though, is unloading music that is no longer needed! Many large files add up, and ten tracks alone can easily add up to 30 minutes worth of memory! Battle Mages has the added challenge of being a browser-based game, where the game is often just one tab in a browser with limited resources, instead of having near unlimited access to all resources of the device it is running on, so we have to be particularly mindful of how much accumulated memory storage the game reserves over time.

Ambience

Ambience tracks are long looping tracks similar to music that instead play environmental sounds. Ambience could be chirping birds, running water, rain, wind, and other relevant environmental sounds that bring the location to life.

Ambience pairs best with music when the two have diverging durations. This way, as the music track repeats itself, a different part of the ambience track will play over the same part of the music, creating a more dynamic experience that is less predictable and repetitive.

An ambience track also helps fill in the silence that might occur when a music track is ending and before it plays up again.

As with any Foley sound, ambience is less about being realistic and more about setting the mood. One of the most effective ambience tracks I've experienced in a game used the ambience of an underground cave, which has an eerie rumbling to it from all around you, for a burned-down forest. The ambience helped make the forest feel claustrophobic and encroaching instead of open and deserted.

Sound Effects

The most important thing when it comes to a dynamic soundscape is to mitigate repetitive sounds. We have probably all had the grinding experience of a shopkeeper with a single voice line that gets repeated every time you buy or sell something, or a game with a single footstep that gets repeated over and over again. Surprisingly, having two voice lines that alternate each time you buy something from a vendor is a lot more pleasant and can even become sort of melodic.

When it comes to sound effects in games, ideally, we have multiple groups of sounds that are layered to make up a single sound effect, which is also how it has been implemented in Battle Mages.

For a footstep, one group could be a set of sounds for the surface impact. Depending on the character, another group could be for subtle sounds of leather giving under the movement, or the rustling of metal equipment. Then, for each group, we pick a random sound that is not the most recently played and play them together, so the combination changes each time. With each added track or group, the combinations grow exponentially, and with just 3 groups of 3 sounds each, you will have 27 combinations.

Additionally, we set a pitch and volume range for each group that is also randomized each time the sound effect is played, meaning even the same combination of tracks will sound slightly different!

Voice Over

Though the game won't have voice over any time soon, I imagine, I would love for the game to have voice over in the future, and since I had help from a friend with a full-fledged system in Unity that already had voice over support, we went ahead and added voice over support immediately!

Much like music, in a game like Battle Mages, you want to make sure no two voice lines play at the same time, and as with the earlier example with a shopkeeper, you want to make sure voice over lines triggered by repetitive actions have two lines to alternate between. It could even be the same line recorded with different attenuation.

Since Battle Mages is a browser game, many files, including audio, aren't downloaded until they need to, and that means we need to be particularly careful about preloading voice over. Sometimes, voice lines are played as voice over to a text, and in such a case, we might want to halt displaying the text until the voice over is ready. Otherwise, we risk playing the voice over with a significant delay after the text was displayed, because the audio file had to be downloaded before it could be played.

Reverb

Reverb is useful for simulating the impact a room has on diegetic sound, like an echo in a cave or a large unfurnished hall. I also like to add a subtle reverb to small rooms, where the sound doesn't carry far enough to create an echo, but it makes the sound a bit fuller. This closely simulates the difference between how your voice sounds indoors and outdoors, since outdoors your voice will be carried away by the wind, which makes it sound thinner than it does indoors.

Browser Audio

There are many challenges with browser audio, and I have already mentioned a few. Audio also cannot be played in a browser tab before the user has interacted with the page. This is to protect a user from being blasted by audio from a pop-up and similar intrusive websites. However, it makes it difficult to prepare things like music and ambience on startup, since the player might not have interacted with the page yet. I had to make a particularly robust system that attempts to track music and ambience that didn't play properly, and resume them whenever audio is allowed, because the player interacted with the page.

Audio in browsers is generally very different from what we expect of standalone games, and most players will get incredibly annoyed if a game suddenly starts to play sound in their browser, while they would expect the game to have sound on immediately if played through Steam. For that reason, the game assumes you want sound on when played through the standalone client, but when played through a browser, the game will show a small prompt similar to a hint or when a player is required to select their sexual preferences, where they can select whether they want to enable audio for the game or not.

Authoring Tool

I've been updating the PvE content pipeline to better support long adventures where players have to go from room to room and complete chains of challenges while exploring. While doing so, I have also made major changes to make the game compatible with Twine!

This has been a long time coming, and I'm happy to say that it's now possible to write scenes for Battle Mages using Twine! This is a lot more intuitive than having to write scenes as code in text documents, which was the only way to do it in the past.

Battle Mages won't actually be able to run in Twine, since it has its own unique markup language I call AineScript, which is similar to Twine's SugarCube markup language. I considered creating a modified version of SugarCube for Twine with added support for unique AineScript syntax, but decided against it to save time and because how Twine and Battle Mages play aren't similar enough for it to make sense, regardless.

Battle Mages displays text in dialog boxes that can be continued with the press of a button, with a scene where characters enter and leave, as you've seen; Twine displays whole pages of text that are continued by pressing hyperlinks. The two are distinct enough that it's difficult to properly simulate how a script might run in Battle Mages, inside Twine. However, the Twine editor still provides authors with many useful tools, including a flowchart that gives an overview of how the narrative branches. And most game authors are experienced with Twine, so being able to write for the game inside Twine will be intuitive and familiar.

Branching, in particular, used to be terrible because you'd either have to store multiple passages inside the same text file, or split your scene into multiple text files, neither of which is ideal for writing complex scenes with a lot of branching!

I've worked on writing an exhaustive guide for AineScript, which you can find below. Almost everything in the documentation is fully supported, and soon I'll be moving all my past scenes into Twine before sharing some of them as templates.

https://test.battlemageserotica.com/aine.php

Additionally, I've added useful syntaxes from SugarCube that AineScript didn't used to have to make it easier to use for people familiar with SugarCube, and I've improved the interpreter class that runs the scripts so it's much easier to expand with new macros in the future, and authors now have easier access to player-related properties and functions. Even the data structure has been simplified to make it easier to expand!

I'm really looking forward to having the general structure for PvE adventures mapped out in Twine so I can start sharing templates for expanding adventures with authors and the community!

---

That's it for this month's dev log!

While working on audio for the game, I also managed to fix my streamer setup and improve my speech-to-speech setup! Between juggling work deadlines, working on Battle Mages, and trying to find time for family during the summer, I'm quite pressured for time, but I will try to find time for streaming again soon!

I still need to add sounds for most elements in the game, but I have access to many professional libraries I can use, and the same friend who made the tracks that play while I stream is also helping out with longer dedicated tracks for the game. Players with access to the test server can already hear a few of the tracks from my streams playing inside the game.

With audio implemented in the game, we also have all the features supported we need before the Steam release, so now all I have to focus on is wrapping up the PvE overhaul and making the grind for items more enjoyable.

Thank you so much for all your support, and I hope everyone is excited to see the PvE overhaul finally coming together! ❤️

XOXO,

Tinon


Related Creators