Friedrich Hanisch's Dev Log

Homepage
Projects
Dev Log
All
2025
2024
2023
2022
2021
2020

2025-03-17

DONE

  • I couldn't do much game dev the last few days, but I still managed to add a small feature to Mops & Mobs, at least rudimentarily. By adding a new DummyTrait that lets the level designer define a map point. This map point displays a text, usually a room's name, inside the backend map - depending on the mode by just walking into it or by calling discover_map_point() in a script. This is a little QoL change I wanted to add for a long time. Of course, I should concentrate on the combat cards instead ... The plan is to have a version with three or four fights ready that can be tested at a local game festival (Lange Nacht der Computerspiele) in a few weeks.

2025-03-11

DONE

  • Gompl has the keyword interrupt now for stopping the script's execution and also allows defining a maximum amount of instructions being called. After the interruption, the script can be continued by providing a "state" Dictionary. This way it's easy to make some kind of fantasy console, I hope. I also added a register_func() method that allows registering Callables, as an alternative or extension to providing Gompl with a Godot object target. As the latter's methods are called directly, they would behave badly when the user calls a function in the wrong way, with no way for me to catch the error unfortunately. So with registering methods the responsibility lies with the programmer, not the scripter, to define the methods correctly.
    https://bsky.app/profile/ratrogue.bsky.social/post/3lk27f5fank2n

2025-03-09

DONE

  • Godot 4.4 is out and I virtually instantly ported Mops & Mobs. Almost no changes were necessary, which is great. And the new typed dictionaries already improved the code, although less so than I hoped - as you can't nest types (so something like var d: Dictionary[String, Array[int]] is not possible).
  • One of my goals with Gompl is to make it almost as usable as the SmallBasic interpreter for Unity, and one of the major things missing (at least for me) was being able to interrupt the execution of Gompl code. Because otherwise a user of a hypothetical coding game could just create an endless loop and freeze the game. So I finally, after quite some think work, I took the direct evaluation code out that would be called on the nested Expr nodes of the AST, and instead let them create a simple array of instructions, basically "compiling" the script. This array can then be used in the new run() method of Gompl. This is the first step, the second step is of course adding logic to stop the execution after, for example, 1000 steps and afterwards let the user continue for another 1000 steps, rinse and repeat.
    https://github.com/ratkingsminion/gompl

2025-03-02

DONE

  • With Godot 4.4 around the corner, I finally upgraded my highlighting shader to Godot 4.3. Better late than never I guess. One problem arises when someone uses a World Environment in the scene with, for example, Glow activated, the the shader stops working. The solution is to give the viewport of the highlight effect its own Environment.
    https://github.com/ratkingsminion/godot-base-code/tree/main/rat_king/highlight_effect
  • Gompl now uses undefined instead of null. This added some problems, but overall I like it better this way. I also added stop and skip, which normal languages call break and continue. They're one of the reasons I added undefined, because code like this:
    x = if 1 == 2 then "foo" end
    // or:
    x = while true do
      100
      stop // evaluates to undefined
    end
    
    ...leaves x as an undefined value in both cases, and I wanted to be able to test for this in Gompl code. Last but not least I added a function that would get you the generated AST so it can be cached. A tiny bit of optimization I guess.
    https://github.com/ratkingsminion/gompl

2025-02-26

DONE

  • I changed the icons on the homepage of this website from Font Awesome to some pixelart. Not sure I like them, it was hard enough to think of some symbols, but it's better to have less dependencies anyway.

2025-02-25

