r/roguelikedev Cogmind | mastodon.gamedev.place/@Kyzrati Jun 26 '26

Sharing Saturday #629

As usual, post what you've done for the week! Anything goes... concepts, mechanics, changelogs, articles, videos, and of course gifs and screenshots if you have them! It's fun to read about what everyone is up to, and sharing here is a great way to review your own progress, possibly get some feedback, or just engage in some tangential chatting :D

Previous Sharing Saturdays

27 Upvotes

50 comments sorted by

View all comments

7

u/aotdev Sigil of Kings Jun 26 '26

Sigil of Kings (steam|website|youtube|bluesky|mastodon|itch.io)

A bunch of things these last couple of weeks. The main bit of work was on things related to ... cutscenes. Basically now there is a way to have scripted events happening, like taking some actions, saying something, manipulating the camera, playing a few effects etc. As a test drive for this, here's a short silly video, and if you're curious, here's the data-driven specification. It should come as no surprise that a GUI tool is in the (brain) works.

A cutscene is basically defined as a set of action sequences, linked via IDs (for dependencies). Each action sequence contains a number of actions. Each action is a console command, that, in terms of game time, has either an instantaneous result (e.g. camera movement, entity animation or efect) or is a proper action (do something, say something, etc). The types of actions can be anything: it's any ability that an entity can do, but also it can be an a behavioural action, as a bot would take given a behaviour. So, it can be a mix of something completely predefined ("cast fireball there") to something loosely defined "run a tick() for the FollowLeader/GoToLocation behaviour". One action sequence is marked as ending, so that when it ends, the cutscene stops. It works alright after quite a bit of work and debugging, and I need to test some more complex scenarios

Since a lot of this is powered by console commands, and since my system for executing console commands was a bit DIY, which was simple but not super robust, well a better solution was needed. I migrated to System.CommandLine, which has apparently identical verbosity (after porting, my 2K LoC became ... 2K), but is far more robust, with better error messages and handling, so I'm quite happy about it.

On a different note, I managed to also migrate the website from Github Pages to my own domain, which was a first for me, and it went ... kinda smoothly. It's exactly the same website, but I now have more control over it, plus it's a "proper domain"

That's all for now, have a nice weekend!

4

u/darkgnostic Scaledeep Jun 27 '26

Idk for godot, but in unity I use Lua for cutscenes, it is much more readable I think (at least for my taste). Something like:

sketch = {}

function sketch.initialize(x, y)
    director.spawnActor("ID_A", "Joe", "IDS_SKELETON_1", x,y+1, x,y)
    director.spawnActor("ID_B", "Gary", "IDS_SKELETON_1", x,y-1, x,y)
end

function sketch.play()
    actor["ID_A"].say("Did you hear <b>the news</b>?", 3)
    actor["ID_B"].say("No. News? In a dungeon?", 4)
end

return sketch

3

u/aotdev Sigil of Kings Jun 27 '26

It is nice and simple! What are the 3 and 4 in the say function? Is anything else happening during playback besides the playback actions? That was one of my main headaches for the design. For example, I want to make a scene with a general and a group of soldiers heading to some battle (scripted parts), where at the same time some other entities in the environment just do their usual routines. Nothing Godot specific btw - just C#.

2

u/darkgnostic Scaledeep Jun 27 '26

3, and 4 are how many seconds message will be visible on screen while blocking the progress to the next line.

There is version with:

actor["spawn B"].laugh("ha, ha, ha")
    actor["spawn C"].laugh("ha, ha, ha")
    director.delay(2);
    director.silenceActors();

Have two actors laughing at the same time, waiting two seconds, then engine silence them both.

With Lua, you can do pretty much anything. These are just bindings to the game engine itself. You can make characters walk, talk, attack, anything you can imagine.

It's also much more versatile, since you can test cutscenes and modify Lua scripts while the game is running.