Posted September 03, 2022 by PatchMixolydic
#progress report
Hello everyone! It's been two months since the last progress report, so let's hop right in and see what progress has been made! Note that the updates listed here have not been released yet.
That's almost nothing!! Granted, I have a good excuse. Okay, a mediocre excuse. I spent most of July frantically trying to polish my entry for the fourth Touhou Pride Game Jam, which I eventually had to give up on. Fortunately, this meant that I could finally start working on Devil's Emergence once more!
... but for having a whole month to work, that seems like a rather paltry changelog. Did I give in to laziness? Of course not. ... Erm, not entirely... okay, maybe a little, but in my defense, sleep schedules are another one of my myriad nemeses. But I have been hard at work on this game! Just not directly. Specifically, I've been tackling something that's been preventing me from creating the game's stages.
In the spirit of overengineering everything trying to make the game's executable unreasonably small learning and having fun, I'm using a scripting language to direct enemy movement in each of stages. I wanted to make writing stages as easy on myself as possible, so I set off to crates.io in search of a comfortable language using the following criteria:
Result
is either Ok
, which has a number, or an Error
, which has a message")Unfortunately, I didn't come across any languages that met these requirements. To this day, the only language I know of that comes close (aside from the one I chose) is Mun, but I don't think they have any sort of coroutines yet. I tried using Lua, but I really couldn't shake the discomfort I felt about its dynamic type system. So instead of giving up and writing the stages in-engine as a sane person might do, I rolled up my sleeves and started writing my own scripting language, Laria.
Laria is heavily based on the design of the Rust programming language, but it aims to be a bit simpler to read and write. It's still a very early work in progress, but as of March 2022, I was able to use it to implement Meiling's stage for the one-stage demo. However, due to its early state, I had to work around several limitations, such as the lack of structs and the lack of coroutines, leading to an abundance of messy code. Because of this, I resolved to try and get Laria into a more usable state before returning to work on Devil's Emergence. Here's what I've managed to do so far:
!
became never
; this is the empty type, which has no values. I might end up renaming it again later)x += y
, which sets x
to the result of x + y
)foo.do_something()
(where foo
is an instance of a struct and do_something
is the method)With all this done, I'm more or less ready to resume work on Devil's Emergence! There's one more feature I'd like to implement at some point before the game goes gold (separating code into different files), but I think I can live with the current situation for now. It's definitely an improvement over what I had to work with in March!
Before:
// Very long, very repetitive. Just in case you missed it, this acts on a `bullet_handle`.
// This is fairly tame, but can get much worse for more complex attacks.
bullet_handle_with_aim_angle(bullet_handle, -left_angle);
bullet_handle_fire(bullet_handle);
bullet_handle_with_aim_angle(bullet_handle, -right_angle);
bullet_handle_fire(bullet_handle);
After:
// Short!
bullet_handle.with_aim_angle(-left_angle).fire();
bullet_handle.with_aim_angle(-right_angle).fire();
Given that and the fact that I'm back at university now, I'm hoping that work on the game will ramp up shortly! Please watch warmly until it is ready~
Until then, thank you for reading! See you next time!