DuskEngine Devlog 3 - Slow December (and January) Edition
December and January were fairly slow when it comes to adding features or improvements to the engine. The few changes that were made were small in effort and size, but they will in time have a large impact.
Upgraded to SDL3
Upgrading from SDL2 to SDL3 was quite quick and straightforward, especially since the devs made it so compile errors give you hints as to what you need to do to migrate the code.
The upgrade was done initially as a peace of mind thing, to ensure access to the latest features and to have compatibility with future platforms.
It turns out, however, that SDL3 has a pen tablet API builtin, and thus I was able to add pen pressure support for terrain painting:
I was looking into what I'd have to do using platform native APIs when I had a random thought: what if SDL3 has something for pen tablets too? And I'm glad I checked because it only took a few lines of code to make it work:
void DuskRawInput::ProcessPenEvent(const SDL_Event& e)
{
if (e.type == SDL_EVENT_PEN_AXIS)
{
if (e.paxis.axis == SDL_PEN_AXIS_PRESSURE)
{
mPenPressure = e.paxis.value;
}
}
}
The code will get more complex as more features get added, but at this point in time, just keeping track of the pressure, and mixing mouse and pen events together, works well enough.
Added FMOD support
I've been curious to try FMOD Studio for a couple of years now and I made the switch from SoLoud to FMOD this month. The switch has large implications when it comes to how audio works in the engine, especially on the gameplay scripting side as it needs to be aware of FMOD Studio events and parameters.
Image: an event I made that provides background sound for an electric lamp. It uses a parameter called MagicalInterference. In-game, when magic stuff is near the light, this parameter value, which ranges from 0.0 to 1.0, is altered to make the sound more intense.

Management of the raw audio files (.ogg, .wav etc.) is now handled by FMOD Studio, which builds bank files out of all raw audio files as well as all the events and parameters that were created in the FMOD project — these bank files are now the actual audio assets as far as DuskEngine is concerned. Besides being used at gameplay time, the editor also reads them to build the list of events and parameters, to provide intellisense in Lua:
-- it generates such code.
-- strings like "event:/ElectricLampBuzzLoop" come from
-- the bank files. When this script gets executed,
-- it automatically queries for the event and param IDs
-- so as to not involve strings when triggering sounds.
ElectricLampBuzzLoop = {
Id = Engine.GetAudioEventId("event:/ElectricLampBuzzLoop"),
Params = {
MagicalInterference = {
Id = Engine.GetAudioEventParamId(
"event:/ElectricLampBuzzLoop",
"MagicalInterference"
),
},
},
}
Scripts can then:
audioSource:PlayEvent(ElectricLampBuzzLoop)
-- and
audioSource:SetActiveEventParam(
ElectricLampBuzzLoop.Params.MagicalInterference,
0.5
)
-- and so on.
I'm excited to see what other cool stuff I'll be able to do on the audio side in the future. With FMOD Studio it does seem like the sky's the limit.
While this is all that's noteworthy on the engine side, there has been a ton of work on the gameplay side, including the implementation of fun activities like fishing and cooking, as well as skills for said activites, with XP and level ups and all the cool things.
It's all (mostly) too placeholder-y to show at the moment, but I'll post more updates soon.
An old preview of the cooking activity can be seen here.
BTW, I uploaded the stove model to OpenGameArt here.
Thanks for reading!