DEVLOG 2023-10-14
This week I’ve continued the exploration of GDExtension hot-reloading system. After my patch to it was merged last week, I realized the system was unstable when attempting to reload my GDExtension more than one time. My instinct as a C++ programmer quickly screamed “undefined behavior” after seeing random access violations, weird errors due to weird state, random crashes when closing the editor etc.
I didnt have much time to dig deeper before the livestream (which is now moved to Thursdays, by the way) but I quickly setup a custom debug build of Godot itself, it addition to godot-cpp (the binding library you need to use to make a GDExtension) to prepare my setup for an epic debugigng sessions. In the livestream we spent most of it just debugging that issue and I finally found the actual reason it was crashing, how it went step by step etc. The day after, I redacted a long explanation in a PR, with a hotfix that I thought was bad, so that the main GDExtensoin developer can have all the information to make a better fix. Turns out that my fix was good-enough though he had to tweak it in another PR to go a step farther.
I also spent half a day doing research to help the team of build2
, the package manager + build-system I use for C++ in MEGASTRUCTURES, to support the current implementation of C++ modules in Visual Studio’s compiler. They supported the experimental versoin that was provided years ago but not the official one which seems to be complete enough for me to use.
I would prefer to use C++ modules for my game because I am fedup with issues of lack of isolation and cleanneess using headers. Obviously there is also the compilation time issue that modules can help with, but in my case for now it’s not a big issue. I’m more interested into the ease of organization and isolation of domains and concerts that the modules feature provides.
The build2
C++ modules support for the msvc
toolchain will be started maybe in a few weeks so I hope I can test it with the official beginning of MEGASTRUCTURES (aka not-the-prototypes). build2
already supports C++ modules from g++
but I only use that one on linux, and clang++
but it lacks one automatic finding of the standard module to be complete when building on Windows. Unfortunately both compilers are very buggy at the mometn when it comes to modules, but that’s to be expected for such difficult to implement feature. The Visual Studio team were the first to experiment with that and then propose it for standardization so they had an advantage.
So basically this week I have been debugging my gamedev tools instead of progressing on the game, but now I can hot-reload many times my GDEXtension in Godot 4.2-beta2 + the patch, so I’m kind of happy.
MEGASTRUCTURES
Post-cyberpunk roguelike - Play a transhuman exploring gigantic megastructures
Status | Prototype |
Author | Klaim |
Genre | Role Playing, Survival |
Tags | Cyberpunk, lone-survivor, Post-apocalyptic, post-cyberpunk, Roguelike, Roguelite, Singleplayer, Turn-based, Turn-Based Combat |
More posts
- Quick status update21 days ago
- DEVLOG 2024-01-06Jan 06, 2024
- 2023 RetrospectiveJan 03, 2024
- DEVLOG 2023-12-23Dec 23, 2023
- DEVLOG 2023-12-16Dec 15, 2023
- DEVLOG 2023-12-09Dec 09, 2023
- DEVLOG 2023-12-02Dec 02, 2023
- DEVLOG 2023-11-18Nov 18, 2023
- DEVLOG 2023-11-11Nov 11, 2023
- DEVLOG 2023-11-04Nov 04, 2023
Leave a comment
Log in with itch.io to leave a comment.