#π Cortex Engine
1 messages Β· Page 11 of 1
So far I didnβt have any issue related to building SDL3 separately from Haxe btw, it just works. This dpi issue is more about using the correct SDL api
it's always a shitshow
@ionic badger double and tripple checked, running a 4k display @ 1080 and it's all fine
I think i have the niche-iest setup here
Wayfire on Arch with integrated Intel Xe Graphics
with 125% scaling?
100%
maybe try with the scaling, linux seems to do weird things with scaling
that makes shit go completely haywire
but for my whole desktop
You use the experimental fractional scaling
it seems relatively okay for most use
it defo isn't correct or "how i'd like it"
but 150 is waaaay too much
cant really replicate here. Guess we'll have to wait till I test more configs π
no
your desktop runs at 4k
maybe I misunderstood, but you said you run your screen resolution @ 1440 , 4k being the native resolution of the screen
when i first tested it was 1440p@125% scaling (for overwatch). Now i'm "back to" my normal day-day resolution of 4k@125% scaling
screenshot above is testing 4k@100% scaling
this inspector is so damn cool
not sure if intentional, but scrolling with the mouse wheel doesn't bump the fps up
It does when you're hovering over the background
but if you're over the actual scroll container, it doesn't
the throttling is hooked into the sdl event loop, so any mouse event should mark a frame dirty, no matter where you at in the UI
can you repro?
I've just abandoned the 125% scaling lol
and switched to 100% with text scaling to 1.3, and increased the start menu dimensions. This is way better
nope, pretty curious
I avoided this solution because bad history on wayland, but on x11 it literally does scale all text in all apps completely fine
glad you like it π
if you open the console (^) and run throttleMode() it disables throttling. throttleMode("low") to re-enable
next() will cycle between the other samples
when trying to scroll over the purple background it will raise the fps back to 120
but in the actual containers, it just raises to 60
60 is what my monitor is running at, but, the discrepency is a bit odd
it should run with vsync. in the project.cortex you can disable vsync
weeeeeird π
maybe just my system weirdness/arc driver oddness
I defo need more datapoints
i added this kind of throttling in my haxeui backend for ceramic
it's a nice little addition π
yeah, it was defo necessary to add it to cool down my cppia life a little
I have the app open for long sessions and just hot reload iterations, my laptop drew quite some power just having the idle app open
however
running with SDL_VIDEODRIVER=X11
works perfectly
my only complaint is that horizontal scrolling doesnt seem to be inverted but that might be an issue with my setup
ah interesting
*in the city thing/overflow: scroll
most of the controls are wired up and do stuff. if you click the fps graph it switches modes etc. console can be open with ^(tilde) key and using next() command cycles to the other samples/tests
@void condor in statecharts, I get a null reference error with this <Transition to="Unhappy" guard="isUnhappy" />, which seems valid. It's fixed by null checking transition.event in a certain spot I guess bc .event is null and not ""
Does that sound like a bug and PR, or user error?
Here, works if I check hasEvent instead of just length == 0
interesting, this definitely worked. lemme check if I missed something
Ok thanks, thatβs why I asked bc your samples use that
It runs well and looks good, but is it supposed to react to window size changes?
when I stretch out the window, the UI stays in the corner
that's ok, there is no special logic in the sample to adapt to screen. You also got a 4k screen?
No, a small laptop screen π
The window opened to the exact size of the UI and looks good. It's only when I resize the window that the result was maybe unexpected
one more thing you folks could test: opengl, change the renderer to "OpenGL" in project.cortex and see if there is a visual difference to vulkan. For me there is one, but it might have to do with my drivers and the fact, that ogl uses a different gpu on my end
cortex only works on linux?
nope. but I dev mostly on linux
Is there a build for windows? i want to test it
unfortunately I dont have a windows build currently
:c
eventually there will be a windows build. just no priority atm
I'm gonna have the bestest text field ever
Im rewriting the sucker tomorrow π
Iβm very curious how far down the text rabbit hole youβre going
heh, bgfx already includes stb_textedit.h, so I will simply plug that in. The extern is already done and mouse input works π
god I love this
building a textfield is like playing Counter-Strike, easy to get in, hard to master π₯
and I love the pog moments when universes collide like this: hxcpp, imgui's stb_textedit & nanovg
a b s o l u t e t r u e
It's very addicting though, adding stuff to ceramic's textarea makes it feel so nice to use
yep. it's highly interactive and needs to feel nice
this textfield uses like the most features of my ui all at once: transitions, animations, overflow scrolling + styled scrollbars & lots of event listeners & handlers
The main missing feature of Ceramicβs text input is the horizontal scroll like what a standard text input does. I have the various parts available to make it, but didnβt spend the time to implement it yet
oh iirc there's a bit of a bug with copy paste with ceramic input π€
Whatβs the bug?
I need to check it, but in some cases, you can't copy or you can't paste outside or into the ceramic context
something along those lines
This is not a really a bug, it depends on the ceramic target and context, like, you canβt access just clipboard like that from a browser
need to see if it occurs on native
On native, it should use SDL clipboard so it should work between the app and the rest
When Ceramic canβt access outside clipboard, it falls back to app-level emulated clipboard so you can still copy paste things within the app
will check now, just tried pasting into ceramic from discord and didn't work
been a lil bit since i last tested on native π
This, on which target?
electron
Yeah, canβt tell about your custom electron setup.
Oh wait, i swear we spoke about this before and I recall locally solving it
And not sure I actually implemented the clipboard via electron yet
You need to enable the electron plugin
(Sorry for hijacking your thread xd daz)
i'll do my next reply in your cosy livingroom π
Yeah, just grab your β
the text scrolling was soo infuriating in my first implementation. so much special logic just for the textfield seemed wrong, hence why I made it a global feature. all that is missing is the scroll-into-view funcitonality, once I add that it will just work for everything else like the console π
Ceramic's Text visual already has its own cropping/clipping mechanism done at the step where it translates every glyph into actual textured quads. This allows not to need stuff like scissor or stencil to do a simple rectangle clipping. So I just have to connect this api (assigning a clip rect handled by the Text object) to the actual editable text field component
I could put that inside a Scroller which would make scrolling via touch or mouse possible, but before I'll need to check how a standard text input scrolling works, maybe it's just about moving the text cursor around. In other words: everything is there to do it, but didn't figure out exactly what I should do yet π. Some dayβ’
(I know !billy asked for it though π¬ )
I would do it but I never know the correct places to add these things
or at least attempt/put it on the Todo list
Yeah this Iβll probably have to do it myself, too many moving parts involved to get right
I thought about that as well in the beginning. But again, too much specialized logic for my taste for a feature that is in essence required globally(transform hierarchies, clipping, scrolling). I dont worry about scissors/stencils
Next I want to worry about modals and overlay input focus
I understand. I do have globally handled transform hierarchy and clipping too (and scrolling with the Scroller visual. It's just that the text provides its own thing in addition to that
Also, currently Ceramic currently doesn't support nesting multiple clip rects or shapes (based on scissor or stencil) within a visual object hierarchy, so if I had to use it for a text object, I couldn't use it for a parent container that contains this text object. This could be improved in the renderer of course by computing an intersect of the nested clipping shapes on the fly, but that's not supported at the moment
(that's also why I suggested @ionic badger to use Filter objects to nest clipping objects in haxeui: you can nest any level of render textures, and the render target boundaries viewport acts as a clipping rect just fine. If later I do the above improvement, nesting would work also by using stencil without intermediate textures)
xD
I have been long searching for a solution without going fullblown harfbuzz on this
and a while ago my prayers were answered: https://github.com/JimmyLefevre/kb
with some tweaks it plugs nicely into my setup
biggest problem: I cant read what this will produce, so error-checking and debugging will be super tedious. So decided to kick this can down the road until further notice
Like how the fuck you deal with this: https://github.com/JimmyLefevre/kb/issues/34
With NotoSansDuployan-Regular.ttf HarfBuzz: $ hb-view NotoSansDuployan-Regular.ttf 'π±π°£ π°π± π°π±π°π° π°π±π°π°' $ hb-view NotoSansDuployan-Regular.ttf 'π±π°π±π° π° π° π±π° π±π±βπ° π± π°π±βπ°π±π° π±βπ° π±π° π°π±π±βπ°π±π° π° π±βπ°π± π°£π±...
alien shit
in this case one would invoke cunningham's law
advertise your app to have perfect [language] support
then you will get many detailed bug reports
I'm enjoying my gitea server
always running, haven't had to do anything with it to maintain it since i set it up
i also setup the cloudflare zero trust thing, i've got it remotely accessible
it's a really cool setup overall
nice! in my case I tend to shutdown my personal stuff while im gone. No need to run stuff while im out, high up in the austrian alps π
the minipc i got it running on takes like 12watts to run
was very mindful of running power π
how long are you on vacation for?
remember to do regular back ups!!!
we went the last whole week. just came back today
or else you will be put in a genkit scenario
had an amazing time: From a swim in the summer sun, chilling hikes to mountainlakes and finally an insane thunderstorm painting the mountaintops white with snow
can defo recommend the High Tauern for anyone that likes mountains and a shitton of nature
lol, its on the todo list. But i've already implemented step 1 plan, i switched out the shipped harddrive with a samsung 950 ssd i wasn't using
what happened to genkit
got any pics? π
mki lost the source code
Technically no he has it stored at his dad's house somewhere
Yes he said that when I went to talk to him on dm's
ohhh i remember him saying that
I think i'll be fine considering i switched out the shipped (no name) m.2
but I do plan on actually adding another drive in there at some point for backups
a simple script that runs at the end of the day would suffice (or something like that)
you should technically still have a off site backup, def a good idea
that's part of the backup plan, just not sure how i want to execute it yet
it's not much of a priority for short term
will share later
what distro are you running on it?
ubuntu server!
ah ok, ubuntu is so much better on servers
its been completely fine
no issues
and can always access it whenever i need to via ssh
you can tell canonical puts more effort into ubuntu server than the desktop variant
its likely their primary income stream
finally! cortex supports package-based resources/assets in the monorepo now. no more shitty duplication between apps now
this was the hike up the canyon into the alpine
the place we stayed at
waaah, finally a good single header lib for those pesky dialogs https://github.com/samhocevar/portable-file-dialogs
π¬ Portable GUI dialogs library, C++11, single-header - samhocevar/portable-file-dialogs
samhocevar is on this server and is sometimes active in the kore server
nice. I just completed the externs, works like a charm
var res = FileDialogs.open_file("OPEN FILES", "", ["Cortex Resource Files", "*.cxr"], Option.Multiselect);
trace(res);
var res = FileDialogs.save_file("Save a file", ".cxr", ["Cortex Resource Files", "*.cxr"]);
trace(res);
var res = FileDialogs.select_folder("Select a folder");
trace(res);
var btn:Button = FileDialogs.message(
"Unsaved Files",
"Do you want to save the current document\n before closing the application?",
Choice.Yes_No_Cancel, Icon.Warning);
FileDialogs.notify(
"Cortex event",
"Something might be on fire π₯",
Icon.Warning
);
Perhaps a good match for hashlink too...?
doesnt SDL3 have dialogs
Would you consider publishing the externs, @void condor
Yes but hashlink is sdl2
hlsdl is sdl2
one can make sdl3 on HL a thing
Okay but one is not me, and adding a rule file picker is a smaller task
If one is you I am thrilled to hear it
well
I am
For beacon I'm planning to extern a good few libraries
SDL3, SDL3_Image, LLGL, miniaudio, and a few other libs
sure. might take a few days, but I let you know
No rush at all of course. I am not confident that with them I'll be able to achieve anything either π
should be super easy
I would need to then convert them to hashlink externs which is something I've read about but not done
i might be able to help
ahh that's a very nice stream, clear water!
looks like a really nice place
looking at the traffic stats of my github repos im convinced 90% of clones and visitors is AI
How does it compare with linc_dialogs? Do you think the implementation is better here?
better in every way. cpp11 required, way less code, no need to mess with dependencies, instead it scans the env at runtime for them etc.
plus you get message boxes and OS notifications
I see, nice! I should take a look if you share the externs
knock yourself out https://github.com/dazKind/linc_filedialogs. CC @neat smelt
Thank you!
Oh, actually, I might have a very short term use of that, but thatβs for an internal tool
cool. lemme know if there are any issues, PRs welcome
I need to review my dependency management of resources, the new package system kinda screws with the old logic :/
ok, even found&fixed a bug.
NOW I need to take the dog outside, get some food and then I can finally finish scrollIntoView & the missing bits of my TextInput
ok, there was an issue with linc_filedialogs and the default parameters of the methods
I wonβt use it right away anyway, I have too many things on my plate right now π
nullability can be tricky to get right with native types for all 3 targets. But it's working now
[showcase] Your hxcpp/cppia apps need proper cross-platform dialogs, messageboxes or OS notifications? This new linc-lib has you covered: https://github.com/dazKind/linc_filedialogs β€οΈ
nah bro π you are the goat
Oh os notifications are a nice addition
fr

oh, looks like I blew past 60k lines of code
just cortex without the dependencies is ~22k, 10k of that is the ui package
whattheheeell
man, there are moments when I love this ui system soo much
WTH
we are on a stroll
waaahhh
adding a general purposescrollIntoView was easier than I thought... 60 lines of code π
this is what happens when you have shit in place
I've been wondering about why the c++20 pr isn't ready for pr on the hxcpp repository yet
didnt test all platforms. feel free to test it
Github actions already tests all the targets for you
I doubt they test all the compiler defines
all the actions say is that my shit didnt break the standard compile
10 unique visitors and 20 unique cloners
anyone bold enough to interpret these numbers?
What targets do someone have to test
Linux and Mac? Besides windows?
Windows and Mac
I tested this on windows
It worked like - perfectly
So hold on, did dazkind already test it on Linux!?
windows and linux should work
cortex uses cpp20 on windows & linux
at the time I added the PR I only had windows
guess i just push it out of draft and we see what happens
70's supergraphic go soo hard
AI crawlbots are cloning your repo
madness
FINALLY!
:O
textinput is finally under control
one little issue with the scroll bar exploding in certain frames around string start, but that should be easy now
this rocks. instead of having custom logic to follow the cursor around it reuses the overflow scroll functionality from the control core to keep the cursor in view. it just has custom styled scrollbars. π
since it's baked into the core this is essentially a basic version of https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
it's so cool that any of this works really. It's like mannyyy different subsystems and you get a pretty "native" feeling UI
not sure if I should feel offended. WHAT DO YOU MEAN BY "THAT ANY OF THIS WORKS REALLY"?!?! IN THIS HOUSE WE BUILD TO WIN!
j/k π
I promised myself this will be the last UI system I write & fumble together
concerning "native" feel, once one gets serious with the css, shit will blow people away
well I mean in general, that we can just create bits and pieces and it just kinda slots together
like we can interact with graphics (in your case through BGFX)
we have some input
use a library here and there for flexbox layout
you write many components
and boom, super cool UI
this is simplified ofc, but like, this is genuinely so cool
XD
like this UI system you built reminds me of why programming is so super enjoyable
i can tell alot of effort and passion has gone into it π
great stuff man, really well done :D
oh I get it. it's all a big integration exercise
thanks! this beast will unblock some insane stuff I have prepared
can't wait :)
I complete 1-2 more milestones I can finally go back to 3D and unlock the most advanced modern haxe renderer ever
what are you planning in terms of features?
wait and see. I integrated compute shaders the other day... π
uhoh
that does unlock alot of oppertunities
particles, GI and that is just scratching the surface
but my biggest pain is asset creation/management atm. I need ui tooling for that otherwise it's always such a drag adding & maintaining new content. That's why I need to get the UI out of the way to offer enough functionality for the tools I need
i wonder how that will end up
i can imagine like cool tooling for statecharts and stuff
because i know you love those
very interested to follow the progress
will defo read upcoming previews :)
yeah, I have been looking at compute particles recently and Im burning to get working on those. Also maybe deferred/forward clustered renderpipelines. There are soo many cool bgfx setups I can build upon and port them to cortex flexible renderer
yeah defo
ive been looking into compute too
to me the underlying concepts on how to intergrate compute with your renderer is pretty straight forward, but making it look good
i just have no clue
when it comes to compute, I literally have no idea what Im doing.
i really need to up my ability to interpret those books you sent me
i just cant with all the equations lol
I cant even read those. Dont tell anyone
I need to read (pseudo)code to grasp what is going on
yeahhh same....
i want to adjust it but can't
well I can in some cases, but if I want to change how something actually "behaves"
it just becomes a reallyyy bad time
this is one of the reasons I actually want to get a masters degree
my hope is that I can gain the knowledge to read academic papers there... (which hopefully helps in gaining understanding on how stuff actually behaves, like why does some random equation give me pretty pixels..?)
it takes a bit of practice. But sure it cant hurt
yeah defo
In the old days I spent 4 months dissecting a single paper. word for word to implement a software rasterer for occlusion culling
also dude, i wanna thank you again for helping me get into graphics programming all that time ago
jeeeeeez
damn it looks great
I don't think I've seen multiline yet? x)
I think this was 2005 or thereabout
!B, I love you, I hope you know that. But lemme tell u something: FUCK YOU!
AHAHAHAHA
you have so much cool shit saved, genuinely
I didn't even know ogre has been around for that long, jeeeeezusss
multiline is for future daz to tackle
who needs multiline text anyway
Ogre3d is ooold
didn't roblox used to use it? lol
my favourite game used to use ogre too
also i think so yeah...
π
I have a habbit of creating and saving screenshots of shit I did
Im a little show-off and you need content for that
did you do a haxe 3d engine before cortex?
sure
awesome!
do you sometimes randomly go thru all the screenshots to feel the nostalgia? xD
the first iteration actually run on top of openfl and hijacked the opengl context
it all kinda evolved out of my flash days
for sure π
@random cedar actually knows. He was there π FGL β€οΈ
did lime not exist yet?
I think the first iteration of lime was being worked on
fun fact: in my flash days I wrote a 2D editor which was 3D under the hood. It will get a new coat of paint for cortex. the core and logic will basically be the same
blast from the past
I grew up with these
yeah defo, wasn't this like the standard back in the day?
tbf, if i was an actual game designed I would probably prefer the older editors
brushes and baking everywhere
I utterly despise the unreal editor
i mean to be fair, it has held up really well
especially 2011 era games (like portal 2)
baking was soo annoying
although the source engine (and derivatives) has done a great job of looking great even in modern times
im talking 1999-2008
Titanfall 2 is another good example of the source engine blessing a game
well hey, free room heater
Thing is, brushes were quickly replaced / augmented with meshes once unified lighting models came along
These days I dont care anymore. I just model stuff in blender and my editor will be used for arrangements and gamelogic
i mean if it works it works\
brushes can force a certain aesthetic (clinical blocks, also no holes allowed, shit has to match geometrically perfectly). esp if you dont have advanced manipulation capabilities. See the difference between source 1 & source 2.
There is an elegance to it, for sure
Ceramic does have multiline text input, but it doesnβt have the scroll (yet)
Thanks @clear dome , I almost forgot that Ceramic exists! π€£
Regardless, all your work looks very cool π
Ok, at this point im pretty much re-implementing shadcn ui components π
ofc I wont rewrite the react madness, but instead do it old-school:
class DropdownMenu extends Control {
var ctlTrigger:DropdownMenuTrigger;
var ctlContent:DropdownMenuContent;
public function new(_config:DropdownMenuConfig) {
super(_config);
this.addListener(Added, _onAdded);
this.addListener(FocusIn, _onFocusIn);
this.addListener(FocusOut, _onFocusOut);
}
override public function dispose() {
this.removeListener(Added, _onAdded);
this.removeListener(FocusIn, _onFocusIn);
this.removeListener(FocusOut, _onFocusOut);
}
function _onAdded(_evt:Event) {
if (_evt.phase == Bubble) {
// something was added, check if it was one
// of our companion controls and grab them
switch (_evt.target.tagName) {
case 'DROPDOWNMENUTRIGGER': ctlTrigger = cast _evt.target;
case 'DROPDOWNMENUCONTENT': ctlContent = cast _evt.target;
}
}
}
function _onFocusIn(_evt:Event) {
if (_evt.target.parent == ctlTrigger) {
// we focused something inside the trigger
if (ctlContent != null) {
// position the content
// TODO: check available space and position accordingly
ctlContent.style.left = VDimension(PX(ctlTrigger.left));
ctlContent.style.top = VDimension(PX(ctlTrigger.top+ctlTrigger.height+5));
// show the content
ctlContent.addStyleClass('show');
}
}
}
function _onFocusOut(_evt:Event) {
if (_evt.target.parent == ctlTrigger) {
// whatever in our trigger lost focus
if (ctlContent != null) {
// hide the content
ctlContent.removeStyleClass('show');
}
}
}
}
uhlala
I wonder who will make haxeui-cortex
Yes I was and yes I do you mad man
What is this, where am I π
Daz already has
welcome to my little thread about the engine im building and general coding goofery
... Can I use it?
I wrote a first integration last year(https://github.com/cortex-engine/haxeui-cortex/tree/main). But I almost died (emotionally) when looking at textfields and cppia compiletimes (heavy macros). In the end I decided to roll my own UI system to make shit work more consistently and keep my iterations fast.
Eventually someone could revisit this but Im not sure if it would make sense.
oh wow, that was a year ago
i guess the idea would be to map haxeui to your eventual implementation, @void condor , to facilitate easy migration of apps from other backends to yours
for me just seeing a working text box makes me want to change from Heaps to Cortex
it actually sparked that whole tracy adventure since I was getting mixed performance signals from that integration π
haha, yeah I totally get that. it would just be a sidequest that I cant commit to for the moment. Still many things left to solve for my mainquest
ceramic's textbox has a pretty decent base
and additional things are possible to add, i've added them locally but just not correctly π
if you are feeling brave you can try and port the kha / raylib textarea to heaps, i feel like i looked at it, and thought it was possible but i dont know enough about heaps to really try (example of kha version: https://haxeui.org/shared/kha-textarea/ ) [[ https://github.com/haxeui/haxeui-kha/blob/master/haxe/ui/backend/kha/TextField.hx ]]
Where is the mouse selection though? π </troll>
The haunting soul drain again π
π ... ... i dont get what you mean tbh (not enough, or more likely too much coffee on my part π )
there is literally nothing more life- & soul sucking than code for a textedit
ha, gotcha... 100% - its not really code ive EVER wanted to look at again... and its not RTF (as i think the Cortex version would / could be?)
like its a single font, single color, single size type of deal
Not in this video but thatβs there by default
Ceramicβs online samples with the debug UI have it, for instance
Double click should work too
Btw I donβt know how you architected that exactly, but I separated text selection from text edition, so you can make text selectable without having to make it editable, these are two different things
the kha one chunks the text into multi color etc in rendering
double click works as well, yes
also single font is the way it should be π
wdym? I wrote the kha one... it doesnt handle multiple colours - just selection
nobody has fun writing richtext editing
rich text would be cool to have, i'm not sure if ceramic textbox can handle that though, it seems to attach to a single Text object
then what is this about? https://github.com/haxeui/haxeui-kha/blob/master/haxe/ui/backend/kha/TextField.hx#L1110
yeah, thats just selection
Seems like a pain to implement yeah
thats the only "colour change" that can happen - except for the defaults ofc
I call this multi color
haha, fair enough... lets go with that... 
white text in the middle of black text
Iβd like to make the Text object more extensible via components at some point, but low priority
my selection is rendered additively onto the text
yeah, it's mostly a nice to have, haxeui xml/css makes covering this use case quite easy
today is bugfix day, lots of subtle fixes. I had some issues with text alignment that are all fixed and I also added some more eye-candy like font oversampling. It's not on the level of sdf but already much more pleasant
next are issues&review of alpha, scissoring, z-index & mousepicking. Found some interesting edge-cases that will get nuked away now
Then we are finally 90% in ui component land and I can build some crazy widgets
What you've shown is crazy enough already, nice job man
BTW, How do you handle tooltips in cortex-ui?
atm I dont have them, but once I add them, they'll use the same setup as the dropdowns: simple logic container with fixed position and high z-index
but I will prolly just ape this: https://ui.shadcn.com/docs/components/tooltip
why u asking?
because the dropdowns reminded me of them and I recall you having a debug overlay and having something that sorta looks like tooltips
So is this a full blown framework in it's own right? like a new (better :P) OpenFL / NME ?
pretty much. it does a couple of things different though. Like main focus on c++20 native target, fully integrated ui solution, unified modern 3D & 2D capabilities(vulkan, metal, gl(es), dx11/12), multithreading, ecs, statecharts, completely different resource management, automatic asset baking & hot-reloading ...
oh, and CPPIA out of the box
most libs/externs can be used via cppia, so you can keep the app running, compile 2secs and see it auto-reload
and once you are done it folds all code into a clean optimized native build
aaaand another thing it does different: the whole project is setup as a monorepo with with multiple apps optionally sharing packages & assets while all dependencies are vendored in
at this point I think I can write a book
C++20?
Any specific reason why?
C++17 is pretty outdated nowadays\
C++14 is more outdated
And isnt hxcpp based on C++11?
Meanwhile, shipping c++11 and binaries built with vs2012 because some clients need it 
I'll probably never really use Cortex, but it will be interesting to see how it unfolds and how things work under the hood
Yea I see it's the oldest version it can support
I normally use c++17
But recently I've started using c++20
Originally for getting a stupid lib like this to work
some of my dependencies need it, like https://www.yogalayout.dev
others like bgfx will also start to move slowly towards it
what the heeeell
there is even an old tumblr with the early beginnings https://developium.tumblr.com
Sounds fantastic, if I wasnt using Unity now i'd probably jump on board
No you wouldnt π
btw, how much you paid for Unity so far? And how's the new racer coming along? Any cool footage/screens you wanna share here?
waaaaah
found a nice cleanup issue in the ui. also had to introduce stackingcontext marking
zero-sum game π
ok, last thing I need in the core is the transform-origin directive
I swear, it's little details like this, that will make some awesome user-experience
At this point im almost straight up copy and pasting the shadcn markup into my xml macro... First iteration of Select done π
wow that's awesome
thx!
re-implementing the barebones essentials of DOM + CSS is finally paying off.
<Select>
<SelectTrigger>
<SelectValue class="outline" placeholder="'Select a timezone'"/>
</SelectTrigger>
<SelectContent>
<SelectGroup>
<SelectLabel>North America</SelectLabel>
<SelectItem value="'est'"><span text="'Eastern Standard Time (EST)'"/></SelectItem>
<SelectItem value="'cst'"><span text="'Central Standard Time (CST)'"/></SelectItem>
<SelectItem value="'mst'"><span text="'Mountain Standard Time (MST)'"/></SelectItem>
<SelectItem value="'pst'"><span text="'Pacific Standard Time (PST)'"/></SelectItem>
<SelectItem value="'akst'"><span text="'Alaska Standard Time (AKST)'"/></SelectItem>
<SelectItem value="'hst'"><span text="'Hawaii Standard Time (HST)'"/></SelectItem>
</SelectGroup>
<SelectGroup>
<SelectLabel>Europe & Africa</SelectLabel>
<SelectItem value="'gmt'"><span text="'Greenwich Mean Time (GMT)'"/></SelectItem>
<SelectItem value="'cet'"><span text="'Central European Time (CET)'"/></SelectItem>
<SelectItem value="'eet'"><span text="'Eastern European Time (EET)'"/></SelectItem>
<SelectItem value="'west'"><span text="'Western European Summer Time (WEST)'"/></SelectItem>
<SelectItem value="'cat'"><span text="'Central Africa Time (CAT)'"/></SelectItem>
<SelectItem value="'eat'"><span text="'East Africa Time (EAT)'"/></SelectItem>
</SelectGroup>
</SelectContent>
</Select>
that's the dom. the individual elements might extend that with some internal stuff but nothing u as a user need to care about
the general rule of thumb is: Build the hierarchy of elements in markup, have the elements deal with events and logic basically.
The actual visuals, transitions & animations are all defined in CSS
HSS for the select content:
selectcontent {
position: absolute;
z-index: 5;
padding: 2px;
flex-flow: nowrap column;
opacity: 0;
background: $bg-primary;
border-radius: $border-radius;
border: 1px solid $txt-secondary;
filter: CSS("drop-shadow(1, 45, #000000, 0.75, 6, 1, 30, 35, false)");
transform: scale(0.5,0.5);
transform-origin: left top;
transition-property: opacity, transform;
transition-duration: 0.25s;
transition-timing-function: cubicOut;
&.show {
opacity: 1;
transform: scale(1,1);
}
> selectgroup {
flex-flow: nowrap column;
flex-shrink: 0;
> selectlabel {
padding: 8px 6px;
> span {
font-size: $default-font-size * 0.9;
color: $txt-secondary;
}
}
> selectitem {
padding: 8px 6px;
border-radius: $border-radius;
flex-direction: row-reverse;
justify-content: space-between;
gap: 10px;
> .square {
width: 15px;
height: 15px;
}
&:hover {
background-color: $bg-secondary-hover;
}
&:checked {
> .square {
background-image: embed("../img/checkbox_white.png");
}
> span {
color: $txt-active;
}
color: $txt-active;
background-color: $bg-secondary-hover;
}
}
}
}
super easy workflow once you combine it with hot-reloading
OOOHHHH
That looks super interesting!!! https://github.com/giabao/tinyui?tab=readme-ov-file
This could actually replace my shoddy macros
You have no idea how mind-blowing this screenshot is to me.
and if you dont understand what's going on: this is an intact ui hierarchy with items like the select-content popping out of layout via z-index, automatically adjusting itself to available screenspace, activating the built-in scrolling all while nested in other overflowing controls all while event handling just does its thing all while the rendering correctly stacks depths, zindex, clipping&scissoring ... π€―
omg
just realized we inherited support for mediaqueries from haxeui styles... I have to wire that up at some point
would instantly solve all the resizing bullshit with different resolutions
you know you reached peak ui programming insanity when you comfortably pick stuff out of transformation matrices to do some calculations
and then you delete everything again bc you realize you dont need fancy math
this is why im just gonna use imgui
*for debug stuff, i'll have to do ui eventually for lumina
why though, It's such a great learning experience
sounds more like trial by fire
it isn't that bad, even if it was, you'd still learn from it :)
I can imagine the satisfaction of seeing all the moving parts finally working together π
totally
how much time are you developing cortexui
in general
I spend most of my freetime on it and the engine. depending how much energy I have left after my job
last 2 weeks I spiked bc I have vacations π
most of the haxe stuff I use in cortex is stuff I wrote over the last decade remixed into a new form
that unification I started sometime last year
anyway, I reached all my milestones... now I sorta feel empty
arriving at that textfield, dropdown & select I can finally build my tooling
funky feeling
I can relate to that feeling as well, when finishing a big milestone
This is basically how my stack is, multiple iterations of various forms, current form is just the best outcome so far
Thinking about adding this to my UIMacro
I have been very tempted to completely rewrite my chart stuff recently, It can do pretty much everything I need, it's just not very organised to integrate with
xD
i have no idea if this is where i'm supposed to talk about this
but i'm trying to use linc_filedialogs for something made with haxeflixel (specifying that if it matters at all) and it seems to be throwing cpp errors:
Error: ./src/funkin/CoolUtil.cpp: In static member function βstatic Array<String> funkin::CoolUtil_obj::showOpenDialog(String, String, Array<String>, Dynamic, Dynamic, Dynamic)β:
./src/funkin/CoolUtil.cpp:834:26: error: βpfdβ has not been declared
834 | HXLINE( 327) pfd::opt option = pfd::opt::none;
| ^~~
./src/funkin/CoolUtil.cpp:836:33: error: βoptionβ was not declared in this scope; did you mean βoptindβ?
836 | HXLINE( 329) option = pfd::opt::multiselect;
| ^~~~~~
| optind
./src/funkin/CoolUtil.cpp:836:42: error: βpfdβ has not been declared
836 | HXLINE( 329) option = pfd::opt::multiselect;
| ^~~
./src/funkin/CoolUtil.cpp:847:53: error: βlincβ has not been declared
847 | HXLINE( 335) ::Array< ::String > files = linc::filedialogs::open_file({
every error past this is just unrelated stuff breaking because of the stuff above breaking
the code i'm using that's failing is just this:
#if linc_filedialogs
var option:Option = Option.None;
if(multiSelect)
option = Option.Multiselect;
final goodFilters:Array<String> = [];
for(type in filters)
goodFilters.push(StringTools.replace(StringTools.replace(type, "*.", ""), ";", ","));
final files:Array<String> = FileDialogs.open_file(title ?? (multiSelect ? "Open Files" : "Open File"), initialPath, goodFilters, option);
return files;
#end
how do i fix this ??
searching in the generated cpp code it seems like it's not including any of the headers
hmm, interesting
if you open the lib on disc, open FileDialog.hx and add @:include('linc_filedialogs.h') above every @:notNull you find and test again
which haxe / hxcpp version do you use?
haxe 4.3.7
hxcpp 4.3.2
still throws cpp errors, but different ones this time
Do you have -D HXCPP_CPP11 set?
...apparently not
i thought maybe lime would've already done that, but i guess i'll do it myself
oh!
pull again
i will when i get back from the store lol
not all enums had the include and that prolly is the cause. I didnt detect that since I used the icons which had it
Any of my libs can be freely discussed here.
BUT you will have to pay a mandatory tribute in form of cool screenshots or clips in which you use the libs.
fair trade
just remembered an old trick in nanovg and now we can have tinted image fills! π
that will make skinning ui soo much easier
oh yeah slightly unrelated this error comes up, had to comment it out myself to get it compiling any further
Error: /mnt/B64005D340059AEF/Refresh/Programming/Haxe/- HaxeFlixel/FNF-Troll-Engine/.haxelib/linc_filedialogs/git/linc/linc_filedialogs.cpp:3:10: fatal error: ./linc_filewatch.h: No such file or directory
3 | #include "./linc_filewatch.h"
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
this file isn't anywhere in linc_filedialogs
so
it's referencing a non-existent header
after pulling and fixing that line, i get this
fix coming
that's a copy and paste error, I have that header in my project, so didnt notice
fair
after removing that the latest commit doesn't help anything here
it no longer thinks the uh
pfd
it no longer thinks that doesn't exist
but now it's erroring for other reasons now
pull
i tried defining it but it didn't seem to do anything
as in the define wasn't actually defined
i'm testing latest commit rn
i think this is the exact same error log as i just sent but i'll send it again just in case anything's different
hxcpp error logs are so hard to track down to what's really happening π
the filewatch thing was fixed so
updating haxelib did work
i did notice there was no haxelib json
i don't know if that'd be an issue
but it could be since i recall having issues with using haxelibs without a haxelib.json file
no
your code is triggering an error
you should create a simple test app where you run the sample included in the readme
if that works then you do something in your funkin-thing that was not intended
i'll go do that with a basic hxcpp project since those don't take long to comiple
./src/funkin/CoolUtil.cpp:892:1: error: mixing declarations and function-definitions is forbidden
892 | , initialPath, goodFilters, _options);
| ^
./src/funkin/CoolUtil.cpp:892:3: error: variable or field βinitialPathβ declared void
892 | , initialPath, goodFilters, _options);
| ^~~~~~~~~~~
./src/funkin/CoolUtil.cpp:892:16: error: variable or field βgoodFiltersβ declared void
892 | , initialPath, goodFilters, _options);
| ^~~~~~~~~~~
./src/funkin/CoolUtil.cpp:892:37: error: expected initializer before β)β token
892 | , initialPath, goodFilters, _options);
wait a minute
goodFilters is not my code
hm
why are those variables being declared as void
they aren't ??
wait
hold on
i might have to cast them because i noticed they are technically makred as dynamic
i'll still make a test project
even the simple test app is failing
the weird part is it almost finishes
show your hxml
-cp src
-D analyzer-optimize
-main Main
--library linc_filedialogs
--define HXCPP_CPP11
--cpp bin/cpp
with or without HXCPP_CPP11 doesn't make a difference
unless i typed it wrong
nope HXCPP_11 doesn't make a difference either
no this time it didnt compile the lnc_filedialogs.cpp and you are missing the o files
seriously no clue what you are doing there
i don't have any clue how this could even happen
i didn't modify any of the library code, just straight from latest git
the actual main file is as you suggested, just copied from the readme sample
it failing on the main project could make sense, i might be doing something very wrong without realizing
but this is the simplest case i can test with
would it help if i sent my test project over as well?
I think I have the issue, I can isolate it, but Im not sure I understand it since it behaves completely different in cortex
comment the #define PFD_SKIP_IMPLEMENTATION 1 in linc_filedialogs.h
I think I may have misunderstood how to use it correctly. the implementation gets compiled into the unit of the cpp file but that was enough for me. super weird
again, test it, im gonna reflect on it and try to make it break in cortex and then I can supply the fix and test
i commented it out, and for good measure deleted the bin folder, now this happens (on the same testing project i made earlier)
everything up until this point goes as normal
- src/hx/gc/Immix.cpp [haxe,gc]
- src/hx/Lib.cpp [haxe,static]
- src/hx/StdLibs.cpp [haxe,static]
- src/hx/Debug.cpp
- src/hx/gc/GcCommon.cpp [haxe,gc]
- src/String.cpp [haxe,hxstring]
Link: Main
Error: Could not find build target "of"
Error: Build failed
i haven't changed the hxml at all since
i'm confused on whether or not it succeeded
it didn't seem to generate any nasty cpp errors after linking
haxelib run hxcpp cache clear
WAIT i think i realized why
i just remembered it doesn't like folder names with spaces inside of them
this helps with header code sometimes not working
did not know this was a thing
Error: HXCPP_COMPILE_CACHE is not set
oh ok, dude, learn about the cache and set it, it will supercharge your native compiletimes
despite the random error at the end, it works now
i think it just doesn't like the folder name that the project resides in
...
it usually spits that error out when there's spaces in the name
which is weird because it usually still compiles fine despite that
seriously for a sec I thought you were using vista
hmmm
so the test project works with this change now
i wonder how much this would do for the other project
im not pleased. ok I will commit that change and my test and then you can continue and I need to check wtf is going on with that define
pushed
other project is still failing
i'll have to find out what the hell is going on with my code then
kk
it's really strange because this is the code in question
this doesn't look like it should be going this wrong
i tried putting the title into a variable because at some point i was just trying stuff in hopes of it maybe working π
either way it made no diff
wait
no
i can just delete the export folder and it Should work
wrong reply damn it
lol
title ?? "Save File"
move that out of the call
final filePath:String = FileDialogs.save_file("Save File", initialPath, goodFilters);
have fun
also filters can be null and will crash if you loop it
@tired ember ^
i realized both of these shortly before this most recent compile
it's compiling right now, hopefully it works
added support for hss conditional compilation. allows easy an setup for independent light/dark themes
yay it works
i misinterpreted what the initial path argument meant
i was trying to give it a default file name which i don't think is possible?
update: it's only wanting to work on my machine apparently ??
what ???
this is only happening on windows specifically as well which is even stranger because i got it working on windows
ooh wait i think i might've figured out what's happening here
shell32.lib isn't being linked
after adding a thing to link shell32.lib (along with a few other things just incase)
to Linc.xml() it worked
makes sense, I wasnt able to test everything under windows. PR welcome
ill pr this asap
save dialogs also appear to just Not Open at all on windows
and they return an empty string
oh, why patch the haxecode, you could have just added it into the linc_filedialogs.xml
i don't know actually, just fixed that
do you know which libs are a hard requirement?
i know shell32 was one of them, i didn't want to deal with more potential errors so i added some extra
on one hand, i can go back and remove the unnecessary ones but
on the other, i don't want to deal with windows right now
my pc genuinely hates being on windows π
i think one of them was also related to dialogs
ok, I think userenv is also required. I pull and clean up a little
i don't remember which
fun with styles & themes
warning: flashbang
It's soo nice how easy working with bgfx is
I've heard bad things abt bgfx
Something abt buffers and the build system
i hope not π₯
skill issue is the best kind of issue tho
cortex in browser confirmed π
at one point I gotta check how this whole preloading stuff works with a slower connection
But this working gives me huge confidence
Awesome!!
_if it doesn't start, it doesn't crash
_
In this house here we dont crash
wow, the udprotean lib works soo nicely
ok, what a night
Finally I have a pretty good idea of what will be the first shippable project. For my editor architecture I opted for a 2 app setup, editor + game. They need to connect to eachother and exchange state and cmds. But since I have no idea how some shit is about to go down I decided to start smaller. Instead I will focus on statecharts first. I want to review and monitor them live in my projects...
maybe @crystal grove wants to do that as well? π
So, how about we take a page out of tracy's book and setup a debug-module that can be included with any project that uses my statechart lib, make it use fast udp networking and have a second app, a statechart debugger that connects and pulls all the data for visualization? This debugger can serve as a prototype for the real editor and I get to dog-food basically everything about cortex and put it through its paces!
Soooooo I decided to start hacking! I ported most of the stuff I had in HxGodot to cortex and improved some things along the way. It's still early but it fucking works already very well. Left is the game running with the debug-server, left is the connected debugger that currently shows the 3 types of active statecharts in the game. No realtime updates/animations yet since I gotta think on how I visualize all the active instances (can be a lot) π
This is better than me putting trace() in every single state transition
The best thing: the debugger will automatically layout ANY statechart into a nice graph
Here it is connected to the ui-demo app
What's even crazier is coding the server and the client at once. With the cppia reload this feels a bit unreal. The monorepo setup was really worth it
Another cool aspect is that I could record/log events & transitions and couple it with tracy, allowing deep debugging of the logic and the code
You said any project, so this can tie into js and others?
udprotean has been on my to try list for years
it looked like such a good lib when i first saw it
I've used it before, worked wonderfully
idk if this is the right place to ask this but i tried cloning the submodules for linc_bgfx but it kept failing with Please make sure you have the correct access rights and the repository exists.
It is
the submodules are public but use ssh links (https://github.com/dazKind/linc_bgfx/blob/main/.gitmodules)
I guess if you dont have GH credentials then you cant clone that way
i see
hmm I might change that over the weekend, in the meantime you can change those git: uris to https and init the lib that way
alright thank you very much π«‘
lemme know how your adventure goes!
will do :D
Probably better to use https urls for submodules indeed
while attempting to compile the test provided, i get this error C++17 standard support is required to build.
is there any flag i can pass to make it use it or something similar?
Just use -D HXCPP_CPP17 in your hxml
thank you :D
I think I forgot to add that in the test
that test is super old, I hope it still works
checking, 2 secs
oh yes, that test is from before I refactored most of the externs. 2secs, fixing everything
alrighty
ok, pushed
Since samples are rare, this one is on the house:
https://gist.github.com/dazKind/ac9f1ce0ec28575ad03119cf9b7f8626
if you lack shaders, just grab the ones you find in the bgfx samples or compile your own
looking at it, Im kinda glad that cortex abstracts most of that stuff away
having added yoga for the flexbox model is paying such huge dividends
thank you!
hmm, that's weird
I guess it has to do with how bgfx deals with the __cplusplus definition
To enforce it you can uncomment the following lines:
https://github.com/dazKind/linc_bgfx/blob/main/linc/linc_bgfx.xml#L219
https://github.com/dazKind/linc_bgfx/blob/main/linc/linc_bgfx.xml#L394
at some point I will need to review the whole define setup to make sure everything is fed everywhere correctly. On my end it works and is defined by hxcpp, but im running linux, so maybe I missed something for windows
compiling multiple cppia apps in a networking setup at once is such fun. not needing to restart server/clients and reconnecting is such a time saver π
im on linux as well π
so i think uncommenting those wont help
muahahaha
ohhh bgfx received lots of good updates. they finally exposed the vulkan max descriptorsets config
instead of lod'ing my ui I can now just 10x that and throw an amazingly unresponsible amount of draw calls at vulkan
lol, ok, that works like a charm... I BET YOUR UIS CANT RENDER WITH LIKE 3K DRAWCALLS!
dude, I have literally no idea what you are doing there
What linc_sdl bindings does the bgfx test use?
I tried the ones at snowkit but fails to compile
oh boy, dont use that
http://snowkit.github.io/linc/ Haxe/hxcpp @:native bindings for SDL - cortex-engine/linc_sdl
i think i got all the build steps done for bgfx
anything obvious missed here?
a define
try to add this define
lemme check if there are other changes that sdl needs and I havent moved out of cortex yet
ah yes
2 secs
pull that linc_sdl again
had to rip out that nativetoolkit shit
the config should now be included correctly and the bgfx test compile just fine
all this shit is precisely why cortex is a monorepo now and vendors everything. most stuff is soo bleeding edge that you end up having to modify 3-4 libs just make things work like they should

top!
Ah yes, I know that feeling and 100% agree
(I didnβt go as far as mono-repoing Ceramic but still totally understand why someone would do that)
So i see the test stuff has a lot untyped code in it - I'm assuming that's all necessary for the foundation to work?
the SDL_SysWMinfo stuff? yeah, it's stuff that even linc_sdl didnt expose properly.
depending on which platform config header gets included/setup, that struct's union will change and include different stuff
other than that, these are standard display/window pointers that bgfx needs to setup rendering contexts
Wasn't SDL_syswm.h removed in SDL3
hmm here is a discourse link https://discourse.libsdl.org/t/sdl-sdl-syswm-h-has-been-removed-and-replaced-with-window-properties/47246
From fd4a2cce9effc2cc5a69c4bd6fdc4622794ebf23 Mon Sep 17 00:00:00 2001 From: Sam Lantinga <[EMAIL REDACTED]> Date: Tue, 7 Nov 2023 14:38:19 -0800 Subject: [PATCH] SDL_syswm.h has been removed and replaced with window properties --- VisualC-GDK/SDL/SDL.vcxproj | 1 - VisualC-GDK/SDL/SDL.vcxproj.filters | 3 - Vi...
and? who said im using sdl3?
hmm, this is soo much better than I had anticipated. packaging the desktop assets and hooking them up as a preload is super straight forward
@void condor If I wanna make a framework that's cppia "compliant" are there any patterns to avoid (outside of externs) Things like globals, singletons... common patterns like that, are they fine?
no special required. jsut make sure you have proper init / shutdown capabilities
ok, I think I finally have an idea on how I wanna tackle releasing cortex
the idea is roughly to have 2 versions of the engine, a community edition and a hidden one that I use
in terms of licenses, the code will be clustered into different areas with different licenses
first of all I wanna retain & respect the original sources(in case where i pulled something or I use a library fork)
the rest of original cortex's code might dual licensed, meaning the community edition will be a FOSS one and the hidden one might/can get a different license if there is any interest
Is the hidden version purely a licensing thing, or more like a dev/bleeding edge/donβt look over here kind of thing?
both. I wanna have the possibility of custom commercial licensing as well as custom stuff that should only be relevant to me
So, here is something fresh: Since we consider CSS files in cortex' UI system as kind of an assetpack, that "styles" a hierarchy (layouts, colors, fonts, (animated) visuals, ... etc) I thought it also kinda made sense to include sound-effects!
yeah, super easy addition with big impact
oh man this is great
[showcase] After quite some time, cortex has its audio backend back in action. So I decided to do something fresh: In cortex' UI system we consider CSS files as a kinda assetpack, that "styles" a hierarchy (layouts, colors, fonts, (animated) visuals, ... etc), how about we add sound effects via CSS as well? Said & done! Turns out it feels good! π
iirc you got debugging working with hxcpp - what method did you use? a native debugger or were you able to map to use source maps and debug the haxe code?
i debug native only
This class provides some utility methods to work with strings in macro
context.
waah, ok I wrote two macros that convert an existing extern to json and the other converts that json into a new extern with all the cppia tricks
lol what
had to make hxraudio cppia compatible
Another interesting observation: Ever since I switched to a monorepo, I experience less mental friction when it comes to dependencies or incremental refactors since I stopped worrying about branching&updating various parts of the codebase. Instead, after a fun weekend coding, I have this new sunday morning routine of going through, sorting and commiting a shitton of changes
Some developers would get instantly mad at this, but I think it mostly boils down to whatβs important in your workflow. For a solo project like Cortex, it seems to perfectly make sense. People often see problems they had in their own context, and project that to your own without much thought
thing is, even the best libs come with assumptions and these impose constraints. most of the time these constraints get in the way of solving things the "right" way(context sensitive). Solo project or not, doesnt matter, happens either way. Think of !Billy and the ceramic textfield. if you throw away these artificial shackles things get a lot more, shall I say, fluent / productive? It's essentially all about embracing the forks π
though Im interested about the "getting mad" part. In your opinioin, why would anyone react like that?
Oh sure, recently I forked LDtk to add something that will unlikely be merged back to main repo, which is ok, « embracing the forkΒ Β» as you say π
Iβm mostly thinking about the « good practicesΒ Β» that professional developers have a tendency to enforce, even on contexts they are barely relevant. In the case of monorepos with forked third party libs, some might get scared very quickly of « going out of syncΒ Β» from the « officialΒ Β» dependencies, because thatβs the opposite of what they may be used to do, or what they might have learnt at school. But itβs all about context and knowing what are the costs and the benefits of what you are doing anyway
As far as Iβm concerned, Iβm generally used to fork and modify open source dependencies, because I accepted that in many situations, those libs authors didnβt need what I need, which is ok, they have been nice enough to share their work as open source for anyone to continue from there however they want. So, « avoiding the forkΒ Β» at all cost is somewhat silly to me, but I have seen that mentality a lot in my career
β¦ and having a monorepo with less and less different git dependencies/submodules is definitely compatible with forking for your own needs π
And regarding this, I see Ceramic the same way. I canβt anticipate how other users might want to use it, but thatβs ok, anyone can fork it, really
(And by the way, I could really see the benefit of removing some layers of git submodules toward something more monorepo-ish, to make that even easier)
I've experienced this as part of developing my app, constantly managing where things go where, trying to keep track of things properly and in the end my side libraries were all tied up anyway
Unnecessary mental effort for no reason in the end. Better to just not be organised and do it wrong, then when it's clear go back and refine. That's how I'm currently looking at the 'better approach' now anyway
Thatβs what I do now: any utility I create is specific to the project that needs it. No need to make it generic, just make it work for the purpose you need right now. If later it makes sense to extract it to make it a more standalone/generic utility, all the project-specific work done beforehand will be very useful. Exceptions to this are projects I know from the start will be used in multiple projects and are large enough to be their own thing. But even Tracker lib first started as a thing that is part of Ceramic. Only at a later stage I decided to make it a separate project, because I needed it outside of Ceramic
does cppia naturally have a leak or is it my externs? π
running through valgrind (first time) and i'm not sure the leak are my externs π€
i've also got socket stuff in here which has nothing to do with me
every reload creates a new set of types. these types are versioned and on top if you dont clear all instances you keep old code around/active on top
define "leak". if the gc keeps a dead memory pool around that is supposed to be reused do you consider that a leak? Not really
around .1mb every 1 minute
==73594== LEAK SUMMARY:
==73594== definitely lost: 44,466 bytes in 586 blocks
==73594== indirectly lost: 343,420 bytes in 4,473 blocks
==73594== possibly lost: 6,146,296 bytes in 4,053 blocks
==73594== still reachable: 19,292,983 bytes in 24,235 blocks
==73594== suppressed: 0 bytes in 0 blocks
``` from the valgrind run
Switch on the GC telemetry and ask it what it is doing and correlate that with valgrind. Tracy memory profiler can also help isolating addresses / objects
ohhhhh guess i have to recompile tracy π
forgot memory profiling was available there
the question is if you see a saw tooth in your memory graphs or not. You might observe there how the gc grows/manages it's budget according to your usage
Error: In file included from ./src/cpp/vm/tracy/Cppia_TracyProfiler.cpp:6:
/home/j/Documents/Projects/cpp/MyProject/haxe_modules/hxcpp/include/hx/TelemetryTracy.h:9:10: fatal error: /home/j/Documents/Projects/cpp/MyProject/bin/obj/linux64-debug/__pch/haxe/hxcpp.h: No such file or directory
9 | #include <hxcpp.h>
| ^~~~~~~~~
I compiled latest tracy which is 0.12.2 and it looks like haxe ships 0.12.0 - I'm guessing that's what the issue is here?
lol silly question, they're completely detached at this point π
waaaaahhh
I was soo bummed out that there is no linux version of https://www.rigzsoft.co.uk/timelinefx-alpha-version/
turns out I can add it to Steam as an app and force proton as compatibility layer
wow, the dude invested a shitton of time into this. every sample comes with indepth explanations and if you click on the hyperlinks the ui will slowly transition over to show you the setting
Ok. I loved the original version but this is A LOT better and offers 3D effects. Now that he has opensourced the c-lib for loading and running these effects together with a sample vulkan renderer + shaders I might just try to port this to bgfx and have this as particle effect solution in cortex
I'm trying to run my app through lldb and for some reason the cppia script doesn't run but host boots up
same thing occurs when trying to run through gdb
have you had a similar issue at all?
depends on what exactly you are doing
I always run the host, since it loads the script. And I can step through the execution. You might wanna explore the DBGLOG macro since it will print all kinds of useful infos about your script-execution
this is gdb used through https://github.com/epasveer/seer
App was crashing on the client side, so I wanted to catch the error so I ran gdb Main-debug(host) and app booted without loading the script
also, with your native externs, you have the cppia side and the the non cppia side, how do you create an api that is identical between cppia and normal hxcpp? do you have an additional layer of wrappers in cortex?
Ohhh, i think I might understand, in the native api we use cpp.RawPointer for our method params, returns etc and then we can use Pointer.fromRaw in the cppia wrapper?
Do i have the right idea here?
hmm... not sure that's correct either
@ionic badger There isnt really anything special. It's all in my bindings. If you want we can hop on a call + screenshare and we take a look what you doing
for real? π
I don't think i'm that far off
aahhhhh i think i might have just found it
sure, I like puzzles
you take in cpp.Star for where things want cpp.Pointer
I'm good with a call either way, I have a funky puzzle going on π
where you wanna do it?
i'm gonna be around 5 or 10 mins, just sorting out some meal prep
kk, then I have a quick smoke as well
do you happen to have a workflow for developing cortex within cppia? because i'm assuming it gets compiled into the host, is there a way to still get hotreload support?
cortex is only partially compiled into the host
only the low-level parts involving externs
all other stuff is in the script
ohhh very smart!
ahhhh, i think some of my things are importing things into the host by proxy :/
I move stuff gradually over to the host as it gets finished
Ohh, I guess I can do App init on the client can't I π€ My current setup had a simple cppia reload script built into App init if scriptable define is set
Wanna see something funny?
I was wondering what happens if you combine lighttpd (webserver), CGI (old but good) and cppia?
well, you get an interesting base for a webframework
I wonder what happens if I juice this up with some macros, htmx & tailwind
although, fuck tailwind π
what's the perk of cppia and Web dev? can't you hot reload js?
in this case it's not about hot-reloading. it's about 1000x reduced complexity and server-side native runtime speeds
it's like a lightweight php
also js is banned/illegal in this framework aside from what htmx offers
can probably use interfaces to remove more library code from the host π€
@ionic badger and it leverages the events, anytime a child resizes we make sure our anchor at the bottom of the console log is in view:
scroll.addListener(Resize, (_evt)-> {
if (_evt.phase == Bubble)
anchor.scrollIntoView();
});
hmmmm, still contemplating on how I wanna have my workflow between game and editor look like
architecture-wise it makes sense for the game to have some editor capabilities, like you need to toggle debug vis and you want to interact with and inspect some stuff
guess I focus the whole asset handling first
Special thanks to Jay Stelly who originated the terminology used in the video.
nah im deleting my messages now, other people need to joy of hearing this without any spoilers. This video is too insightful
good call π
WTH xD
it's important to have a variety in that regard. sometimes you want it, sometimes it's best to go a road less traveled...ass it were
Hey Daz, with haxui and cppia. How'd you go about getting haxeui stuff in the host? If I do the include I get macro conflicts and if don't recurse it, I get link errors on the client. Also did you do Toolkit init on the host or the client?
I think I plastered the problematic haxeui parts with #if ... or something
dang it, that's what I think I did and was hoping you had a better solution π
do you exclude the problematic parts from both scriptable and cppia or just the scriptable side?
can't figure out what to exclude, if i exclude macros, it messes up with the components
Need to check if I still have the code. Its been a while
In other news: I finally have another week of vacation now
Oh, and Im hiring. If you know smart folks that match my attitude, be sure to lemme know
german language & locate south west germany a must
I checked out your fork of haxeui but it still had the same issues so i'm guessing it might not have been commited
Oh, and Im hiring. If you know smart folks that match my attitude, be sure to lemme know
semmi π
yes hire semmi
not yet. Im still disappointed. He told me he thought Im part of the FNF crowd
π
the exakt german quote is even funnier & insulting #development message
lmao
Lmfaoooo
CallMember haxe.ui.components._VerticalScroll.VerticalScrollLayout (0x5da2da2dce14 0x5da2df9846a0) 'get_verticalSpacing' fallback
What does this error on cppia client mean? I thought it meant there was a problem with finding the class but if i look in the export file, the files are all compiled on the host
is the getter inlined?
nope, most fields aren't and some are actually normal functions
VecticalScroll (Module) -> VerticalScrollLayout extends DefaultLayout extends Layout I think all the functions are under layout
dce is off
Layout is present in the export file
another question, If I want something to be compiled in the client (and it is available through libs) shouldn't it automatically get compiled into the client if used?
Invalid super class 'simple.Rectangle' for 'TestClip'.
simple/internal/RenderLoop.hx:72: Exception: Missing super class
Called from cpp.cppia.Host.runFile (cpp/cppia/Host.hx line 45)
I'm getting this, where it seems to not be able to find the parent - but it should be able to just compile that class - no?
https://www.zmescience.com/science/news-science/mathematicians-just-found-a-hidden-reset-button-that-can-undo-any-rotation/ - wtf, mind blown
great, us-aws-east-1 is down and half the internet is broken..
ok, my brain is slowly drifting into 3D problems
which is a good sign
I need a nice material system that spans from visuals over physics to audio
vindicated for using all the niche aws choices
(they were just cheaper)
@green breach gonna look into your castle PR now
anybody got a clue if shiro actually ships cdb files or if they just use it for dev?
hmmm, they shipped dat files and with wartales they switched to pak files
lol I hope it works. I made it on a Chromebook so it was really tedious to test
hmm, I might just pull things apart
ok, one these moments where i wish there was goto in haxe
Do whatever
Huh. What is the error?
I didnβt really have any problems with it
said dazKind to nodejs calmly
electron installs just lock themselves up
classic nodejs version bullshit
but im not messing with that
I downloaded the windows version and started it through steam
LMAO
haxe-evolutio-
My brain is sooo unhinged sometimes
in order to get the first editor iteration done, Im testing the prefab pipeline that is based on blender + gltf, but since I dont wanna do the composition of entities in blender manually I wanna checkout how to marry it to a central castledb database. For the cdb iterations I need my castledb editor but it is fucked for me under linux and I have to run it via steam+proton and it looks like ass. So I go ahead and study the whole editor code in detail and figure that it is possible to be re-written as a cortex ui application since I have all important stuff.... except a multiline textfield, so I look what to do to make that work and to do it endgame "right, once and for all" I need to replace the whole nanovg rendering backend with vg-renderer and integrate it with Skribidi for font, textshaping as well as its text editor....
So from looking how I could build levels I ended up back in UI land. unhinged, what can I say, a normal day in my brain
and do you reckon that cdb is capable enough to scale, even if you decide to make games that are currently wayyy bigger than what you are currently targeting (in terms of the "size" and/or "scale" of game)?
Personally I've never used cdb, so genuinely curious how well it can hold up
here is a fun fact: castledb drives all shiro games. All of them. ncannasse initially set it up as a pretty small json based DB but had plans to make it run on sqlite in case where the dynamic json db wouldnt scale anymore (there is some old code hidden) but that was never necessary
My thinking is that CDB (seems to be) designed to store game metadata (npcs,, shops, items, etc). To me grouping entities seems like quite alot more entries compared to something like storing metadata
fusion reactors
Reading castledb source is an interesting look into the brain of ncannasse
ncannasse seems like a lovely guy to talk to over a beer XD
very smart guy
I suppose that means you could always change the "adapter" or "backend" to make it scale as you want to
but with the nice "frontend" of CDB
that makes sense, good choice
Good developer too. He just lives in a different bubble than the rest of us. We all have pretty similar styles given we have roughly the same influences.
not sure what you mean. I used cdb heavily in the past, eg organizing hundreds of material definitions (15gbs of materials + assets) to convert shit from unreal to godot. You can do quite a lot in its structure. As for my games, I want a central place where you define archetype-like component templates
also a unified material system
I have it all laidout. now I just need to rewrite the castledb editor
Yeah I've never used CDB, I've mainly seen it in the video about the shiro stack (in which it was shown to be used for storing enemy data, items, etc). Thanks for the clarification though on what it is capable of.
I never would've known it is that powerful
I suppose so, yeah.
if you bought any shiro game, you can unpack the *.pak files and checkout their cdb files
I don't think I have... yet atleast 
I'll defo check out CDB sometime though
seems like it's pretty cool (and more powerful/flexible than what I initially assumed it would be)
Are you going to implement a level editor too?
Just integrating LDTK sounds better to me
lol
Im kinda toying with the idea to compile the cdb-lib down to python so I load cdbs & use them directly in a blender plugin
then the game/editor/blender work on the same source of truth
and blender materials can directly link to cortex materials etc
anyway, I have some unhinged coding to do
tweaking debug visuals
Error: In file included from ./src/cpp/vm/tracy/Cppia_TracyProfiler.cpp:6:
/home/j/Documents/Projects/cpp/MyProject/haxe_modules/hxcpp/include/hx/TelemetryTracy.h:9:10: fatal error: /home/j/Documents/Projects/cpp/MyProject/bin/cppia/obj/linux64-debug/__pch/haxe/hxcpp.h: No such file or directory
9 | #include <hxcpp.h>
| ^~~~~~~~~
compilation terminated.
Trying to use tracy, any ideas what's going on here?
comment that line
not sure why the include is there. I think under windows the include paths are different
woooow that's so easy, works fine - super thanks π
weird tho, why does it work for you out of the box and not me
wasn't there a way to get it to to map directly to the haxe code? its mapping to the cpp code for me?
You have set all the defines correctly?
-D HXCPP_TRACY
-D HXCPP_TELEMETRY
-D HXCPP_STACK_TRACE
-D HXCPP_STACK_LINE
I am using tracy 0.12.2 if that matters?
Oh wow, affinity has merged all of its apps into a single one and it will be completely free
Affinity CEO Ash Hewson gives you an exclusive first-look at the all-new Affinity β an incredibly powerful, customisable app that brings vector, pixel, and layout under one roof.
Watch to see it in action.
Affinity is available for Mac or Windows. Visit https://www.affinity.studio to download now β for free (yes, free!).
Huh neat. Wish it had Linux support
hmm, sad. free never means free. free means they pivot to user-data, most likely ai-services

