Friedrich Hanisch's Dev Log
DONE
- My dialog editor connected is now version 0.9.0 - I mostly wanted to reintroduce configuration files, this time optional. A config file can be added via the command line, and overwrite all the used paths. This became necessary as we're now working on a small side project, and it would be a hassle to change all the paths every time I use connected for something else. (Would be nice.) Also the Script node is now much more powerful, because I'd like to have "nested" dialogs again, i.e. dialog nodes that load other dialog files, and then continue when that's done - and I didn't want to introduce a new node type for that, at least not by default.
https://ratking.itch.io/connected/devlog/645881/connected-v090
SEEN
- Resources for Godot add-ons.
https://godotengine.org/asset-library (Official)
https://github.com/godotengine/awesome-godot (mostly 3.x right now)
https://github.com/search?q=godot%2Baddon
https://itch.io/search?q=godot%2Baddon
https://godotshaders.com
- Yet another talk from the GodotCon 2023, about tooling and plugins. Seems to be easy to get into tools programming for Godot, but prone to crashes and bugs. Some things I got from the talk:
https://www.youtube.com/watch?v=4PSL-g1NYeE
- Via
OS.has_feature("flag"
you can check different things, like editor, debug and release - wish it had a preprocessor instead though, but GDScripts are not directly compiled, so the code wouldn't get removed anyway
- Via
_get_configuration_warning() -> String
/ update_configuration_warning()
you can tell @tools scripts to show a warning, for example if something's missing
- Via
_get_property_list() -> Array
it's possible to export variables in a cooler way, providing your own property list and notify when this list changed; I didn't quite get it, but it seems like it would allow for dynamic inspectors like with Odin for Unity
- Any scene this is derived from the
Control
node (and is removed in _exit_tree()
!) can be added to
- main screen:
get_editor_interface().get_editor_main_screen().add_child(<inst>)
- bottom panel:
add_control_to_bottom_panel(<inst>, <title>)
- dock:
add_control_to_dock(<dock>, <inst>)
- container:
add_control_to_container(<container>, <inst>)
- Inspector plugins can create custom widgets in the inspector
- To automate Godot related things without starting up Godot, you can use the command line interface (CLI):
–export-release/–export-debug <preset> <path>
–debug-server <uri> - start a debug server
–script <script> - run a script standalone
SEEN
- I'm watching Godot videos from time to time, as I want to dive in deeper and get really comfortable with this engine. This talk about viewports was very interesting indeed.
https://www.youtube.com/watch?v=cwZGq1qJYoQ
DONE
- After finding out about a simple method to pack the 32 bit depth value of a viewport in Godot into the 24 bit albedo output, I finally could do the selective outline/highlighting shader that I was aiming for. It does need Godot 4.2 though.
https://mstdn.io/@ratking/111472503848823339
DONE
- I gave up trying to get a depth map from a viewport in Godot 4 - I posted my findings on Mastodon. Biggest problem is that rendering the
depth_texture
to a normal texture is resulting in a major loss in precision; even with the upcoming Godot 4.2, where you can activate HDR for viewports, there are at least 8 bit missing. (A solution could be to somehow encode the 32 bit depth value into 2 16/24 bit floats, but I haven't found a reliable way yet.)
https://mstdn.io/@ratking/111438802280426776
DONE
- For our current prototype game in Godot I ported my connected glue code to GDScript. It was mostly hassle-free, and I also noticed a bug in the C# code, so this activity was doubly useful.
SEEN
- A talk about C# and Swift and Godot, basically. It's by the guy who founded the Mono project, so his knowledge is actually relevant, and he says he wouldn't use C# for game development. I can understand why. Not sure I'd like Swift though.
https://www.youtube.com/watch?v=tzt36EGKEZo
- For Unity I created a simple extension method for
Vector3
s so I can put a vector on the XZ plane by writing flooredVector = myVector.WithY(0f)
- with C# 10 I could now write this as flooredVector = myVector with { y = 0f }
!
- In Godot, instead of using
str()
I can format strings like this: "The %s is %s" % [ "number", 12 ]
- not much of a fan of the syntax though.
DONE
DONE
- I participated in the Auswärtig gespielt game jam. It actually was a "mod jam", but as I already personally predicted nobody really would do a mod for a game - it just adds limitations and complications that are not helpful in a jam, especially if it only goes for approximately one day. I was part of a team of five people, and we made a prototype for a game about cultural migration and merging. We called it Culture Carom. I didn't want to be the programmer this time, but in the end I did most of the UI and gameplay code. It can't be helped I guess. The whole jam experience was quite intense, and unfortunately we didn't win anything (there were 4 winners out of 12), but I wasn't there for the money anyway. (Although in some sense I was there for the money - the whole event was free: travel, food and hotel were all paid for by the taxpayers. Thank you!)
https://www.stiftung-digitale-spielekultur.de/modjam-aussenpolitik-auswaertig-gespielt/
SEEN
- An in-depth article about the performance problems of Cities: Skylines 2. It uses Unity's HDRP and DOTS, and the main problems are non-existent LODding and culling.
https://blog.paavo.me/cities-skylines-2-performance/
- As I'm creating a small simple character model in Blender again, I thought I should watch a bookmarked video full of Blender tips. Some highlights (that I didn't know/remember), below.
https://www.youtube.com/watch?v=JMBMHSca_j0
- F9 brings back the last action manipulation window.
- Repeat the last action with Shift+R.
- When having vertices/edges/faces selected, Shift+G lets me select similar ones.
- When pressing double G to move open edges, one can keep pressing Alt or C once to be able to move the edges even farther.
- When selecting two different faces with Shift and Ctrl pressed, it actually selected a rectangle of faces.
- Shift+B lets me zoom into a self drawn view of the scene.
- With Alt+B, I can clip the model for easier manipulation!
- Alt+Z activates the x-ray mode, so I can select vertices on the back sides. Alternatively, keep Z pressed and move down in the ring menu.
- With the Tool Settings (under View menu) I can get a toolbar that lets me auto merge vertices!
- Ctrl+X is for quick dissolving of verts and edges.
- X → Limited Dissolve removes unnecessary edges and vertices only.
- I forgot you can extrude something to your mouse position by just pressing Ctrl+LMB.
- Alt+S is for shrinking/fattening in a quick way.
- Use Ctrl+F to quickly solidify some faces. Shift+N recalculates the normals.
- Ctrl+F is also good for quick boolean cutting of two mesh parts.
- Press C while cutting (K) a mesh, then the cut goes through all faces, on the back too.
- Under the Object Data tab, activate "Auto Smooth" for the Normals, to get a much better smoothing result.
- Insetting (via I) has a lot of options, just look at the shortcuts bar.
- "Active Element" for the Transform Pivot Point helps with objects not aligned to world axes.
- Shift+R iterates the last action done. Good when having used Shift+D for duplicating and moving an object.
- There's a Boolean quick menu in the add-ons that is deactivated by default. The same with the LoopTools, also a useful add-on.
- Alt+G, Alt+R, Alt+S resets position, rotation and scale.
- I can move the pivot via the "Affect Only Origin" mode in the small Options on the top right.
- There's a menu to change the transform randomly!
- By right clicking on location/rotation/etc. you can copy a transform to another.
- The Quick Favourites menu (Q) is very useful and you can add stuff yourself by right-clicking anything.
- Keep pressing Alt while manipulating numbers etc., and all selected objects will get applied the value, instead of only the active (last selected) one!
- Ctrl+L is powerful for linking stuff from one object to several others, for example modifiers or materials.
- To add hooks to vertices, press Ctrl+H.
- To control the thickness of the Skin modifier in individual vertices, press Ctrl+A.
- Select objects in the hierarchy (Outliner) and press Ctrl+F2 to batch rename them.
- Press M for putting objects into collections quite quickly.
- With Shift+A you can create an instance of a collection!
- If you want to reparent objects inside the Outliner, press Shift while dragging them around.
- In Godot, if there's a corrupted scene, check the dependencies. If there is a circular/cyclic dependency, edit it via a text editor.
PackagedScene
s can be a culprit here.
https://mstdn.io/@ratking/111262317768416374
DONE
- I've done another small prototype in Godot, this time about a roguelite-esque combat system. It's bad, but at least I could define my base code for Godot a bit, adding some kind of component system. No idea if it's good, but I feel I can write GDScript much more comfortably that way.
SEEN
- I've been a fan of Warren Spector for a long time, and reading his article about his 40 year long career (so far!) brought back some fond memories of most of his games. I never played Epic Mickey (too console-y), but his dedication to Immersive Sims is still an inspiration to me. The article left out Underworld Ascendant, which is telling in itself, somewhat.
https://www.gamedeveloper.com/blogs/my-40-years-in-the-game-industry
SEEN
- I followed a small NES programming tutorial (via NESFab). Lots of things are unclear or just alien to me, which is always a bit sad to me, because it clearly shows that the writer doesn't target people who never programmed 8-bit hardware. I wonder if there's an absolute in-depth tutorial somewhere that's also written in an interesting way.
https://pubby.games/nesfab/maze_tutorial.html
https://pubby.games/nesfab/doc.html
SEEN
- To get the screen size in Godot 4:
DisplayServer.window_get_size()
- Viewport size:
get_viewport().get_visible_rect().size
- To get the delta time anywhere, use
get_process_delta_time()
- it's a global method.
- Watched a video about Godot's GUI nodes.
https://www.youtube.com/watch?v=1_OFJLyqlXI
DONE
SEEN
DONE
- After the 2D PacMan prototype in Godot I'm currently combining a Visual Novel with a Dungeon Crawler. This is the prototype of a prototype of course, there isn't anything in terms of gameplay that makes sense, but it's another test for me how far I can get in Godot; also this way I try its 3D capabilities, UI and other things.
SEEN
- I'm wading through Godot's GDScript docs.
https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_basics.html
- It's sad that
signal
s and lambdas can't be static
.
- I still don't quite understand what
StringNames
(&"foo"
) are there for, but apparently they're better for dictionary keys because they're quicker to compare.
elif
exists because of the indentation in GDScript code.
switch
is called match
here.
- Call
breakpoint
if you want a Debug.Break()
.
assert()
s only exist during debug builds.
x ** y
is power.
- Ternary conditions look strange:
"a" if cond else "b"
. If you want to chain them, use brackets.
and
/or
/not
instead of &&
/||
/!
$NodePath
is shorthand for get_node("NodePath")
%UniqueNode
is shorthand for get_node("%UniqueNode")
- doesn't work outside its scene
@export
to show a variable in the Inspector; @export_range
to have an integer in a range
@onready
for being able to use nodes from the beginning (use with care in @tool
scripts!)
- Use
\
for multiple lines
- Arrays use negative indices for counting from the end.
- For large arrays and memory fragmentation concerns, use
Packed*Array
- If to avoid an error when accessing a non-existing property, use
Object.get()
/.set()
- Use
:=
to infer types
- To initialise static variables, use
_static_init()
instead of _init()
. Don't forget about @static_unload
- You can have getters and setters for variables. Using the property name will access the underlying variable!
- Constant objects, arrays and dictionaries are "flat". Enums are shorthand for constants.
a = b = c
is not possible
if "varName" in get_parent(): print("varName is defined in parent")
for i in 3
is short for for i in range(3)
, which is similar to for i in [0, 1, 2]
but without allocating an array
match
can be used on Array
patterns and Dictionary
patterns.
- Extending from a script can also be done like this:
extends "res://path/to/character.gd"
- Use
load()
to load a script and instantiate from it via .new()
.
- If inheritance is not defined, the class will inherit from
RefCounted
.
- Adding
@tool
to your script lets it run inside the editor.
- Use
await
to wait for signal
s, making the method a coroutine
SEEN
- I'm currently a bit depressed because the new version of Unity's navigation mesh package introduced a bug (at least I think it's a bug) where my NPC would get slower when they approach a wall. It seems Obstacle Avoidance is to blame, because when I deactivate it, the NPC walks narrow hallways as they should, but without it of course it will look strange when there are several NPCs following the player.
https://forum.unity.com/threads/my-navagent-seems-to-try-to-avoid-walls.1506281/
DONE
- I got a bit more into Godot for our small prototype (that isn't half as finished as I'd like it to be) which was planned as PacMan-like with guns. In any case, I feel much more confident with Godot and GDScript now, but I also think I will use C# again in the near future. Mostly because there are some tools in it that I miss.
SEEN
- I should write down some of the knowledge I gain from reading A Tour Of C++, just because it's new to me or I forgot about it.
- Initialising a variable via
{ }
instead of =
is preferred because it's type-checked.
constexpr
allows calling a function during runtime, consteval
doesn't. If you use either, the function is not allowed to have side effects.
foreach (var x in v)
from C# is for (auto x : v)
in C++.
- You can do
for (auto& x : v) { x = ... }
&
in a declaration means "reference to".
*
in a declaration means "pointer to".
&
in an expression means "address of".
*
in an expression means "content of".
- Use
nullptr
instead of 0
or NULL
. There is no "null reference", they always reference valid objects.
- Use
import (modules)
instead of #include
if possible.
- Only use
unsigned
for bit manipulations.
- Use
enum class
for strongly typed enumerations, so there is no confusion like with normal enums.
- Don't use "naked unions", maybe
std::variant
instead.
- Use
export module MyClass;
to define a module at the top of a file.
- using namespace can be used very locally. Don't use
using
in a header file.
- Return values can be inferred. Instead of
int Function() { }
you can write:
auto Function() -> int { }
, as it's more logical.
- If a function returns several values via a
struct
, you can use structural binding:
auto [n, v] = read_entry(stream); // return struct with two members
- Use
static_assert()
to check things at compile time.
dynamic_cast<>()
returns nullptr
if the argument isn't of an expected type.
- Use
unique_ptr<>
or shared_ptr<>
instead of naked pointers; they even make destructors superfluous.
- If a method (member function) doesn't change its object's state, declare it
const
.
void foo() const { ... }
- A class with
virtual
functions should have a virtual
destructor.
Use override
to make overriding an obvious and explicit choice.
- Add
= default
to a declaration to force the standard generation of a constructor. Add = delete
to force the compiler to not generate an operation.
- Use
explicit
in order to hinder automatic conversion due to single argument constructors; use it as default choice and only remove it if really needed.
Foo(const Foo& a); // copy constructor
Foo& operator=(const Foo& a); // copy assignment
Foo(Foo&& a); // move constructor
Foo& operator=(Foo&& a); // move assignment
- Use
std::move()
in order to enforce the move assignment (instead of getting a copy).
<=>
is the spaceship operator, working similarly to strcmp()
.
- For a container class
Foo
to support for (auto& iter : foo) { }
give it a begin()
and end()
method (cbegin()
and cend(
for a const
container) that return an iterator.
- Implement
swap()
for sorting algorithms.
- Implement
hash<K>()
for std::unordered_map<K, V>
.
- To automatically have an
std::string
instead of const char*
, add an s
to a string
("Hello World"s). A number with an s
is an std::second
. A number with an i
is imaginary, i.e. of type complex
. Implement your own literals like this:
constexpr foo<bar> operator""x(int arg) { return { ... }; }
SEEN
- So I tried to check out O3DE, which is basically Lumberyard, which is basically Cryengine. It doesn't even start the editor for me. Very unfortunate, as nobody in the Discord could help with the problem. It's not even clear what's happening here.
- I had another look at Evergine too, and I guess I can survive the "no instant play test mode" thing, but I find it really concerning that it doesn't even have a Discord channel or some other form of community. All I found so far is a repo on github where people can post issues. It's a bit alienating.
- Unigine's component system looks good enough for me. Problem with Unigine of course is that it has the same problem as Unity - it's so proprietary that at any point they could change the pricing and without any source code it's yet another thing I would get locked in. Also it only supports Windows, basically.
https://www.youtube.com/watch?v=hHcUYQUlG00
- Reading "A Tour Of C++" by Bjarne Stroustrup currently, as maybe we will use an engine in the future that demands some C++ knowledge. Last time I used C++ was in 2010, and I was never a good C++ programmer anyway, so this book contains some fun knowledge on the first pages already. For example, I never knew that you can do
if (auto x = vec.size(); x > 5) { ... }
in C++. It's something I actually miss in C# sometimes. And if the check after the semicolon is used for != 0
or nullptr
, it can be shortened to
if (auto c = vec.size()) { ... }
- Defold feels slick, with tutorials built in as small projects. Nice. But it's actually only for 2D games I guess, and I don't see a reason right now to use it over Godot, although I like Lua more like GDScript and I like the idea of not having to install additional stuff for building for Android and so on.
PLAN
- The Unity nav mesh bug I reported finally was accepted as a bug. This is after it was closed before, because the behaviour would be "By Design" (which was a lie). Ugh, Unity. And then this whole thing with the fee for installations, I want to change engine again (some day). The problem is that we don't know yet what our next project will be. Patou needs to stay in Unity unfortunately. Again, what are my options?
Unreal feels too bloated and I actually want to do smaller projects.
Godot is always so alien to me and feels like it needs more time.
Stride?
Flax is probably "too early".
O3D?
Heaps again?
Wicked?
Defold?
Armory3D?
NeoAxis? (It's Russian and that could be a problem. Also not enough platforms.)
Kha?
Unigine? (Looks like Unreal all over again? Also v2 doesn't have support for mobile.)
Evergine? (No instant testing.)
Raylib? (A bit too barebones probably.)
FreeBasic? (Haha.)
Wish I knew how to create my own custom engine without spending too much time on it.
DONE
- As I'd like to do more low-level stuff (DOS programming, maybe Arduino) and recently learned about Exercism, I tried some of their exercises. So far I like it a lot, I had three different mentors for several small tasks and they always were helpful and deepened my knowledge about C.
https://exercism.org/profiles/ratrogue
DONE
- A lot has been done but not talked about, for Patou. We're preparing the current version for the devcom, and while I'm not overly confident (as usual) I try to cram enough things into it to make it shine a bit. A new debug menu for teleporting, collectibles (dog treats, flowers) that can be used as secrets in each level, special animations like sitting on benches for Kit, the Sphinx appearing during dialogs, a simple intro text, bug fixes, and so on.
DONE
- While trying to fix annoying glitches in Patou especially regarding nav meshes and off-mesh links, I noticed that, when changing the nav agent's position per frame during the traversal of an off-mesh link, I also should directly set the agent's velocity to prevent an ugly break in the path by the dog.
SEEN
- For Patou I'm still searching for a pipe tool - because we want to show that puzzle elements are connected to each other (a trigger activates an elevator, etc.) and everything else - wires, particle effects - doesn't quite fit with the style and world. Instant Pipes seems like it fits the bill quite nicely, it looks good and is easy to use.
https://github.com/leth4/InstantPipes
DONE
- In preparation for the devcom I updated our website a bit, mostly removing an old project, changing the banner pictures, more focus on Patou and replacing Patou's screenshots. Hopefully I'll remember that I hardcoded the project with the modal ID 2500 to be always at the top, as our current WIP project.
https://ratking.de/
https://gohugo.io/templates/introduction/
DONE
- I had some serious problems with ABGEFAHREN's character controller. I use the one I made aeons ago for my jam needs and never really touched it again because it most often worked "well enough". So when Stepahn couldn't even rotate the player on his Mac I thought I should dig into it a bit and try to fix the most annoying parts. Mostly it turns out that I rotated the player transform and that was a bad idea because in combination with a RigidBody that can lead to unexpected behaviour.
https://ratking.itch.io/abgefahren/devlog/558342/small-but-important-fixes
DONE
- Over the weekend we created a game for the bpb game jam 2023. With "we" I mean Jana and I and three other people (plus Crabman doing the music). The theme was Mobility. This was the first time that I was in a team with two programmers, and it was quite an experience. I am also happy about our creation, as it became pretty atmospheric and full of potential for creative content. ABGEFAHREN recreates the experience of travelling per train in Germany.
Pretty much all the other entries are great too - this was truly an inspiring event.
https://itch.io/jam/bpbgamejam-2023/entries
https://ratking.itch.io/abgefahren
SEEN
- I'm more and more convinced that Character Controller Pro is the most stable and usable character controller asset for Unity right now, at least for me. Maybe I'll use it for Patou (or rather Kit) later on - but right now we're concentrating on getting a new version ready for the upcoming Devcom.
SEEN
DONE
- I experimented a bit with small3dlib and TinyPTC, using it with DOSBox by compiling a small test case (a single triangle) via DJGPP. I had a lot of strange bugs with variables not even working correctly, and I feel like giving up, because apparently C is dark magic. Combine that with the fact that 3D stuff will always have bad performance if using libraries like that, I definitely go in the wrong direction, even if I just want to do something simple like a gridder.
https://gitlab.com/drummyfish/small3dlib
https://sourceforge.net/projects/tinyptc/
SEEN
- I read this short tutorial about Unity's inbuilt object pooling system. I might use it someday, as I think my own solution isn't the best. Pooling is such a crutch, just because you have to know what a Garbage Collector is and why it has its problems; I guess everything comes with advantages and disadvantages.
https://unity.com/how-to/use-object-pooling-boost-performance-c-scripts-unity
DONE
- Recently I got interested in FreeBASIC, and how I could use it to target both Windows and DOS. I found a version of TinyGL for FreeBASIC, but I had to compile the library myself so it would run in DOS. Even TEST01.BAS is unfortunately quite slow, 8fps with only three triangles shown. I don't think I want to put more time into this, but it was an interesting excursion.
https://mstdn.io/@ratking/110459022509065635
DONE
- After a power loss somehow the git repo of Patou was broken again, it showed
DETACHED HEAD
and there was no way to reattach it, at least not inside Fork. The solution was to manually edit the files in .git/ref/heads
and .git/ref/remotes/origin
so they would contain the correct SHA again. What a waste of time.
DONE
- Yet again I had to fix a bug in the Wordpress theme Blogrid, because the creators didn't include the fix I sent them. In the file
inc/template-tags.php
, there's a missing $byline .
, which means the author is never displayed.
SEEN
- Funny little tidbit I came across today - in ugBASIC, the keyword
FUNCTION
is defined, but subroutines/procedures actually only use PROCEDURE
and GOSUB
. Apparently this keyword isn't used at all. I wonder if there are more of these. In any case there are a lot of keywords in ugBASIC where I think this should be defined differently, especially a lot of music instruments.
https://retroprogramming.iwashere.eu/ugbasic:syntax
DONE
- Last week I had to create a video with gameplay from Patou. Well, it wasn't really an absolute must, but I got interviewed by ludipe, for the AstraFund, and I wanted to show some of the "thinky" parts of Patou. Of course, nothing worked, because we did stuff for the AMAZE demo the days before and changes were made that affected the puzzle levels. So afterwards I fixed it and sent him the promised video, hopefully redeeming myself. It felt good, even though I'm sure I won't be selected for the Fund. (Addendum: I was right.)
SEEN
- I finally discovered the
NavMeshModifier
component that excludes game objects from the navigation mesh creation in Unity. I had a problem with it not working for some objects, but then I read that the layer
must be right too.
https://forum.unity.com/threads/navmesh-modifiers-are-completely-ignored.676369/#post-7854210
- I'm done with reading the C book, and it feels so archaic and alien sometimes. I won't need most of the stuff, but still it was good to get into the way of thinking again. Somehow I missed this.
SEEN
- I'm currently reading a book about C, and I didn't know that C11 allows some kind of generic functions, by using the
_Generic
keyword. I'm really eager to try some low level programming for a small dungeon crawler project.
https://en.cppreference.com/w/c/language/generic
DONE
- We're back from the AMAZE, where we showed Patou for a few hours. Overall it was a very positive experience, but of course it also made clear how much more work there is to be done, in every department.
DONE
- After hunting another strange bug where an animation would not get played but only if the player comes from another scene, I should remember this: always make sure that everything is initialised BEFORE the component's core functionality is used. In this case the
Start()
method would reset the animation, as the object was hidden until then.
SEEN
- I was visiting the Indie Outpost in Nuremberg today, and someone held a talk about Godot. It was pretty negative towards Unity, but the guy was showing a few tools he uses and one of them was Dotgrid, which I never heard of before. It looks interesting, a vector art tool specifically for logos and icons and maybe more.
https://hundredrabbits.itch.io/dotgrid
DONE
- Version 0.8.0 of connected adds the Search Phrase tool, which is pretty much the last feature that was missing from the original Moritalk and that I wanted to have in again in any case. (The Node Flow functionality and the Dialog Border are definitely not as important, but would be nice to have.)
https://mstdn.io/@ratking/110292550876345626
DONE
- I was hunting a bug with connected - a dialog file for Patou would have two nodes with the same ID; which is not allowed to happen. (Also only in the game file, not in the editor file.) So I investigated for quite some time, but in the end I had to conclude that this happened due to a badly solved merge conflict, because I could not find a way to replicate it.
PLAN
- While I didn't submit anything to the Dungeon Crawler Jam 2023, I feel like the project I did could have potential so I currently plan to create a story for a "real" crawler and just try it out. As Jana still is not interested in a gridder I might try finding another artist for this.
DONE
- It's not really newsworthy, but I wanted to add something to the Patou blog at least, so I wrote about the start menu screen I worked on for a day. I liked how we did it in TRI, loading a real level into the background, so I did that again.
http://ratking.de/patou/2023/04/19/start-menu/
DONE
- I made another update for connected, as there were some serious bugs and flaws, so now it's v0.7.2. I also took the opportunity to add a quality-of-life feature - finally, duplicated nodes will be positioned at the right position: under the mouse cursor.
https://ratking.itch.io/connected/devlog/517016/connected-v072
SEEN
- I tried to rename several files in several subfolders. They had the form "nostalgia_100_ghost_bury" and I just wanted to replace the "nostalgia" with "nost". So via startpage-ing I found a piece of command line code that allegedly does what I want:
for /r %x in (nostalgia_100_*.*) do ren "%x" nost_100_*.*
But that didn't quite work. It renamed the files to something like "nost_100_gia_100_ghost_bury" - and nobody else seems to have that problem. So I resorted to ChatGPT which told me to use PowerShell instead and this script:
Get-ChildItem -Path .\ -Recurse -Filter "nostalgia_100_*.*" | Foreach-Object {Rename-Item $_.FullName -NewName $_.Name.Replace("nostalgia_100_", "nost_100_")}
And that actually worked.
https://stackoverflow.com/questions/245840/how-do-i-rename-files-in-sub-directories
DONE
- I did a first iteration of the prototype for a visual novel that might or might not happen, together with a guy named Baddy. Right now I'm only testing the dialog UI, so pretty much the same as with Patou. The most interesting result so far is that adding connected is a bit complicated when not using the provided example dialog code, so I will have to look more into making this easier, I guess.
SEEN
DONE
- As I did a bit of "sound design" for Ghost in the Paint, I uploaded a new version with footsteps, wind ambient sound and a wobble effect I made with Helm. I actually don't know how to create sound effects that aren't natural, so I want to look into this a bit more.
https://tytel.org/helm/
https://ludwig-hanisch.itch.io/ghost-in-the-paint
- While working on my dungeon crawler I noticed a bug in SBT, which caused some strangeness with the first few ticks. Which means it would only be obvious when SBT is used in a turn-based game. Fixing it was just a matter of initialising a variable differently, phew.
https://github.com/ratkingsminion/simple-behaviour-tree
DONE
- I participated in the Dungeon Crawler Jam 2023, but I didn't finish my entry, because half-way through the last day I noticed that I wouldn't have time to make something complete and interesting. I'm kind of proud of what I achieved though, because as I re-created my usual stealth gridder project I found some ways to make it work. So maybe I will continue with this, in some way.
https://mstdn.io/@ratking/110157354068685494
DONE
- I finally created that video I wanted to make for applying at Astra Fund. While I don't think I will receive it, as I'm too old for this, it was kind of a good exercise to do this retrospective. The low view count though shows me yet again that I'm probably in the wrong profession altogether.
https://www.youtube.com/watch?v=IRumvZbGHEk
DONE
- I uploaded a new version (v0.7.0) of connected, which finally supports node type definitions from the outside (via JSON and C# files). All that's missing is some documentation for that. Additionally there's now a free lite version which does not allow new node type definitions and also does not generate a separate file for texts, but otherwise has the same functionality.
https://ratking.itch.io/connected/devlog/510360/connected-v070
SEEN
- Useful tip for the future, when using git and Unity: Place a
.gitattributes
file into the folder with all lightmap textures and light probes to override the root folder setup, with *.asset binary
as content. The root folder contains the line *.asset text eol=lf
. I'll have to check how to combine this with LFS.
DONE
- Finally I removed Small Basic from connected and replaced all the configuration code for the nodes with C#, of course fed to the Roslyn compiler. I even fixed some issues I was having with connection order being lost when changing a node that would reset its contents. One wrinkle is still there: if there's a variable amount of connectors, like with the Switch node, the connections can get completely lost on undo actions.
DONE
- I uploaded a version 0.4.0 of Ghost in the Paint, as I could bring the gallery level to a playable state. The second level isn't interactive at all yet, but that will come with the next update, probably in a month or later. Also, sounds.
https://ludwig-hanisch.itch.io/ghost-in-the-paint
- While the C# support for the configuration of node types is still in the works, I made a new version of connected because I noticed some bugs. Also I had to finally add the path settings to the Settings menu because this week connected will be used by all Patou team members to create some fake dialogs.
DONE
- Another new version of connected uploaded - it's still not a release candidate, but I could add some small but important features (like the display of an out connector's connections order) and a welcome screen (with a list of files recently opened and an online version check via itch.io). The next big steps for an actual release are an integration of options (with a JSON file) and switching the configuration scripts for the nodes from Small Basic to C#. After that it's all about creating a free (lite) version and a commercial (pro) version. The plan is that the pro version allows changing and adding node types, and saving texts in an extra file (which already works, so I actually have to "remove" that feature for lite only).
DONE
- The interaction hints in Patou got improved. Instead of just showing "E - Interact" it now actually says which object/NPC the player currently can interact with, and what this interaction is (picking up, talking, unlocking, etc).
DONE
- I upgraded Patou's dialog UI a bit. It's based on our intern Patrick's design - he actually created the UI in Unity too, but unfortunately it would be too static for my taste. So basically I only took some inspirations from it, like the wobbly outline, and tried to fit it into something that can have different text lengths and amount of player choices. Of course NPC texts that are too long will still be cut off (because I really don't want scroll bars in this case, especially if we have voice overs), but if there ever is a reason to support text walls - which we hopefully won't, because they're boring - there will be a simple solution ready by just splitting the text in two or more parts. Anyway, it's still a problem that UGUI doesn't quite well support giving elements a maximum size, and the solution I have is a bit hacky, but at least it works.
DONE
- I think I could solve most of the problems with connected's Test Mode, so I uploaded a new version. The nodes are not dynamic yet, but the code now supports that. A bit of a problem is that I can't just add C# code files as text assets to be referenced in a script, but that problem should be temporary. The question is if I will jump the shark and replace all the Small Basic code with C#...
DONE
- I added a useful zoom menu to connected, so it's now version 0.5.4. And I'm on the path to bring back the Test Mode. Right now it's mostly a copy of the old legacy version, so it's not dynamic yet, but I plan to use the Roslyn compiler next.
https://mstdn.io/@ratking/110006452968350739
SEEN
- TIL that a
GameObject
that was never active and gets destroyed doesn't call OnDestroy()
on its children. Strange but true. At least I could fix that null ref error from yesterday.
DONE
- Uploaded the new version of connected with the correctness check. Next step obviously is to finally use the new format with Patou and make it the "official" version.
SEEN
DONE
- I re-added the correctness check to connected, and also fixed a pesky bug that would prevent saving variables that are not bound to an element of a node (for example, the number of cases in a Switch node). As soon as I find the reason why the connections sometimes create null reference errors I will upload the update.
https://mstdn.io/@ratking/109995638236707384
DONE
- The fifth episode of our Patou dev log is exclusively about the visuals of the dog. So the next part might be about dog gameplay. Hopefully this won't be too awkward, I'm still far from confident about showing it around, but it has to be done either way.
https://www.youtube.com/watch?v=39_daYk6B0w
- I'm finally continuing to work on Ghost in the Paint by adding some screenshake, an in-game menu (with an options screen) and the ability to change the level after the Black Gate. It's probably a long way till it's finished, of course; so it's not yet updated on itch. Before there's an official update I have to improve the second level (the gallery) and add some kind of ending. Sounds would be great too.
- I updated some of my open source libraries (as I needed some additional functionalities) in the last few days; there's now a hotkey analyzer in the Game Jam Base Code and also sounds can follow a transform, and for SIH I added temporary schemes (only if you use Rewired). Oh, and already for some weeks now SUS can be used outside of Unity.
https://github.com/ratkingsminion/game-jam-base-code
https://github.com/ratkingsminion/simple-input-helpers
https://github.com/ratkingsminion/simple-utility-system
DONE
- I updated the new version of connected, adding confirmation dialogs and doing a few small bug fixes. Next up I should do Patou supporting the new format, and then it will be the actual main dialog editor for the future, probably.
SEEN
- Watched a video about the toolset of the people who made the game Human Resource Machine ... What a crazy cool workflow, being able to debug backwards just like that.
https://www.youtube.com/watch?v=72y2EC5fkcE
- I followed this tutorial because I was interested in creating synthetic sounds in Unity, and then continued because the tutorial teaches a bit about Burst. Unfortunately the tutorial has some flaws, and also the result shredded my ears, and I guess I will use something else.
https://blog.hedgecock.dev/2022/unity-audio-generation-performance/
DONE
- When we showed Patou at the Gamedev Meetup in Leipzig, I noticed that the Speedlines effect wouldn't appear in the build (only in the editor). I actually had this problem before, but the reason was something on my side. This time it definitely was something with SCPE, probably since the last update. After a very long debug session, where I would change the order of post-effects, remove some, and do a lot of other things, I finally found the alleged culprit: Only if the toggle is ON for the Noise Tex - no matter if the actual texture is changed or not - the effect would show, otherwise it never appears. My guess is that Unity somehow thinks that the texture is not used if the toggle is off and doesn't include it in the build. Anyway, this took way too long, and I hope there is some kind of fix for this.
- A student who does security stuff on the side mailed me because of a potential security flaw on my website. I was a bit shocked, but it wasn't really my website but the blog that I wrote for my graduation project (Schwere in der Schwebe / Hals über Kopf) 13 years ago. My PHP game was never really strong, so I never expected it to be the best thing ever. In the end it was "just" a flaw that other people could use an URL of my blog to gain access to another person's computer (i.e. XSS), so all I did now was make my blog a static HTML website, by removing some dynamic stuff (especially the tag selection) and then using HTTrack to crawl it on a local webserver (XAMPP). Also, the student wanted some money for him finding the bug, but to be honest this actually caused me quite some stress and I don't have much money anyway, so I refrained from that.
https://www.fholio.de/archive/sids/
DONE
- Conclusion from tonight's Gamedev Meetup Leipzig, where we showed Patou on a laptop: As expected, not many people dared to actually try it out (only 3 people in total - it's a pretty small meetup), but it was more than enough for feedback. Overall we left with a positive feeling, people thought it was pretty and above all somewhat unique. The digging is the main problem right now, too much has to be explained when people try it out.
SEEN
- The Uxn ecosystem looks fun, somehow. It's appealing because of the simplicity.
https://100r.co/site/uxn.html
- In Unity, I really need to remember how to set the layout for a vertical list of buttons with different/dynamic heights based on their text contents. (Mostly important for Scroll Views.) First step is to add a
Vertical Layout Group
on the Content
panel (Control Child Size Height
toggled on and Child Force Expand
toggled off) and a Horizontal Layout Group
on the Button
(same toggles). The Content
panel also gets a Content Size Fitter
with Vertical Fit
set to Preferred Size
. The text element of the button doesn't need any additional component.
DONE
DONE
- I will rename Terrobot X to Games for Rats, because Terrobot X itself is another project altogether. Anyway, I made the log output much nicer, and it even jumps to the faulty line when the user clicks on an error. Also it's now possible to change the "screen resolution" by using Small Basic, and soon there will be more options available. Before I do a soft release I want to have screen focus (so you don't manipulate both the editor and the in-game controls at the same time anymore), and a rudimentary welcome screen.
DONE
- Some more work on Terrobot X - I copied connected's top menu bar and reused it for this project. I'm also working on the API now, which hopefully will soon allow some interesting experiments with variable screen shapes.
https://mstdn.io/@ratking/109865113821737902
DONE
- I uploaded a new version of bloed, mostly with hotfixes for bugs that I noticed during making Root 666. But Tom 'voxel' Purnell also allowed me to add the textures he made for 666 Coins; this way people are quicker in creating something with the tool out of the box.
https://ratking.itch.io/bloed/devlog/488499/bloed-v113
SEEN
- Somewhere I saw this construct:
public ref Character Character => ref _Character;
... and if I understand the ref
modifier correctly I don't really see how this is any different from just having a public Character variable, other than making it more complicated? In any case ref return
is something I should try to use sometime; should be useful with array stuff and when returning big structs.
DONE
- While working with bloed in Root 666 I noticed that the old bug with the
Tab
key was occurring again and I wondered why. Today I dug into it and it was an easy fix - I used #define UNITY_2021_OR_NEWER
instead of the correct UNITY_2021_1_OR_NEWER
. I really think they could just add both.
SEEN
DONE
- I did a small update for Root 666, as there were some annoying things that happened (and were released) because of the time constraints of a jam. But now the enemies can hit the player when they're fighting on a slope, and you can exit the game via Escape. Also, Jana made a video of the gameplay.
https://ratking.itch.io/root666/devlog/486493/version-03-for-root-666
https://www.youtube.com/watch?v=AcviSew1V1Y
- As I stumbled over a somewhat strange edge case while doing behaviour trees for the enemies in Root 666, I finally looked further into the issue and actually I was just using the
InsertTree()
method of SBT in a wrong way. But instead of adding a note about the correct usage to the docs I just allow the incorrect usage and therefore make it correct usage. Basically a tree can now have more than one root (how fitting for the GGJ theme!) and this way InsertTree()
can be used more dynamically.
https://github.com/ratkingsminion/simple-behaviour-tree
DONE
- Jana and I participated in the Global Game Jam for the ninth time, so the next one is a jubilee! This time the theme was "Roots". With the help of Norrimo (Patrick Eckardt), mostly in the music department, we created a horror game where you throw screaming mandrake roots and hit enemies with a stick that has an eye stuck on it. Jana used bloed to make the level, and I got to use my fluent behaviour tree C# implementation for the first time. Of course a lot of bugs became apparent this way, but in the end we actually finished our entry Root 666.
https://globalgamejam.org/2023/games/root-666-0
https://ratking.itch.io/root666
DONE
- I had some strange issue with my input strings in Terrobot X, where sometimes some keys wouldn't show up in the text field. Only a lengthy debug session would make it clear that using
Update()
for input handling causes the return key sometimes overwriting what I type. So I had to switch to OnGUI()
and handle key events manually. Probably the better way in the end, but this also has some quirks (like a key event would fire twice, once with the character and one with the KeyCode
).
PLAN
- We're going to participate in the Global Game Jam again, although in a very constrained and small manner. Basically it's just us and another office (Prefrontal Cortex) in the same building (MMZ).
https://globalgamejam.org/2023/jam-sites/ggj-halle-rat-prefrontal-king-cortex
- A year ago I worked on Terrobot X, and unfortunately it never became what it was meant to be (an extended version of the first-person gridder programming jam game), but at least the code editor I made was mostly working. I never used it for anything though, I streamed a bit and that was it. Now I want it as the basis for a fantasy console (which I already planned back then too), especially for simple entries for the One Hour Game Jam. I would be able to extend the console itself from time to time while still having all the entries inside; well, that's the plan at least.
https://onehourgamejam.com/
SEEN
SEEN/DONE
SEEN
- Interesting but short article from 2006 about how the original God of War was developed, as there was some kind of conflict between the lead designer (who wanted "all special cases") and the programmers (who think of special cases as their natural enemy). The executable was only 1.5 megabytes big!
https://www.gamedeveloper.com/design/gdc-i-god-of-war-i-how-the-left-and-right-brain-learned-to-love-one-another
- I finally tried Evergine (which was Wave Engine before), and it doesn't seem to have any kind of play mode, so you have to build in order to test the game. I guess it's retro. Call me entitled, but if I could work without instant testing I would just use Heaps or Raylib.
https://evergine.com/
SEEN
- Just had a serious bug with closures in C#/Unity, serious because it was hard to track down. Basically a closure gets generated each time so if you store it in a variable and compare it later again the result is false instead of true, because it's actually not the same object. Which makes sense of course.
SEEN
- I read this short tutorial about how to create a "see through" effect for characters in Unity URP. Could be useful for Patou, but I actually don't like that it (of course) does that for everything at once; for example if only the protagonist's feet are hidden by some floor plate, it's jarring.
https://docs.unity.cn/Packages/com.unity.render-pipelines.universal@11.0/manual/renderer-features/how-to-custom-effect-render-objects.html
- We did another video for the Patou vlog, this time about the portals. The video is pretty short, mostly because I forgot to mention some stuff, like how the flowers and trees are using instanced mesh rendering and are actually placed directly on the terrain.
https://www.youtube.com/watch?v=S8hRFF_ZfzA
- I followed another tutorial about custom effects, because I wanted to know how to create post processing effects with URP. Turns out it's even more of a hassle than I thought, at least according to this tutorial. Just the simple effect of having a colour overlay has several scripts with a lot of hard to understand boilerplate code. And it doesn't work with another effect (by SCPE), as it gets removed by the Black Bars post effect. Ugh.
https://www.febucci.com/2022/05/custom-post-processing-in-urp/
DONE
- I've done quite a bit of work on Patou, mostly on the cutscenes. I call the scripted sequences and they are probably both under and over powered, as they are hard to set up for the creator but also are pretty extendible. So I guess they're mostly perfect for me, and not so much for any artist working on the project. It would be nice to have some kind of preview feature, but overall I don't expect that we have too much of them.
SEEN
- Today I learned that C#'s
HasFlag()
method for enum
s uses boxing and therefore allocates memory! Ugh.
DONE
- I found a serious bug in my behaviour tree implementation, where
Repeat
and Retry
nodes could lead to nodes being processed and executed more than once during a tick, which is obviously bad and even creates endless loops. I fixed it with a tick counter, which looks a bit like a hack, but I guess it does make the implementation more foolproof, especially if I ever add more node types.
https://github.com/ratkingsminion/simple-behaviour-tree
PLAN
- I had an idea for a code ping-pong, but it wasn't received with approval, so here it is, for archive reasons, and maybe I'll come back to it later:
Basically a ping-pong based on levels. The participants start with a simple arcade game base mechanic, for example Pac Man guy with Pac Man movement. First participant A adds a level with the player having to collect pellets. Then participant B adds a level with a simple enemy, with the pellets. After that A adds a level with moving platforms; and so on, until the last level doesn't even resemble Pac Man anymore maybe, or it's just Pac Man on steroids. There could be some ground rules like "the level has to reuse at least half of the features from the levels before", or "the basic player movement is not allowed to change, so it's always controlled by the arrow keys only".
Of course each feature would need to be documented clearly, and it should be very easy to add a feature to a level.
SEEN
- So it's possible to speed up the Play mode of Unity significantly, but it comes with a big caveat. Via unchecking "Project Settings → Editor → Enter Play Mode" Domain and Scene are not reloaded anymore. It also means it doesn't reset static variables to their initialisation values, which can be quite annoying. But I guess this can be counteracted via a
static
method with the RuntimeInitializeOnLoadMethod
attribute. I have to check if this is viable.
https://www.youtube.com/watch?v=wRCnKtpzf5U
https://blog.unity.com/technology/enter-play-mode-faster-in-unity-2019-3
- I finally watched Freya Holmer's video about splines; it's a very good introduction into the subject, and also has in-depth explanations and, of course, extremely good animations. Her maths helper collection should be helpful too in the future.
https://www.youtube.com/watch?v=jvPPXbo87ds
https://github.com/FreyaHolmer/Mathfs
- I watched this introduction video to Super Netcode. Looks quite easy (the devil is probably in the details). Though getting people from across the planet to join a networking session will still be a problem I'm sure - a relay is needed for that (e.g. via Steam or Photon) - and, well, friends. Anyway, someday I will try a multiplayer game again, just for fun.
https://www.youtube.com/watch?v=Odn1MQo6V_k
https://assetstore.unity.com/packages/tools/network/super-netcode-175227
- MonoBehaviour Systems - more DOTS stuff, this time combining it with
MonoBehaviour
s so maybe I don't have to give up my comfort zone completely. In any case I should look more into it.
https://www.youtube.com/watch?v=RhU8NZtgYp0
- More things using DOTS with
GameObject
s. I love how such posts always talk about how easy this is, but the code always looks like a mess to me.
https://coffeebraingames.wordpress.com/2021/11/23/the-safest-way-to-use-dots-in-your-monobehaviour-project/
- I also want to find out more about
DrawMeshInstancedIndirect()
to be able to have more meshes on the GPU instead of the CPU. These articles help a bit.
https://toqoz.fyi/thousands-of-meshes.html
https://coffeebraingames.wordpress.com/2022/10/04/sorting-a-million-sprites/
- So actually there is a (very convoluted) way to have custom lighting in URP! It only really works with ShaderGraph though, it seems, and for hand written shaders there would be other steps. Thanks to this tutorial I also learned about
ScriptableSingleton
s in Unity.
https://bronsonzgeb.com/index.php/2021/10/04/custom-lighting-in-urp-with-shader-graph/
https://bronsonzgeb.com/index.php/2021/10/11/custom-lighting-in-shader-graph-part-2/
https://docs.unity3d.com/2020.1/Documentation/ScriptReference/ScriptableSingleton_1.html
- A breakdown of how AAA clouds are done in games, via ray-marching and SDFs.
https://www.youtube.com/watch?v=Qj_tK_mdRcA