DONE

  • I updated Gimpl, renaming it to Gompl (I really don't care about the name, which might be obvious by the latter choice, but someone told me not to use "gimp"). I replaced the parser based on combinators, as learned in the tutorial by Jay Conrod, and replaced it with a parser using recursive descent parsing. This is described in "Crafting Interpreters", and only now, after doing the first version of Gompl, I could understand it well enough to apply the knowledge. I also read the material from the TinyCompiler, but it didn't really help. In any case, Gompl ditches the ; for separating expression lists, which I like a lot. There might be (severe) bugs, so using it in Mops & Mobs further will be a good test.
    https://github.com/ratkingsminion/gompl/
    https://craftinginterpreters.com/parsing-expressions.html
    https://ssloy.github.io/tinycompiler/
  • I improved the gamepad handling in Mops & Mobs a bit and also gave the combat cards a shader that would give them a shadow and an outline. For that I just took TabMK's shadow shader and extended it with things I needed. I never thought of just increasing the size of the Sprite2D by scaling the vertices in the vertex shader, allowing the shadows to be much bigger this way. Somehow I find it genius, even if it's a bit crude. It's increasing overdraw, but I don't think that will be a problem for us, at least not in this case.
    https://github.com/TABmk/godot-2d-shadow-shader
  • I'm still working on sustAIn now and then together with LaraKaa, not necessarily because I think it's a great game, but mostly because it's fun. Somehow Godot makes it a joy to extend a jam game even after a while.

2025-02-19

DONE

  • Connected received a very small update, which adds the option to save the dialog JSON files with tabs instead of spaces. It was increasingly annoying to me that Godot would resave JSON files inside a project and change all spaces to tabs, as this sometimes resulted in very large commits for the Github repo. So this problem is solved. I also had to remove the BOM bytes in front and add a newline to the end of the JSONs.
    https://ratking.itch.io/connected/devlog/890774/connected-v096
  • And Gimpl now understands negative numbers. Kind of awkward that it couldn't do a simple x = -5 before, but now it works. There are two things I'd like to change - removing the ; separators and fixing bools, so things like true == true work as expected - but somehow I think I should change the whole code for the parser to a hand-written one. For now Gimpl does everything I want for Mops & Mobs, so changes will have to wait.
    https://jayconrod.com/posts/65/how-to-build-a-parser-by-hand

2025-02-18

DONE

  • I added support for strings and function calls (not functions, though) to Gimpl, and also changed everything to expressions. Even though error handling (among other things) is sorely missing, I think Gimpl is now kind of usable in Mops & Mobs; and indeed I already implemented it.
    https://github.com/ratkingsminion/gimpl

2025-02-17

DONE

  • I finished following a tutorial for an interpreter in Python. I used GDScript instead, because I actually wanted to have a simple scripting language that I can use in our own Godot game projects (for Unity I'm quite content with SmallBasic, or just Rosalyn). I didn't find anything yet that suited my needs, so creating "my own" apparently was the way to go. Although I read stuff about interpreters before, I never did quite grok the whole thing, but the tutorial by Jay Conrod helped to finally just do it, and that approach was the most helpful so far. I tried reading "Crafting Interpreters" by Robert Nystrom, and while it's extremely complete, following is a bit of a chore, because the author adds too much fluff to the text, in my opinion. I think the lack of verbosity of Jay Conrod helped me much more with concentrating and understanding. On the other hand, IMP is very simplistic, and before I can actually use it for our projects I have to try adding some features, especially functions. Nonetheless I uploaded Gimpl on Github.
    https://jayconrod.com/posts/37/a-simple-interpreter-from-scratch-in-python-part-1
    https://github.com/ratkingsminion/gimpl

2025-02-14

SEEN

  • I was always a bit annoyed by Godot's lack of Unity's Instantiate() functionality that would let me duplicate an in-scene GameObject without any problems. Godot has duplicate(), but it definitely doesn't have the same versatility and produces unexpected problems. I also got word that duplicate() shouldn't be used for this anyway. Instead I would create little scenes inside the project with the nodes that have to be duplicated and I would reference them as PackedScenes. Only now I found out it's possible to create such PackedScenes during runtime, and thus I can recreate Instantiate() like this:
    var scene := PackedScene.new()
    for c: Node in proto_node.find_children("*"):
      c.owner = proto_node
    scene.pack(proto_node)
    proto_node.queue_free()
    
    I messed around with this before, but I never understood that all the node's children need their owner property set to the node. I'm still not sure what the benefit of the owner property actually is, but at least it works now.

DONE

  • I did some more stuff for sustAIn, small QOL changes only, but there's still no release of the full version in sight. I guess creating a story-based adventure game, even with no additional gameplay, is always harder to make than first anticipated.
  • The same with Mops & Mobs. I worked on small things that felt necessary, like a sanity check for the decoration mode (so that the player doesn't spawn into a barrel) and feedback messages when placing decorations, bug fixes for the savegames, moving the controls to the settings screen, adding titles and descriptions to quest lines... But without significant progress on the story I don't feel like uploading a new demo version. The differences are just too small, even if they're numerous.

2025-02-03

DONE

  • I participated in this year's game jam of the bpb, and as always it was great! This time I didn't work together with Jana, as it's pretty much impossible for now that we both attend such an event at the same time (because of the baby, of course). Instead I did the programming for Lara Keilbart's game idea: you're feeding a blank AI the knowledge of a small community so it will actually be a useful tool in the end. Cozy AI was the working title, but most people somehow incorporated "AI" into the title we also went with sustAIn. I provided the setting - the community are actually survivors of a generation spaceship that crash-landed on an alien planet - and of course my 'vast' Godot knowledge. Matthias Bunzel, the third team member, mostly worked on the dialogs, and for that he had to write formatted text files for the system that I created for the jam. In hindsight it probably would have been faster to use an existing dialog editor for Godot, but somehow I was interested in parsing textfiles that allow if-then logic. It was a bit more involved than I anticipated, so it took a big chunk of the time to create this, but I'm glad I tried it out. In any case the game isn't finished, we barely could make the first scene, but the systems are there and can be extended easly, if Lara and Matthias are willing. I also did some additional work already by adding the possibility to have both English and German in the game. Oh, and all the other entries were awesome too.
    https://larakaa.itch.io/sustain-a-solarpunk-adventure

2025-01-29

SEEN

DONE

  • Mops & Mobs feels more complete again, as I added an option to change the language of the game. Of course, for now it's only German as second language. Apart from the dialogs, where the translation will take a bit longer, there's also the job description at the beginning of the first level, which is a texture and not localized yet. Jana hopefully will change it to something using Godot's UI system, so that it will be easier to translate it via the CSVs.

2025-01-26

DONE

  • The new inventory UI in Mops & Mobs for the combat cards proved to be useful for preparing the combat too, and also the removal of exceeding cards from the backpack afterwards. This didn't need much additional code, which makes me happy, but of course it just means I missed some detail that will increase the complexity anyway. But for now, the combat system feels complete, and we can finally work on some "real" fights, as real as a card game can be, in the near future.

2025-01-24

PLAN

  • In light of the current events (Twixxer's boss Musk more and more open about being a nazi), I'll have to remove/replace all the links to Twitter on this dev log some day.

DONE

  • I added an inventory UI screen for the combat cards in Mops & Mobs. After much thinking about the approach, we decided that a single overview of all cards in the player's backpack in a grid would be enough. The first cards, marked with an outline, are inside the deck, which is used for the next fight. Clicking on a card moves it to the first slot, so it will definitely be part of the combat deck too (and the last one gets removed). We hope the minimalism of this approach is appreciated, but it might be that some people want more control. Overall we try to not overengineer the combat in Mops & Mobs just so it doesn't get more important than the rest of the game mechanics. Wish us luck.

2025-01-16

SEEN

  • Some gameplay of Behind Stars and Under Hills can be seen in the series "Deutscher" on the German broadcast ZDF (3rd episode, 25:02)! I totally forgot about this - back in 2019 a TV production company asked us if they could use a video of one of our games.
    https://mstdn.io/@ratking/113839883289963346

2025-01-14

SEEN

  • I just learned that Mark Sibly, creator of several easy to use game development languages/tools, has passed away last month. I really enjoyed Blitz3D back in the day and even bought Monkey and tried to make some small games with it. It was always cool to be able to use BASIC in combination with versatile graphics engines. In any case it's nice to read so many testimonials of Sibly's influence on game developers' careers.
    https://notices.nzherald.co.nz/nz/obituaries/nzherald-nz/name/mark-sibly-obituary?id=57014447

DONE

  • My brother released the intro video that I made for his art exhibition.
    https://www.youtube.com/watch?v=fygmO6KNcDk
  • It was a bit more complicated than I anticipated, but now a dialog can branch differently in Mops & Mobs depending on the outcome of a fight. The problem was, of course, that there was no result until the player did the fight, but the dialog nodes would advance until the next "stopping node" (Text or Choice). So any Condition node would be evaluated too early. I added a "pause" functionality that is called as soon as a Script node notices that the current game state isn't the dialog mode anymore. This works well enough, but in the future I might create a dedicated Combat node for dialogs in order to combine the Script and the Condition.

2025-01-10

DONE

  • While the player is walking through the dungeons of Mops & Mobs they're triggering different actions with each step, like a dialog starts or music changes. This happens via Dummy nodes. If the game were more physics-based I'd use Area3Ds, but I found it more logical to just use points at distinct positions; might be a decision born out of overthinking, but it's what we use now. Over the months the Dummy script received more and more functionality - not only do the dummies start dialogs or change music, they can also change the whole ambience, teleport the player to another dummy or level, and so on. But while the code doesn't have to be beautiful, I still thought having so many optional parameters makes the dummies unneccessary bulky, and creating different types of Dummy scripts that handle each case individually isn't as easy as in Unity with its MonoBehaviour component system. After some thinking I decided to use Godot's resource system. Each dummy now has an array of "traits", and every trait is inheriting a DummyTrait which is a Resource script. This means seldom used dummy functionalities like is_player_start don't pollute all dummies, which I like. I also added the posibility to create custom scripts, like they're used in dialogs already. I don't really use a scripting language currently for the game, but if the need arises it should be easy to parse some simple if-then-else constructs.

2025-01-04

SEEN

DONE

  • Currently I'm not really working on anything worth mentioning (unfortunately), but I'm preparing a video for my brother's art exhibition. The exhibition is called BACKROOM, so of course it's just a fly-through in a labyrinthine backroom, with the typical wallpaper and carpet floor. I use bloed to create the level along a simple path. Dreamteck's spline tool is a bit overpowered for the camera path, but at least I don't have to make my own bezier curves. Annoyingly there was a bug that would only appear in the standalone build and not in the editor (the position change of the spline during Start() wouldn't be recognized by the path follower anymore).