Asterix Gaming Guild Logo GeneralXXLXXL 2XXL 3XXXLOlympic GamesXXL EditorToolsOff-TopicXXL RomasteredXXL 2 RemasteredOther GamesModsCaesar's ChallengeUnfair XXLPatchesFan ArtPersonal ArtSpeedrunningMediaRandomizerBETA RomeHSKALPresence AdrienPresence SPQRPresence Mr. RubinshteinSupport Bot Helpdesk

#hskal

hesopesomeso
I do, minus writing reflection... you do need to realize that the user will be able to edit the K classes (meaning writing their own reflection into the editor). Parsing solves that, but it's very slow... With clang it takes as long as compilation...
pegperegogaucho
I believe I understand what you are talking about. You want the classes to be editable, so the user can add new members etc., but the problem when writing reflection with this approach is, is that the user has to add reflection support for the members himself. So you suggest parsing the C++ files for automatic reflection generation, but that is too slow?
hesopesomeso
Yeah, slow compared to regular reflection, which has basically zero overhead when loading.
hesopesomeso
It's possible, just that it will make recompilation a bit slower, but I guess that's fine. We can live with that.
pegperegogaucho
My suggestion would be to consider Macros to implement reflection of members. With this method https://buildingblock.ai/reflection you can simply use a REFLECTED_MEMBER(...) macro and then enumerate the members without needing to write out explicit reflection of each on of them (like in the XXL-Editor, r.reflect()...). Note that this requires at least c++20 but I believe that is already the minimum standard version for hsk
pegperegogaucho
However, it might be faster to just use clang to parse the files instead of Macros that generate a million template instantiations :KEKW:
hesopesomeso
Yeah... and I really don't want to macro every field.. god, there's so many of them already and I'm not even half done with the classes :KEKW: it would take forever to do it by hand... I'd need a tool for that. Gosh, that would make everything so ugly too :Obelul:.
hesopesomeso
Now the parsing option isn't looking all that bad
pegperegogaucho
Understandable
pegperegogaucho
A problem is also that you would need to reverse the order of type + name since type needs to be last for the __VA_ARGS\_\_
hesopesomeso
Minimum is 26 (but that's probably ignored :Obelul:)
pegperegogaucho
:PogelixWeird:
pegperegogaucho
It's not even 2026 yet
pegperegogaucho
Time traveller
hesopesomeso
Yep... (unrelated to 26) I did want to use modules, but it just did not work like a year ago (at the time when I started writing it)...
pegperegogaucho
Modules are dead on arrival, what is even using those now?
hesopesomeso
Oh, also, I added a cute feature. You can press F5 to switch between play state & editor state. You can hop in game like in Kal. It still needs some work (so you can move the player to start somewhere, etc.). Would be nice to also edit the values in the play state, so that will require some more tinkering...
hesopesomeso
I was going to. I really wanted to, okay :KEKW:
hesopesomeso
Okay crash successfully prevented :KEKW:
pegperegogaucho
What was the cause of the crash?