#💀 Cortex Engine
1 messages · Page 3 of 1
nice, must be something on my end then
ah better
there's also a dedicated GC zone I added but commented out which could probably be enabled now (see __hxt_gc_start and __hxt_gc_end)
wasn't too sure what to put in it's location data, its not really that important, the interesting part is knowing how often and how long it takes so I just set the function to the gc_start one
added them. currently thinking.
Here is something other, if the paths are absolute then we get source preview
I though of that the other day and as a test prefixed a string to the file sent in the source info struct so the paths to the .hx files were absolute
unfortunately it didn't seem to work, I didn't get the source preview for haxe files and I didn't get the option to open the source file in some of the other views
guessing it only supports c & c++ header and implementation files
ah, right, so it does
I'll see if I can find the bit of UI I was thinking of
this zone info window, I wasn't getting that "Source" button in the top right for haxe zones even if the path was absolute
wot
just modified the cpp generator so that the stack frames file locations are absolute instead of relative
so you might get those preview and source navigation stuff for all haxe code
you have this in a fork?
just pushed it to a branch, you'll be able to download the compiler binaries once the CI has ran
if that change works well I'll give it some more testing with other hxcpp stuff (I believe the hxcpp debugger uses that stack info) to make sure it hasn't broken anything and open a PR to the compiler
I'll then have to update my stashed memory allocation tracking stuff to go with the new structure
ok, just tested your preview
Some classes that are directly in my project received a full string, but anything else is just cut off at the toplevel
GC::new linenumbers seem to be incrementing
happens to some of my classes as well, even overflowing
this is a cppia compile with -D HXCPP_STACK_TRACE -D HXCPP_STACK_LINE and the host -D HXCPP_TRACY -D HXCPP_TELEMETRY -D HXCPP_STACK_TRACE -D HXCPP_STACK_LINE
checking the native compile now
ok, a lot more absolute paths local to my project now. most stuff is still toplevel relative. GC:new linenumber still incrementing, that seems like a bug.
wtf, why is inSize used as linenumber here!??! It's using allocation sizes as linenumbers... https://github.com/HaxeFoundation/hxcpp/blob/08f88ff314eeaa165dd76272f92c8030cc879ec2/src/hx/gc/Immix.cpp#L6625
it's been like that since 2013....
guess noone ever bothered, tells you a lot about the situation around telemetry & tooling
fixed in our fork
gah the path is also wrong. I guess this is some leftover from a refactor Hugh did
All this just proves the value of a proper profiler integration. it makes all that stuff visible
turns out there is an existing hxml define, absolute-path , which already does this and so my change was conflicting with that
this define also only worked with files in the standard library, I've updated it so user files should also be absolute when using that define
yeah, I spotted that the other day as well
I got rid of that stack frame entirely in my local changes as when I was messing around with allocation tracking "GC::new" would always be the allocations stack preview which isn't very useful
so much crazy progress - looks amazing
does that affect the metrics?
I have no idea
at a certain point, yes
crap :D
You will saturate the sender-thread
Maybe this is a bug
I closed my app but tracy continued to run
had to kill the terminal/task
Yes, the app will stay around till it has send everything to the profiler
or you click stop in the UI
oh wow, then it was seriously saturated
because it was hanging around for a good 30 secs before i decided to kill the terminal
I just retested and I don't think this is going on
tracy is receiving no new data but it is still connected to my app even though the window as exited
yeah app cut off at 30secs
maybe something to do with ceramic?
Holy Mother of god that is alot of data
The tracy documentation has a lot of explaination on how data flows
You also want to review the tracy docs concerning the workflow and UI
Please note that the Tracy UI app is for interactive profiling, you can also run the cmdline version to capture and save data to disc
and the load&review that via the UI app
The documentation has like 30 pages about the UI and how to use it
Maybe it makes sense to allow a setting to limit stack depth for people to customize their focus better. I'll defo check if we are using things wrong / are a bit too verbose at profile-time
if it helps I have an i7-9700k
on board graphics
32gb ram
m.2 ssd
just for some context to 'performance'
ok, I found the problem Im having. It's related to haxeui canvas drawing. It just creates tooo many calls into haxeui killing my performance
when it creates all the stacktraces it crashes the FPS
I added 2 more compile defines: HXCPP_TRACY_NO_EXIT & HXCPP_TRACY_ON_DEMAND
@obtuse burrow First one is for short lived apps (see docs)
@ionic badger Second one will only generate profiler data when there is an connection active otherwise no data is generated
just pushed
Yes, now I get it. We are sending a callstack for every zone. Callstacks should be optional
When we send them, we also include at least 5 entries per stack that we dont need
https://github.com/HaxeFoundation/haxe/pull/11763 compiler PR for working absolute paths in hxcpp stackframes
👀
getting somewhere with non large alloc tracking
saw tooth has turnt into a "shark fin" due to needing to make a separate tracy free call for each alloc
but this is also a worse case scenario (while true loop just making random allocs), so not indicative of usual program usage (hopefully...)
something also seems wrong with the reported alloc sizes in that wndow. 20 - 30 bytes seems awfully low when my alloc spamming code is this...
function do_allocs() {
final size = 1024 + Std.random(2048);
final bytes = Bytes.alloc(size);
}
got it figured out, added a new __hxt_gc_alloc to get generic allocation info, the one downside of tracy is that we can't do anything GC specific. So the existing hxt function which differentiate between string, object, and array allocations aren't that useful to us.
very cool!
gotta test this tomorrow
added new define HXCPP_TRACY_INCLUDE_CALLSTACKS, by default callstacks wont be included and the default profiling should be more friendly for @ionic badger . People can use the new define to explicitly switch them on
Simn has merged it 😄
too bad, but no deal breaker I assume?
think it should be fine, I've just implemented it as a no-op function in the old hxtelemetry implementation file
I was hoping to get large allocs back up and working but I did something and now its all playing silly buggers with me
so both small and large alloc tracking currently doesn't work and I didn't commit after getting small tracking done...
problem for tomorrow evening
take it easy, we are ahead of schedule
Put tracy to good use. Now hot-reloading resources in release-mode is pretty ok
Concerning Tracy, I see 4 more things left to be crossed off the todo-list:
- I have to test the absolute path PR
- Add your memory tracking
- Somehow expose the TracyC macros to the user(maybe even externs), so he can create custom app-specific zones
- review/revise the feature compilation flags so everything make sense from a user's perspective
- Create a haxe PR for a cpp.tracy.TracyTelemetry.hx that exposes the globals and write some docs
(6. Bonus: Add & Test the screenshot capabilities)
Ive seen files in tracy for opengl, vk, etc.
I haven't checked them out in depth yet, but are there plans to add that too?
These fall under point 3.
thx, should be a cool result with lots of benefit for the community
massive benefits
massive doesn't even begin to cover how benefitial this will be
sorted out the allocation tracking, I just hadn't read the tracy pdf page on unique pointers which solved all my issues
allocations are split into either the SOH (small object heap) or LOH (large object heap). does not currently work with any GC settings which cause objects to move (GC_MOVING, GENERATIONAL)
using the memory window you should be able to filter by the small or large heap and see all allocations made
depending on how taxing this is we may want to lock it behind some sort of define
outside of working with moving GCs there are several other bits of info which might be useful
- tracking roots and pins since they cause objects to get retained and have to be manually managed.
- for the generational GC displaying each generation as a different graph
hoooly shit that is useful
yep, but lets see. testing some things atm
when I start the ui-app and have it wait for a connection and then start my app it seems to run into this. Doesnt happen with on-demand profiling
hmm, I thought I solved all those issues...
try commenting out the tracy macros which track large objects and see if it then works fine
yep
large objects can be placed into a special recycling list and re-used in between GC collections. I wonder if you've got a large object being re-used before a GC collection which would cause it to call the alloc macro twice
that made a difference
I'll look into some smarter large object recycling tracking then
just pushed a change which might help with that issue
nope, still happening
If you feel like checking addresses I can send you the saved trace 😄
dm'ed you the trace. It's cortex starting up and analyzing its assets
like 4 GC-cycles in & LOH worked heavily
thanks, I'll take a look. think I might also be able to trigger it with some carefully crafted byte allocations as well
added HXCPP_TRACY_MEMORY to enable/disable the memory tracking
Just tested this. This is soooo awesome! Now I can tell @pearl slate where to inline more
j/k! Again awesome!
effing gamechanger when looking at zones
omg, didnt test shader editing & hot-reloading ever since I rewrote the resource management. This is soo much fun now
new hxcpp release with all those cool stuff, when 😄 ? (looks awesome)
current plan is to get the PR out of draft till friday. Then we'll see what happens
think threading is involved in this problem. large objects are tracked by the global allocator in hxcpp but I was tracking them with our per thread telemetry object. This could lead to situations where two threads get the same large object pointer since its been recycled but they don't know about each other so each issue a tracy alloc event
I've now switched over to tracking large objects globally, hopefully that will solve things
ah! This makes sense
I think we can remove the GC zone since we have a valid GC::collect parent
Memory is no longer crashing for me with your latest changes
Hey, is there a way to bypass hx:String in extern functions? I wanna essentially create a string at compiletime for a const expr
goal is to use the tracy macros directly for cases where the user wants to tag a certain zone
I can prolly write a haxe macro that assembles an untyped __cpp__('ZoneScopedN("my custom zone")')
hmm, can see how thats a pain
easiest might be to create a macro which extracts the string literal and places it in that untyped call?
might want to construct the tracy::SourceLocationData struct ourselves, otherwise we get cpp file and line data
ah, right
can't really create a __hxt_zone function either as the RAII stuff means if will just profile that function...
and requiring the user to manually stop the zone is a pain
hmm
lemme think what I would wanna use this for
that ZoneScopedN macro expands to
static constexpr tracy::SourceLocationData __tracy_source_location54{ "test", __FUNCTION__, "D:\\programming\\haxe\\hxcpp\\src\\hx\\TelemetryTracy.cpp", (uint32_t)54, 0 };
tracy::ScopedZone ___tracy_scoped_zone(&__tracy_source_location54, true);
so ideally we'd do something like that but fill in haxe file and line data instead?
could be done in a macro or a bit of untyped to fetch the current stack context and inspect that
Don't know what the lifetime of the source location data needs to be for the scoped stuff
maybe it doesn't need to be static / outlive the scope
On my list there are 2 use-cases:
- As a user I want to be able to mark special zones in my application code emitting Haxe source-locations
- As a user I want to be able to mark special stuff in native / extern code using tracy directly, emitting cpp-code locations
let's question case 1 given the fact that the current implementation already maps your full app on the haxe-side if telemetry is on
concerning case 2, I think we just let the user figure out how to get ahold of the header, since it's an advanced use-case anyway
thoughts?
yeah, letting the user include the tracy header someway for 2 sounds fine
ok, how about we skip these scopes then
cause then all that is left is more testing, clean up and docs
might be easiest for now
I've noticed that as well sometimes, not sure what causes it
This is when we run without callstacks https://github.com/cortex-engine/hxcpp/blob/master/src/hx/TelemetryTracy.cpp#L219
ah, right
Im not sure if it's a problem, but interestingly it's not present in the branch that uses ___tracy_emit_zone_begin_alloc_callstack
I guess I can disable telemetry, add tracy_enable and compare it to our very first StackPosition Hack
PDF says "Zone trace, taking into account the zone tree and call stack information (section 3.11), trying to
reconstruct a combined zone + call stack trace(85)"
with footnote 85 being "Reconstruction is only possible if all zones have complete call stack capture data available. In the case where that’s not available, an unknown frames entry will be present."
ah!
good spot!
this is sooo good now. Drilling down on all the allocations per zone is sooo cool
I pushed a new commit for that 20ish minutes ago which hopefully improves things and doesn't break anything
yep, saw and grabbed it
no issue so far and LOH tracking resembles the gc-counter graphs again
still need to think about what (if anything for now) we do for allocation tracking and GC options which cause objects to move
that compile error is probably fine since those options aren't enabled by default
but I'd like to get it working at some point
hmm yes, gc behaves pretty differently in those modes
agreed. I declare it nice-to-have
that image does remind me it would be nice to be able to name threads
lemme check
tracy does expose functionality for that, so we could add some sort of __hxt_name_thread function
but also, might be worth checking if tracy peeks into the platform specific API to see if the thread has a name already (can set one with win32 iirc)
so it might be a nice general haxe improvement to be able to create a thread with a name (will benefit debuggers and other tools as well that way)
nothing comes to mind right now, think the most useful stuff is pretty much all in now
just realized that profiling might work out of the box on rooted android devices and ios(albeit limited in options)
works. Will commit after a smoke
ok, guess what's left is reviewing / renaming the HXCPP_TRACY_* defines + docs
I have just had an idea which might solve both of these reasonably well... will give it a quick try
I'll have to prepare a PR draft for adding cpp.vm.tracy.Telemetry.hx to std
ok, just pushed a commit which does a few things
- It adds a new
hx/TelemetryTracy.hheader which includes all the tracy stuff and has the__hxcpp_tracydefinitions.
this should allow anyone making hxcpp externs to add #include <hx/TelemetryTracy.h> and have access to all the hxcpp and tracy stuff
It also adds a HXCPP_TRACY_ZONE macro function which should add a named tracy zone with the provided ::String and current stack frame
this is designed to be called from haxe generated cpp files as it assumes the presence of a _hx_stackframe variable, so we need some extern to expose it to haxe
take a look at the __hxcpp_tracy_test_zone function I added to see usage / view the macro expansion (should be removed if / when were happy with all this)
awesome! I simply reworked the utility class into an extern to make things work again. The custom zones work as well, though we might be missing something concerning the stringlength and the paths. Otherwise it seems to work flawless.
Tracy.zoneScoped("Test");
yea, just spotted that as well, seems I had some arguments the wrong way round
I'm using the length value from the optional utf8_str function, maybe that doesn't include the null terminating character in the length and tracy expects it does? so off by one?
although it seems to be working fine for me with my latest commit
not cut off in the zone view
I have this one zone that is cut off after 3 chars
wtf
Are you testing multiple ones?
no, I'll try that
I started getting these but as errors instead of warnings, now pushing a fix
hmmm
ok, so im not crazy
😄
looks like we are constructing a string with an overflowing / invalid length in that macro
think its related to the utf8_str call, I used name.length instead of the length that function gives and it appears to work
also, are you missing a param in utf8_str?
don't think so, I'm using the overload which takes a custom buffer and outputs the length
or, I should be
utf8_str outputs a length of 9, which explains why its cut off
going to confirm that the second utf8_str arg is actually length...
hmm I see that the pointer to the length enter the function with a dereferenced value of 3 and length 8 should be assigned, but it returns and the length stays the initial 3, explain the FOO for me. but that means that maybe something is out of order. lemme try something
precedence
got it
nice!
😂 I don't want to know the number of times I've accidentally nuked changes with a rebase
ah, right, that extra boolean argument in utf8_str
that's optional
i think we ran into some undefined behavior of our compilers
Order of evaluation of any part of any expression, including order of evaluation of function arguments is unspecified (with some exceptions listed below). The compiler can evaluate operands and other subexpressions in any order, and may choose another order when the same expression is evaluated again.
lovely! sounds like perfectly sensible behaviour...
so sometimes the pointer was written before utf8_str other times not
glad we caught that
cpp is such a clusterfuck https://en.cppreference.com/w/cpp/language/eval_order
remembered we had issue before with the getDepth function of the stack context with cppia. So I've just added a __hxcpp_tracy_get_zone_count function to get the size of that tracy zone vector and have the macro use that, just in case
it really is
right, cppia, that will ofc fail
currently the zoneScoped will inline that macro in wherever scope it is used, in cppia the macro needs to wrapped and thus will cause a wrapped call + location
but it's an ok tradeoff since you can use the timings of the wrapper zone
i guess
yeah, not sure how you could make it work the same on cppia, RAII and needing a wrapper function makes it difficult
NOONE USES CPPIA RIGHT? 😄
how's cppia's performance at runtime? 😂
I think it's ok since we are talking about custom zones
worse than native, esp when you compile all & run all of haxeui like I do 😄
maybe i'll play with it one day
I wish we could get https://github.com/HaxeFoundation/hxcpp/issues/1150 fixed
but i've had this passive idea of a haxeui builder, where the compile times are low
a gui for building layouts
coz then haxeui and it's huge inheritance tree can be compiled into the host and properly used from the script-side
build it in an editor, copy paste the xml/styles to project when done
haxeui cppia compiles are pretty stable around 3-4 secs for me
your project here has certainly brought that idea up to the surface
because this would just be basically a "just haxeui" app i suspect the build times would be lower as well
it depends a bit on haxeui's macros, since they steal most of the compiletime
can totally be done I think
it would require some POC to figure out the value
but some tool to make building UI easier, would be nice
Dont worry, we leave it like that for the moment
All that is left now is cleanup, renaming a few things and docs
Hereby I declare a feature freeze
@obtuse burrow seems like we are scaring folks!
❤️
lolol, couldnt have thought of a better gif
I think I mentioned this before, but just browsing around makes me soooo happy
hahaha
"I understand"
there is nothing quite like having a business breaking bug at work on a friday 5pm...
oh no lol
was cool, at least I was able to fell like the guy in charge on the floor again. Been awhile since I had jump into production and get the shit rolling again
just finished all the documentation so folks can attach/pick up monday. Now I can think about the weekend
i swear friday 5pm is cursed
every company
it always goes wrong at that exact time and day
i wonder how much of it is "the issue was identified at 12pm, but we ignored it, hoping we could leave on time today"
only for it to grow and have to be dealt with at 5pm
this is why lots of the UK observes POETS day
can't have problems at 5 on a friday if everyones buggered off by 3:30
Hey i'd like to report a problem
when using tracy the memory usage goes up like mad
With tracy:
without:
Not sure if this is intentional or not, but this is what happened
it was climbing with like a gb per second
what settings do you use and how do you profile?
when compiled with tracy enabled your app will collect/buffer all data till a connection is made to a backend (tracy ui-app or cmdline), then it will start sending & release the memory again.
if you only want to collect & profile when there is an active connection, then use HXCPP_TRACY_ON_DEMAND
This is well documented behavior, be sure to study the documentation here https://github.com/wolfpld/tracy/releases/download/v0.11.1/tracy.pdf
there is no traffic on your network, are you connected to a backend?
Also, i'd like to thank you all once again for the work you guys did
this is crazy good
give that a go, fixes the sample you posted in the issue
hooooly shit! Will do once im done with the review & docs
@pearl slate You wanna test this as well
ill certainly check it out, but ive also "moved past" cppia as an idea and am weary of falling down, yet another, rabbit hole. I do have a question though: @obtuse burrow - are you on the compiler team? Are you a kind of hxcpp maintainer? Apart from hugh himself i dont know anyone who is as knowledgeable about the internals.
No, I'm not on the compiler team, but I guess I have stumbled into maintaining hxcpp
mostly just add / fix things when I want / come across them myself
Draft PR for the cpp.vm.tracy.* is here: https://github.com/HaxeFoundation/haxe/pull/11772
This PR is the std part for HaxeFoundation/hxcpp#1153. The goal is to be able to reliably profile the performance of hxcpp apps in a ergonomic, lightweight and battletested manner.
Now I need to update the included documentation. Then I prep the annoucements and we can move everything out of draft
You really just like to play your life on hardcore
you dont "just fix things in hxcpp", you bend space and time
[showcase] Happy to announce that our PR to integrate support for the Tracy profiler is out of draft and can be reviewed now: https://github.com/HaxeFoundation/hxcpp/pull/1153
It allows you to inspect, profile & optimize your hxcpp apps on a whole new level.
If want to see this become a part of hxcpp, be sure to leave some love & feedback & emojis for us in the comments ❤️
“Oh they finished, that’s coo— 46k LoC in like a week jeez”
If you're ever concerned that AI will take over, just remember that people like Daz and Aiden exist
💀 Cortex
fair enough, super happy you are doing what you are doing 🙂
you say this, but have you met either of these two in person? Are we sure they arent AGI? Ive seen some youtube videos of Daz with looking up at a screen looking suspiciously human... But thats about it 😉 😄
wait i think you are on to something
u guys are flattering, but I'm really just an idiot with too much drive ❤️
to be fair most of it is the tracy-client lib and libbacktrace glued into hxcpp
... ... this sounds exactly like what an AI would say... 😄 😬
I tell you I'm real & human. Here is some proof 😆
... works for me... i take it all back... clearly human(s) 🙂
can do one better 
enough ai for today
thats defo not terrifying at all... (although, i do like that its got the insanity behind my eyes just right 👌 )
what makes it worse is that this runs at 30fps
testing this now
virus detected
lol
setting up ocaml & opam is such a clusterfuck
TFW when you install the recommended cygwin setup for ocaml/opam and then opam tries to run curl with windows paths instead of the environment's...
oh yeah, ocaml and opam is a shitshow on windows, never got it to work
anything requiring mingw, cygwin, or any of those sorts of things is an immediate red flag that its going to be very precarious
I do development / basic testing on WSL, then push to github and let the CI do the work when I want a windows binary
how do I switch a context from 32bit to 64?
like my opam thinks I wanna do 32bit builds even though I installed everything 64
ok I just realized, defender only complains about the installer, not the compiler
yep, fixes the issue. now lemme test haxeui in the host with a backend in the script
gah, backend needs to be included
ok, then core and backend in the host and the rest in the script
ok, didnt have the effect I was counting on. Good news is that nothing broke for me
there are some changes to core that i need to review in my backend, cliprects in hui seem to have changed
we should then get a review from Hugh for you fix then
I dont think it hurts or will cause a regression
defo seems like its the right way... i havent tested it myself, but if 2 out of 3 says it works, thats enough for me (plus i dont want to go down the rabbit hole of trying to build haxe on windows 🙂 )
are there cliprect changes? Not sure there are... but i dont know how out of date you are
hmm, turns out I had an inverted normal in my shader. Now the materials finally look closer to what they should look like
@vapid mortar Now I got it back together: Adding a component multiple times to an entity under different types will screw with FastEntitySet._setMap causing activations to only fire per entity for the first view and not per entity-view combination.
I might be talking out of my ass about the way I trigger this, but I can see that the !(this->_entities->_setMap->exists(id)) in addIfMatched will only work once
still digging through the macro dumps to get the bigger picture
nah, dude, this is such a brainfuck
I gotta trace out the whole initialization of systems and views so I can track this down. In essence, I dont get all the activations for certain component combinations
@obtuse burrow ever messed with fibers?
In tracy? no. Saw in the docs its how they support cooperative multhreading, so when coroutines are more developed I want to take a look
because the profiling graphs will be meaningless without it
Today the Direct3D and HLSL teams are excited to share some insight into the next big step for GPU programmability. Once Shader Model 7 is released, DirectX 12 will accept shaders compiled to SPIR-V™. The HLSL team is committed to open development processes and collaborating with The Khronos® Group and LLVM Project. We’re sharing this […]
yep, gonna be good. bgfx will support this 😄
nice!
altho honestly
best part of the entire post is the banner on the embed xD
just kidding, directx adopting spirv is really nice
finally completed my first shader cleanup
also learnt a thing about bgfx: for some reason the camera position in the fragment shader is always nulled under u_invView[3]. Which is kinda weird and a difference in the targets compared OGL(works) & Vk&Dx11/12(doesnt work)
Im an idiot. I gotta respect col/row major of the used api when peeking matrices directly
Im so used to pull everything out of matrices instead of using custom uniforms that I completely missed this. yay
this is also the reason why most bgfx samples use unnecessary matrix multiplications to get like vec3 weyepos = mul(vec4(0.0, 0.0, 0.0, 1.0), u_view).xyz;
since, for whatever reason, they dont wanna mess with #ifdefs for the different apis
gaaah, I strongly feel compiling textures via bgfx's texturec tool might be a bit too slow for my taste. what do you think?
it is slow but it is also 'in place' which is a big pro in itself
hmm, guess the texture is also quite big and gets compressed
I mean this might be a naive question from me, but would only using texturec for release builds fix the issue?
Found another multithreading issue by looking at a crash in Tracy. This was one of the issues that would have taken me 6 hours to find before. With Tracy literally 2 minutes
could work. My old engine used pvrtextoolcli which seems to be a bit faster for certain formats
hmmm, hmecs carries soo much static state
between cppia application reloads that shit sticks around
@vapid mortar Ok, I dug through this and found the core of my issue with missing activations callbacks. hmecs doesnt really support having multiple components of the same type on one entity. first time activation works, but second time we skip since the Fastset's setMap already contains the entity id. In my case it was "sort of" working in updates since I added the same component twice as different types and the last stored reference in storage received the update.
now I gotta think
ok, after some more evaluations I found https://github.com/Dvergar/OSIS and wrote another bunnymark to compare it against a plain code impl & hmecs. turns out it's way less code, just as fast and allows for more finegrained loops. Only downside is a huge cost for adding components to entities but I fixed this by using hmecs's FastEntitySet. Now this is promising
did you ever give aidan's a try?
nope, it has too much magic
💀 Cortex
I wanna cut down on macros
i love macros
lol
Post-macro era
macros are like an exotic spice. awesome in small doses, horrible if you overdo it
in some cases they can result in huge amounts of generated code. hxgodot is definitely guilty of this
Funnily enough I've said something around these lines before
Still totally stand by that statement today
Macros can be nice, really nice even
But very off-putting at times, especially for new contributors
Questions like "where does this variable come from" or "how on earth is this even possible" are thoughts I've had on codebases that make crazy use of macros
why do you think it was initally called "macro-magic" 😄
For you, what has specifically made you want to turn down the use of macros, surely something must have activated you to do so?
xD
I dont turn them down. I just reject too much complexity for stuff that shouldnt use much code in the first place
Here is a fun experiment:
# ecs1
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Haxe 3 229 250 751
-------------------------------------------------------------------------------
SUM: 3 229 250 751
-------------------------------------------------------------------------------
# ecs2
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Haxe 24 389 423 1956
-------------------------------------------------------------------------------
SUM: 24 389 423 1956
-------------------------------------------------------------------------------
# ecs3
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Haxe 28 800 514 3939
-------------------------------------------------------------------------------
SUM: 28 800 514 3939
-------------------------------------------------------------------------------
all 3 systems solve the same problems. between 1 & 3 ergonomics are about the same (you need to setup components in a certain way, amount of work is about the same). 1 has about 30lines of macros, 3 is like 80% macro code. 1 has a simple way of accessing and customizing everything, 3 completely hides the details and you need to modify the macros to gain access to stuff.
1 and 3 have the same performance.
gonna pick 1 ofc.
oh I lied
1 doesnt solve the same problem as the others. It includes aditional networking
ah
well in that case, imo it would depend
how all-in are you on networking
and, even if you aren't now, could you use an option optimized for networking in the future while keeping the same API
anyhow
what would you decide for
I guess the right way to describe my approach: less code/complexity == easily hackable
yeah i guess same here
my own old ecs used networking directly on the component containers
and I wrote linc_enet back in the day
that is really cool 😄
so I can hack it if I should need it. But no priority at the mom
Back in macro land, gotta re-read some hxgodot macros that i totally forgot. Hilarious how little macro stuff sticks in my head
Need to tweak the macros for the ecs a little to test something. The code seemed a little familiar, then I see this.... 2019 called 😄
2019 was quite the time
I remember we were all like "oh shi pandemic in China"
"surely that won't come our way"
And then it appeared quite literally EVERYWHERE
Apart from that 2019 was good tho
barely remember
best generated macro code I read today:
wha-
exactly 😄
cast cast
I think this is a bug in the macro printer when doing dump=pretty.
Original code and generated cpp:
` isn't a valid var name is it? lol
Question to all you ECS folks: Adding multiple components of the same type to an entity, is this something you usually allow or not?
Like an entity that should have 2 sprites
Hmm, i'm struggling to think of a place where I do this
generally if i have "related data" though, i'd group them in some container
like an enum or whatever
my take atm is that it should be allowed
cause the entity is supposed to be the "group"
@:fastFamily var values:{first:Test, second:Test};
override function onEnabled() {
universe.setComponents(universe.createEntity(), ({a: "foo"}:Test), ({a: "bar"}:Test));
}
override function update(_dt:Float) {
iterate(values, (entity) -> {
trace(first.a, second.a);
universe.deleteEntity(entity);
});
}
A quick test on aidan's ecs
and this seems to fail
there might be a technical limitation here?
What happens is first.a traces as bar and second.a traces as bar
so the last thing overwrites the others
same thing occurs with a string entity
Guess it's the usual 1:1 mapping between entity & component that is assumed in their storage container
good to know tho, the fact that it isn't immediately an "error" but fails somewhat silently is nice to know
yeah, part of the origin of my question. None of the libs seem to test/validate for this
i guess it likely adds a decent chunk of a complexity
but realistically i could see it being quite a useful thing in general, like collision between two objects
in my case I have a transform cmp and multiple other cmps that want to access/share that transform's matrix
currently i'd just wrap it in an enum because i only really want the "ecs" to be a kind of "data mover"
But this forces everything to be hardcoded, assembling entities at runtime can no longer be data-driven (think inside an editor)
I have a mesh and I wanna add a debug display axis aligned bounding box to it, both being a "renderable"-component, I'd have to code that and write a new cmp
or create a whole new independent entity for it
duplicating matrices and shit
well that's why an enum is okay, cause its not too much of an investment
however i've been seeing some issue with my use of the ecs, but hadn't quite figured it out i'll keep this in mind and see if i can figure out what it is
its just so minor its only "in the distance" so its hard for me to really put much time into figuring it out 😂
but it may be something like the fact that I may be wrapping things more than I need to (or should do)
@fallow bridge
whats wrong with adding the 🤓 emoji if i may ask
chances are, daz probably keeps trying to see who is reacting
but by the time he gets there, the emoji is removed lol
oh well
What's wrong with inserting yourself into shit you dont contribute to?
rhetorical question
everything
no, I see them added, the whole chat-layout jumps up and jumps down again when it is removed
ahh
maybe you could add reaction logs to haxebot :))
waste of time
hmm i could introduce collection-components
maybe you could not be a troll 
Aidan’s ECS and a few others are just arrays of components with entity indices. I don’t think I’ve seen a case of “component group” that wasn’t explicitly a group component
I’ve def run into that case though where you need to restructure just bc you now have two Rects as components. With Aidan’s, iirc you could abstract over one and that counts as a new component type
got it figured out for the moment
that LD collab thread....
really need to hold back or Im gonna scream. Communicating Visions is such a simple but very hard thing to do
It's not the form or the tools. It's the content. It takes empathy and switching perspective. Simple experiment: When reading issues or tickets, do people describe the actual problem and the criterias that need to be fulfilled to kill the problem? Or are they describing a solution without the problem? Most of the time things are completely mixed up and people get confused. Developers tend to fall into the trap of the second, almost 90%
"as a user, when i click on the export button, i expect that the thing exports correctly" (thats how ticket titles - and content - should be written imo)
the worst is when QMT tries to debug the ticket for the dev, and you have to remove all the assumptions and incorrect info
Good start, though I would want a list of specific criterias as well
people have shit in mind even if they write very good stories, but they cant or shouldnt pack everything into the story sentence
certainly, i mean the title... obviously the content should go into reproduction steps, etc. But the start of tickets (in general) should be "as a user, or as a X", not "as a dev" or "as test who thinks they know"
yes, personas are super important!
"As a pathologist, i expect the READ codes to be organized by relevance, not alphabetical order" (real ticket - paraphrased)
super nice. A criteria for this story could be a definition for "relevance"
top notch then. I had a hard time re-learning that with my devs at work
Now I see it everywhere and I wanna scream
haha, yeah, i run a couple of teams (with varying results)... im not a huge fan of agile really but there are parts i defo like about it... backlog grooming, standups, retros.. etc...
story points can fuck off (though im forced to use them with one team)... and some of the agile fluff i could do without... ... i think a sort of not conforming "agile-lite" would be where my head is at
yeah, the problem is that it just means (in my exp.) different things to different people... and "scum poker" is just not worth it either...
my theory is, that you need to make storypoints super confusing only then people will start talking about the real shit
i still use story points with the NHS team, but, honestly, at this point, we just sort say "5?" yeah... whatever...
they are just a relative measure for a single team. The team can use them to steer its allocation over time
sure, thats what we do... ish... but we used to go way under (when we were using them "properly"), then way over, and now its like everything either a 1, 5 or 8... thats basically it
really, the most important thing they do, they show disparities/knowledge gaps in the team
that's actually the effect when the team has eased in
i think its a usless metric... i dont have a better way to guage what to put in a sprint to be fair, but the metrics itself is shitty... i actually think "hours" would be more useful
haha
depends on what you are going for. we focus the problem, not the solution(get dev to understand the business-side/-case). complex business problems might have easy solutions and vice-versa.
true, as i said, i dont have a better metric, i just know from exp that, for the most part, we dont use story points "properly" because it just a PITA... is it a 5? No... more? 8... less? 1... for some reason it never goes to 2 or 3
basically, we just pull the numbers out of our arses in something that feels somewhat reasonable
which, to be fair, is kinda the point of story points... but we dont have some big discussion about it
sure, there can only ever be an understanding about them in the team. they are relative, only for one team
i still think "hours" would be more useful, but i get why they arent hours, because that feels more like a time promised contract type deal... but yeah...
if story points "went away", id defo need something to know how to build a sprint... but i still think they are shit
i might think about introducing them with the other team tbh... see how it pans out with a "fresh start"... i might totally change my mind
imo they are a cool tool to get people to ask the right questions, share knowledge and get on the same page. "hours" are really just a measure of a skill and doesnt get me the same result
true enough... my 1 hour could be someone elses 30 and vice versa
but that's my experience, lemme know how it turns out for you
yeah, i think its just the NHS team tbf, and we have been working together for ages so we just kinda "go with it" at this point
kinda sounds you hit the endgame with that team. Wouldnt worry then
time to add an almighty console to the engine
I wonder, @pearl slate how hard would it be to rip out haxe.ui.styles from haxeui-core into its own lib?
I guess I would have to replace / mock Component for selectors
totally doable, but not sure you'd want to, its one of the more ugly parts of haxeui that is itching for a rewrite
i want to make it like propery typedefs / struct init classes / enums... so you could do:
myComponent.style.border = { color: red, size: px(1), style: solid }
(something like that anyway)
oo i like that
gaaah
my old shit is insane
literally everything is abstracted
you want to run a fully independent UI-Canvas with a complex UI as a texture on a 3D model? Sure....
that kind of stuff is cool tho
like want UI in VR? go for it
altho in my experience it can be annoying adding a bunch of boilerplate for that to work
Yeah, in my case I have all this boilerplate in my way when doing seemingly basic stuff
at least every canvas has its own nanovg context now
😅 I tried to warn everyone over the last few weeks that this was gonna be harder than it seemed
everyone was pretty chill
my old UI has such a shitty concept of component renderers
it inherited the concept from mint and now it's brainfucking me
I mean it worked nicely and you can customize it easily but its OOP shit is now fucking me with the new engine architecture
You aren't using HaxeUI anymore?
ofc I still use haxeui. But I dont wanna use it for core-engine ui stuff
aah
like the ingame console should work with or without haxeui
Yeah, makes sense
it also supports a few things haxeui cant atm. it has the bespoke 3 phase event system and doesnt use singletons, so you can have multiple independent UI apps active at the same time
Wait is this in cortex?
Or an old project?
It looks sick though
It's the precursor to cortex
Im basically porting/modernizing everything for cortex
I see, sounds good
I might be stripping the whole free font support out of nanovg
pretty understandable but also really unfortunate
you has ideas to replace fontstash right?
have an idea
our tracy hxcpp is quite popular it seems. 49 cloners in the last 2 weeks
2 of which were me
i use tracy reguarly on both my machines
it has prevented me 3 headaches so far
1 for dumb memory usage
1 for dumb code
1 for dumb thread usage
you guys have literally contributed something CRAZY useful to everyone
im very grateful
It's unique cloners, so you were only counted once
ah i see
altho it may still have been 2
one logged in, one annonymous
because 2 machines
cleaning up a haxe port of the nanovg demo
is there somewhere a tutorial that shows how to add tracy or do i have to do all of it myself without knowing what to do
It's not officially merged. There is no tutorial. You are on your own
crap
Personal steps:
- Download Tracy Profiler
- Remove hxcpp
haxelib git hxcpp <link to the hxcpp of cortex>- Add the flags (as described in the PR)
- Build a project
- Confirm if it asks you to build hxcpp
- Enjoy
It is pretty straight-forward in my experience
Also random question, you might know this
how would you achieve an outline on a bezier curve, but one that does not overlap on merging paths
random path
desired outline
ive tried to (and managed to) draw curves on my own
but i really am lost at drawing outlines
heh
Learn OpenGL . com provides good and clear modern 3.3+ OpenGL tutorials with clear examples. A great resource to learn modern OpenGL aimed at beginners.
added some fixes concerning text to linc_bgfx' nanovg,
text metrics and glyphpositions are now easier to work with
with that in place I can focus on the real meat of the rework next
ah
amazing
tysm
:O
oh wow, thanks!
it actually compiled without any errors
When will the tracy hxcpp pr get merged..
when you least expect it 🙂
I dont get it. Why all these random cat pictures?
The internet is founded by cat pictures
I was there, it wasnt
can you please stop with the meme gifs here? Super distracting shit
Sorry
ahhh ui-coding is soo nice in cortex
currently cleaning up the whole internal ui lib
what is ui coding in cortex, cause i'm sure i've seen like 2/3 different ui systems lol
cortex will have a little internal ui lib that you can use
since it has no major dependencies it compiles in like a sec
it mimics the html event spec/as3, so attaching to complex event cascades is very easy
it gets a clean renderer integration now, that will likely be most of the haxeui backend
both share the nanovg integration but it makes sense they share a bit more like textfield stuff, which im also gonna rewrite
the goal is to have an animated ingame console with colored text support and autocompletion
wait so you've got a bit of a ui abstraction going on?
ofc, I do. I used to run custom cross-plat configurator UIs everywhere.
🤯
it's super lightweight
im just cleaning it up now and make it available as part of cortex
at some point when i've gotten my own stuff to good point, i'd like to a take a deep dive into haxeui macros
see if there's any ways to make it lighter on the compile times
but i need to understand more about macros as well
What is Cortex anyway? Idk if it's a pinned message bc I'm on mobile and it won't let me see them
Ooh nice
ahh
Gimmie a sec this stupid ass fruit fly is driving me crazy asf
I guess that makes sense with an asset pipeline 😅
Ok killed it
not only asset pipeline. it's crazy ass resource management, multithreading and all
you're truly building up a beast 😄
Yippie
u gonna have a blast
I decided to go easy on the macros after hxgodot. macros encourage to generate a lot of code+complexity and i wanna keep things small as far as possible
not even gonna be close, there's way too much i don't even know about macros atm
like im gonna recycle the simple xml macro I used for the statecharts for the internal ui
so i think my first step would be to investigate issues I have with aidan's ecs as a stepping stone and see if i can solve some issues that rudy mentions it has with lsp
That's quite neat
simple local code generation, no global madness
muahahaha, this is going to be nuts
haxeui lite 🙃
haxeui-i-cant-see /j
sooooooooo good
ahhh, I forgot myself for a little and now I implemented html display + flexbox..
Compiling haxeui Backend.hx takes 4 eons
it isn't a massive factor on its own, but I have so many things that are using complicated macros that I think it just all confuses each other
From that perspective, the idea of 'DIY' something like everyone does in haxe is nice
now i know why @pearl slate wants to rewrite the haxe.ui.styles stuff... but fuck it, it works
now I need to port over the rendering part so we can actually see shit
ok, feels weird, but I can actually use haxeui xmls with slight mods in this
[showcase] Just added a few more little ui bits&bops to cortex, ofc with hot reloading and css-magic 🙂
https://www.youtube.com/watch?v=WHOdqU7gC0Q
..how
magic shrooms and some hacks
xD
in essence: my old ui lib refactored for cortex, lifted & hacked the css-styles stuff from haxeui and plugged the css files into the resource-manager
changing the ui-tree needs a cppia compile & reload (2 secs), changing the styles / css is pretty much instant
oh its cppia?
so basically, your solution to the 'instant feedback' problem was to create a mini dev haxeui? 😄
production = haxeui, dev = cortex ui
I dont think it can have parity featurewise, im no ui guru like ian. But at least I can recycle a lot between eachother and shit will look the same
im kinda torn on how control/components are built and rendered.
but at least now I can go through and delete a lot of code and then hook up https://github.com/ncannasse/hss into the asset pipeline for some extra magic assembling the styles
how tf did you do that so fast lmao
ah, this is soo cool now. I can focus very easily on supporting all these cools css visuals
I guess the next step is to promote css files to a dedicated cortex resource so they can load®ister other resources as hard dependencies. That way a css file could include fonts and images that are automatically managed by the resource manager. hmmm
So you plan on automatically extracting the dependencies out of the CSS file?
That would be really useful
Altough what if you have some kind of global CSS file, wouldn't that mean some resources would be kept loaded even when not needed?
I'd argue that a global resource that is not used shouldnt be a global resource
concerning css files, dont plan on having multiple css files per ui canvas. It'll be a baked css containing all styles for canvas' ui tree
multiple files per components, compiling css templates, etc will be part of authoring / asset time. means way less complexity at runtime
There is the convention that the engine should only load runtime optimized formats, in case of css files for different uis this can lead to duplication of styles, but who really cares about those strings, since we gain contained resource contexts, removing a shitton of complexity. linked dependencies like images that are used by different things will only get loaded once and reused anyway
Ah I see
hmm, i think there are some bugs in linc_bgfx debugdraw extension
this is such a fucking puzzle
aaaaand the puzzle is solved
stylesheets can now reference images as dependencies and shit has a proper lifecycle
WideHaxeNinja.jpg
since you are making a UI library from scratch, can you correct color to be text-color
looks really good tho!
haha, I know what you mean. though when it comes to css color is the foreground color that's applied to text & decorations
I'd like to mimic normal css as close as possible since i want it to be the primary way of setting up basic UIs in cortex
decorations are basically part of the text, but yeah i get you
and people should be able to plug in a preprocessor of their choice
speaking of, are you planning to port hss to haxe?
i know you were talking about supporting hss
nah, hss is still being maintained and it serves me well since it's so lightweight using neko
but you might as well use less or sass as a pre-processor
glad you like it
omfg, my castle fork gets PRs
didnt realize!
I doubt that 😄
in any case there are some cool changes in the lib I have to investigate
the hot reloading is perdy 🙂
PR is merged 😄
https://github.com/HaxeFoundation/hxcpp/pull/1153
Problem Statement
As a Haxe developer I want to be able to reliably profile the performance of my engine & hxcpp apps in a ergonomic, lightweight and battletested manner.
I have looked at H...
it's magical
i havent followed the full convo (was a way last weekend) - is this a replacement for haxeui in cortex, or an alternative, or... .... ... ?
This is me on my quest of adding a no-dependency developer console to the engine
"developer console" as in, dunno, something like chrome dev tools?
It's the old ui lib with the web event handling I showed you at some point, undusted for cortex and added your haxeui styles modules
and added your haxeui styles modules
thats interesting... so it reuses the style sheets from, say, the default theme?
ingame console, you know to run commands and stuff
gotcha
it can, but I stripped/disabled a couple of things like imports or functions
also Variant is disabled
basically simplifying it a bit
gotcha, tbh, that whole sub system needs a good rewrite / refactor... that huge Style.hx class is... ... unwieldy
I noticed, there are a few parts that can be improved or straight up deleted
but it's ok, it gives me just enough flexibility to experiment
i think there is alot of technical debt in that class / system... its one of the original systems - and hasnt evolved much over time, just added to
thankfully, i think its one of the more "simple" (relatively) systems - and i dont think it should be hard to come up with something much nicer - famous last words ofc 😄
4 weeks later:
- commit: better style system
- revert commit: better style system
- commit: better style system
- revert commit: better style system
- commit: better style system
- revert commit: better style system
😄
i must confess, i havent run cortex since the very simple PoC / MVP from ages ago, and since you move at DazSpeed im sure LOADS has changed
the event phases + filtering is something quite simple & powerfull
yeah, i still need to relook at event system in haxeui (thats one of the more complex things on the list)... time is always a limiting factor though
DAZSPEED! lol, but yeah, lots of nice new things
do this with "[showcase]"
this is insane news
DAZGREAT
DAZAKAZAM
[showcase] Happy to report that the Tracy Profiler Integration has been merged today and is now officially a part of hxcpp. ❤️
https://github.com/HaxeFoundation/hxcpp/pull/1153
Hi, @void condor, Does Tracy Analyzer support running on Mac?
Not sure about the UI app, but looking at the documentation pdf, section 2.1.9.3 Apple woes it does
@ionic badger he is trolling again
im slowly pretty annoyed by this childish crap every other day
you might need to build the 0.11.1 UI app yourself for Mac I think, since they only supply the window builds in official releases
Thank you
do you get notified about emojis or something? I dont get why its "an issue"... like, i mean, they are being wanky, immature little weirdos, but do you get notified or something?
I use the keyword tracker and get a bot message everytime cortex is mentioned. The dude writes random shit containing "cortex" and deletes it a sec later
I always wonder to myself why people do this kind of crap
when people have free time
they will find ways to use the time
whether productive or not doesn't particularly matter
meh, i would just boot them - i doubt sincerely they add anything to the server if this is their contribution...
¯_(ツ)_/¯
I really need to write some official documentation for tracy
getting prompts or for personal reasons?
nah, just the normal opensource stuff. People have assumptions and give very little details but want help
@languid yoke This is you, correct?
https://github.com/HaxeFoundation/hxcpp/pull/1153#issuecomment-2416909871
ahhh, yeah
just somewhere that says, "hey xyz is normal, read the full tracy doc here"
it defo needs all that info from the PR in the official docs
My tracy + haxe documentation FAQ right now is my subscription to that github pull request 😄
just pushed a few more fixes to linc_bgfx
sharing textures between bgfx and nanovg is now possible. also a few more fixes to make Bimg play along with cppia&native more nicely
@ionic badger in case you have question concerning cppia, lemme know
i definitely will do
i want to play with it at some point, for now, its not a priority cause i can't really use native target atm
time to code some more UI stuff. I need to finish this console
Cortex is the result of my hxcpp & cppia experiments, linc_bgfx and several other libs like important parts of my former haxe 3D engines that I never released. This time I throw everything into a blender and see what sticks. This thread will serve as the little progress log.
oh, I cant pin things here in the thread?
found it
finding ways around discord's permission limitations
yay, automatic layouts working
this being the vertical default one, next stop is a horizontal mode that can be set from css
ok, vertical & clipping done
UI might be one of the worst rabbit hole of them all 😄
u bet. my convention is to have as little code as possible
it's dangerously entertaining to work through building ui's
there's this instant feedback you get that a lot of things don't have 😂
😄
UI, rabbit hole? I have no idea what you mean 😄
What's left is text and scrolling, then I can finally have my console
That's a good rule, one that I only managed to apply on userland code 😬 Many times for me the trade of has been "more code in the framework to allow less code from the user" because I want to avoid project with too much boilerplate (of course another challenge is not to make the framework too strict, well well)
(macros can help in the "too much code in the framework" problem though)
That's cheating 😄
fell into that trap with hxgodot. in the end I generated one million lines of code through macros
Lol, that seems extreme
But yeah even with macros you still need to be careful with bloat
850 engine classes that needed glue binding + a proxy class
glue per field etc
agree
I guess it would have been possible to share some glue code that share the same function signature maybe?
The way the api interface worked, sadly it want really friendly to reuse shit
I STOP NOW; THAT SHIT IS BEHIND ME
I see some trauma here xD no worries
I think the problem is that you can make UI code really beautiful & functional, that makes it so addicting
clear cut objectives
its like building editors, something about these things are just fun
beautiful
it reloads so quickly
it was around a month ago when we were on voice chat trying to get reload times down 😂
don't forget, it's dazSpeed
of course stuff happens magically without us being able to even comprehend
God I love that reload
guys, I just stick to the basics, no magic here 😄
it just needs to reload the css and re-calc the styling
how do you switch from cortex ui to haxeui here?
I dont!
that's haxeui reloading?!
nonono
listen, what you see is my small ui lib that uses a modified copy of haxe.ui.styles.*
I have a macro that eats xml
it roughly behaves like haxeui xml
ahhh I thought that was the case but wasn't 100%
it's just really light, so its rapid on the recompiles
in the video there is a single cppia compile at the end when I modify the xml, css is completely decoupled from that. The engine listens for file events of resources and reloads them, and I have a dedicated resource-type for stylesheets, so it just replugs itself
now im debating scrollbars
lol
i have content sizes of the dom and now I need to decided if I do the scrollbars via css
scrollbox seems better, no?
whats the difference?
somehow I dont want to add components for them into the tree
Are you sure?
with the event system I could just intercept and steal the mouse events when the mouse is at the border of the clipping container
To me that would seem easier and more sane
What is the reason for not wanting that?
in your browser the scrollbars are not part of the content
I feel that this makes sense
hmm
Well yea
But I feel like the requirements differ alot in between a game and browser
To me personally it would make sense for scroll to be a container
I understand your point but yea
I agree with @void condor , scrollbars are not things that need to exist as separate elements in the hierarchy that describes the UI
haxeui does scrollbox, html does it in css
Ah, having an actual UI element that is a scrollable thing, this seems legit though
I was talking about the scrollbars
yeah
in Ceramic UI you have ScrollView too
although haxeui also has a scrollbar component
ok, so im gonna do it differently. any UI control that has clipping content can display scrollbars
ah wait, haxeui calls it scrollview too
might sound weird, but I think it might actually be simpler
Seem alright, but to be fair, a scrollable container is not only about having scrollbars, there's indeed the clipping, but also catching touch/mouse events to scroll the contents too. So with your method, what would be responsible to take care of that "touch/mouse event -> do scroll the element" work?
i think you will end up with a scrollview like thing, it would just be hidden from the end developer
input events run in a 3 phase cycle to targeted UI control. Any container along that event-path can read, react even intercept the input
yeah that makes sense, but then if any container can be scrollable, somehow, any container should be able to handle those event that will end up making its content scroll right?
it depends on the css, similiar to the browser you can enable/disable stuff
lemme cook and see how it comes together
I literally have no idea
Right now I get the idea, which seems quite similar to web browsers indeed. I'm just wondering where the event handling that does the actual scroll will be. I guess with your approach it will have to be part of the UI system itself somehow
Yeah I know what you mean, overflow-x/y etc...
More wondering on how to implement it 😛
xD
all it really takes is shrinking the clipping rect by the scrollbar area and then you dont even need to intercept events but can add a scroll event handler to the container based on the css
because with the approach of having an actual ScrollView element, all that event handling specific to scroll will just be in that component implementation
looking at it after a break: the event handling is actually very easy
we just add a listener general listener per control that consumes the event if it has clipping content
decided both is approaches will be possible. a simple default scrolling behavior for controls that have clipping content per CSS and for more custom stuff wiring up a vertical slider
As long as you don’t need to handle touchscreen scroll it should stay simple yeah, I guess you don’t need that anyway
lolol, touchscreen
added support for https://github.com/ncannasse/hss to the asset pipeline.
though I might be taking things a little to far, started comparing the layout algos with the browser
haxeui is much more advanced. I cant possibly replicate it in 1k lines of code
variables in the hss file
i initially read it and thought i knew what it was
i guess not 🤔
i'm just joking :p
hss has support for vars & functions which get baked into the output css
wow, that's really cool
and the variable name allow dashes
so many cool things around here in haxeland
2024/2025 is gearing up to be very "ui-centric" in haxe land
a lot of ui projects going on
you think so? My goal is to get out of ui code and focus on something as quickly as possible
in any case, the more awesome shit we have, the better. helps to grow the community
gah relative sizing is such an ass
added a little table-like evaluation to make height work
aaalmost happy
Nice
The more I look into this layout stuff I realize how everything in the browser is tightly tied to text & document flow and why it has been such a clusterfuck
Saturday afternoon and im reading & comparing w3c specification documents. It's hilarious how the quality of the specs has declined over the years
spec from 15 years ago: "The following is an overview of the assumptions & algos that defines how event-handling should work: ...."
spec from 2024: "There are events and paths. Here are some random interactive samples. TEST YOUR SKILLS!"
like wtf, why am i even surprised
lol
lol, im such an idiot. TIL that i can use my nanovg externs as static extension, making the code much more readable..
a bit more random stuff
that's so damn cool
There are a few more kinks to iron out, but Im almost happy
how much work went into this so far?
the ui is about ~2.5k lines of code
- another ~2.3k lines of code for the whole css stuff
what about mental effort?
pretty easy going. but I dont have a lot of freetime atm
I think the whole ui stuff is like a week of continous work, mostly porting, validating and rewriting parts
every time i click play on the video, its like i'm watching it for the first time
so nice 😂
obviously this stuff isn't necessary
but its just a nicety
what do you mean?
a full recompile and load in is 20seconds for me
it isn't necessary to have the "instant"
but there's a certain appreciation you get for it
ah I see
there are times where all I want to do is change some padding
but I have to wait 20 seconds to see if 1px on the left is "just right"
in those moments, something like this would be great
but in the actual construction of the "meat" the wait time is actually pretty okay, you get to ponder etc
it's about flow for me. The whole things spans across the whole engine. One day I show off the level editing 😛
i'm sure its gonna be dazling
😛
@ionic badger randomly doodling as well
That's a doodle? 🤣
That looks epic
how long did that take, what did you make that in?
aritists be like "just a doodle" and its the goddamn mona lisa
thx buddy
20mins? I used krita and a very old wacom bamboo
krita got pretty good over the years
Holy shit how many years have you been drawing for
that shading is damn good as compensation though
Yea love the shading on it
fan sketch
took 10 mins
recon i would have been close if i had more time
Great shading!
Thanks 
😎 You're welcome
particularly proud of the weight loss this guy had to do to make this pic happen
Can I hire em as my personal trainer?
Sure, you have to pay extra for him to leave the gun at home though
gun is part of the program
motivation
Not on me I hope
Oh
Okay
Yeah that seems normal
That's alright then I suppose
💪
😎

