#💀 Cortex Engine
1 messages · Page 8 of 1
Im gathering all the info i can
Can i have an example
the way to learn something is to break it down into small pieces, to the point you understand it
you might know things like batching, instancing, but in the context you're doing them, these things are new
try to do these these things in the context that you're in, you'll have some idea to build on
it will be a kind of 1.5 step
I kinda have a grasp on it?
yeah but it's a new context
use that "kind of" to get you some ground in the new arena
its not necessarily the "only" way to go about things, but you're struggling so why not see if you can work out something you kind of know
it lowers the weight a bit
Yea
Focus on the things you actually need to do, in an iterative way. No need to learn it all at once
Optimization in graphics programming is a whole thing on its own. If you go into shadertoy and see the nightmare one liners people create just to avoid an if statement, it's not worth even thinking about when you're learning
u dont, you have to embrace the insanity
personally I think people should still learn with old school opengl + Nehe's tutorials.
dazConcerning
it is how graphics programming works
in the beginning you may expect to stare at an empty screen wondering why it's not rendering
luckily folks these days are pretty fortunate with tools like renderdoc
-# then realize you forgot to change a file extension in anstbi_load call
i love it when it doesn't load an image and doesn't tell me (there's probably a way im just lazy
its as convenient as getting hit in the head with a brick
oh, you had tools like RenderMonkey to prototype
I still remember writing my first bump-map shader in it. Shadermodel 2.0 was huge
what did you have for debugging specifically
tools like NSight or RenderDoc is what is commonly used now ofc
but did you have anything like that in the past
not "prototyping" but more of "debugging"
there were some tools, forgot the names, but it was mostly about tracing calls and state, which you could do by wrapping all api-calls in macros
thats pretty cool
once dumped we had simple tools that would translate these dumps into other tools like excel and images to see what was going on
these days its more about "hooking" into the graphics API itself
i wonder why the switch of methods was made?
probably ease of use?
in cases where like a texture was missing/garbage we replaced it with something that was easier to spot in memory to see if things where moved along, modes set correctly
complexity increased and tooling had to catch up
e.g. back then you were able to write shader assembly by hand, these days that is no longer feasible
I see, I guess that makes sense
But learning material & books were great
and people actually wrote shader assembly by hand? wtf
surely that was only for the most hardcore games, no?
or was this like wayyyy back
nono
geforce3 was shader model 1, assembly shaders were the rage! Suddenly you could do your own lighting
before that everything was "fixed pipeline", you had to use whatever was built into the chips
crazy to think that lighting used to be something that was part of the "fixed function" pipeline
oh lol
we said the same thing
🙂
so wait in the past there was NO programmable pipeline?
thats crazy wtf
i have it good then jeez
last time I wrote assembly shaders was ~2010 for flash's stage3d
flash was great, it was basically replaying the evolution of tech from 94-2003 in the browser. We first wrote/ported software-rasterers to AS3 and later Haxe for early flash 3d stuff and later hacked assembly shaders
supporting flash & webgl at the same time was such a brainfuck: https://github.com/dazKind/foo3d/blob/master/samples/Common/SampleShaders.hx#L56
looking through old projects: GLintercept & gDEbugger
completely forgot about gdebugger
That's pretty sick though
First iteration: https://github.com/cortex-engine/linc_jolt/tree/main
dont like the verbosity of the c-wrapper but it takes care of a lot of stuff. I might hide that by grouping functions into the extern structs
i was about to question "why jolt" then i saw a performance comparison
I would assume the api is nicer than decades old libraries too
Is this about https://jolt-framework.github.io/ ?
Jolt - an open-source framework that deploys JAMstack + Serverless applications.
Come on @void condor , don't you want to create a serverless 3D game engine
gotta run it on the edge
Multithreaded, in the sense that each thread is running on its own microservice
all systems discrete processes talking by udp
no error correction
if the physics talks the UI may choose to listen
renderer is a docker-container and physics runs in aws lambda
for purity a web server must be implemented on gpu
to send draw calls via udp as well
That's basically node.js cluster mode
gamepad input via HTTP
And a redis instance to manage framebuffers in a sorted list
You're on fire 😂
(more seriously I as thinking maybe you were trying to add some tools to do multiplayer 😛 )
Don't forget there must be some React somewhere in the stack
Does Yoga count? Afterall it's what is driving react-native
Ah ah right, but no that's cheating, you need some JSX and webpack somewhere
Actually, there's a game made with React: https://athenacrisis.com/open-source/
There is stuff like https://threlte.xyz/ out there too
(But its author got that stupid idea of making some kind of competition for what should be regular paid work: https://github.com/nkzw-tech/athena-crisis/issues/10 . One year later, turns out nobody fell into that trap, good)
I want Athena Crisis to have a much stronger AI, and I want the best AI of the genre to be built in the open to inspire every future turn-based strategy game. This is a competition to build a bette...
guessing there is a react version of this
ah yeah, the prettifier devs did the same thing
Yeah I hate that.
I actually raised the concerns on Twitter one year ago of the above competition idea because I have been following that game development, but he just pretented not to really understand what I'm saying
if anything you should do a bounty system, but not a competition lol
Yes, bounty system is alright, as long as it's very clear that somebody is taking the work and being paid for it
yeah, typically someone has to claim it first and work with the developer
Making the game open source is a great move @cpojer, but not this competition idea. You are basically inviting developers to maybe-work-for-free to improve your game.
Please consider options like what @MonoGameTeam Foundation is doing for funding new contributions more ethically
(and pointed him to MonoGame, which is managing that in a way more ethical way)
yeah, the dev is being pretty silly there
monogame looks like they had actual professionals come up with their system, not just honor system lol
have you seen react three fiber?
Yeah I've seen that. If people want to put React everywhere, even in their fridge, what can I do anyway
I think the reactive programming pattern can be very useful
I mean I guess that react could work for certain games
But that idea of replacing anything with a JS+React stack is making me sick
When there can be a clear seperation between a frontend and backend in your game
FPS? no.
Yeah, Athena Crisis using react is definitely relevant
story games or perhaps some kind of basic strategy game? maybe.
Turn-based game with low-resource-heavy graphics
^^
A Loreline frontend with React, for sure that would work
But then, if I were doing that, there is wisdom 😛
wisdom + loreline when?
Everything in its own time 😌
But the standalone app I have been mentioning in my thread will likely run with Wisdom
(and that's basically the app that will make Wisdom from experimental to production-ready)
everything is connected
😛
nicee!!
Honestly I've given it a quick shot and apart from the usual pain of setting threejs up with the whole AMD/cjs and whatsnot shit it's good.
Plans...
that's a lot of work 😅
if i may give a small suggestion
i suggest not creating externs for every one of those
instead, why not create a few small C libraries that wraps what you've listed
a lib for fonts
a lib for audio (or just a single helper function for miniaudio vorbis support)
a lib for shader compilation
and then LLGL and SDL3 are things I'd actually consider to extern
12 externs -> 3 small libs with small extenrs + 2 fully features externs
Abstractions for a lot of those libs already exists. Daz was talking about raudio which should do a lot of what you want audio wise already. Just make bindings for that. It uses miniaudio behind the scenes.
It has ogg support
That is one way to do it
But I did have problems with raudio myself
I remember I used it last year, and I got some audio files being delayed by a stupid amount (20+ seconds)
Only RAudio weirdly enough and not miniaudio itself?
Never used it. I just directly use miniaudio, but because there are a million raylib games I feel like that would be a known issue?
Not sure what file format it was, but yeah
I guess try it and see lol
¯_(ツ)_/¯
Makes sense for the audio and shader stuff
Other than that not rly
*Externs/Libraries
linc_soloud is an option too
I thought SoLoud didn't have commits in months
I mean, if it works it works
I just prefer miniaudio because the developer of miniaudio says it is better than soloud
and while he is obviously biased, he has been super helpful in the past and I have had no issues with miniaudio
Here we go again with that silly idea that something not modified is not reliable
I would be more concerned if the creator vanished or something, but he is still active on social media and stuff
Ceramic actually uses soloud's miniaudio backend
The code is open source, even if the creator vanished, you are not stuck, things are fixable
of course, but if the choice was between two equally good libraries with one having an active maintainer
It's a question of risk analysis
A library with vanished author may still be usable
But if I run into problems or get a serious issue there will be no help
Yes someone else may have a fork but that isn't a given
Soloud is a bit higher level than miniaudio. If you are using miniaudio backend with soloud, well, any issue miniaudio is facing (due to some OS breaking change for example), miniaudio is likely to get fixed, and thus you can get that fix in soloud as well. I'm not surprised soloud doesn't change much those days: it doesn't really have to
Hmmm not sure
Last time I checked I remember so loud just passing its own audio stream into minoaudio
*miniaudio
Might be wrong but that is what I remember
yes, then that's what I mean, if somehow a new windows or mac update is causing new audio driver issues
If I'm correct then everything has to be fixed within soloud
that's a miniaudio problem anyway
That is true
Sure any code could have bugs
Of course
Correct
In that sense, I don't take it as a bad thing, if soloud doesn't have commit for a few months
Anyway, each situation can have its pros and cons. I'm just being tired of the "thing doesn't look maintained because no changes for X months/years, I won't use it then" mindset, because it can be very misleading. Of course sometimes that's true you should not use some library because full of problems/bugs etc, but it should not be decided just based on how many changes happened recently, which doesn't mean much in itself
(and I'm not saying soloud should be used over miniaudio. Miniaudio alone looks alright, it's just the rationale behind the decision that triggers me 😅)
</rant>
I prefer to use supported libs
a few months with no commits doesn't imply that it isn't supported
i mean it depends on the library too lol
Again, this as a general rule doesn't make much sense imo. Some pieces of code are finite, solid and tested work and there is no point in looking for any kind of support or ongoing changes on them
Sometimes it's even a good thing that a piece of code won't be changed anytime soon. That means you can rely on it, build on top of it, without worrying that some breaking change is going to make everything fall apart
I know that's definitely not the trend at many places in software engineering, but what can I do
flxgradient hasn't been updated in two years, guess I should never use it
Ultimately, the perfect software library for me is one that does exactly what it should do, and is complete in the sense that it doesn't need any further changes
tsk tsk

Be careful, hsluv dependency of Ceramic haven't been changed for a while too
and you are using Ceramic
ceramic gets updated?
Who knows, maybe at some point the maths of colors might change and break everything
Well, yeah from time to time
But I'm very cautious in trying to minimise shipping releases that have bugs
that's why the release cycles are quite long
i want more bugs
i've learned a lot more about hxcpp, so I should be able to make some contributions to linc_dialogs sometime soon btw
I mean
Yeah
But for initial library choices it makes sense imo
In general you wanna look at the ratio between reported issues and activity in the repo
pretty much what I have been doing with linc_bgfx. it contains like 3 externs in a single lib, soon 4
You got your work cut out for you but it will be a good exercise. This is partly why I use bgfx since it covers most rendering related ones already: https://github.com/cortex-engine/bgfx/tree/608d9e36f571c3bbf8b2ff61320c1eab821a257d/3rdparty
I definitely wanna test and experiment more to see if LLMs can help with the extern grind
oh?
iirc you have nvg, bgfx and ddraw currently
what will the 4th one be?
you missed bimg
there are lots of optimized utilities in bx and bimg, also externing the included 3rd party libs can be super useful
yeah defo
I considered bgfx, but i chose LLGL over it
This'll be worth it eventually
it WILL be worth it
-# if it isn't i'll lose my mind-
LLGL seems like my best option, outside of rolling my own
thank you LLGL for including a static build option
now i only need 1 dll/so, and its MINE
also known as the Rainbow Tortilla
lmfao
Nothing compares to starting your morning with a hot coffee and reading C code that uses goto to loop over a string
quite elegant
this is even better, jumping back to re-eval previous cases
https://github.com/nothings/stb/blob/master/stb_textedit.h#L866
also saving a function call
I feel mastering goto is a very rare skill these days
very true
this code is indeed quite clever
You can get the same logic with a while loop of retry conditional
Having implemented a goto state machine, I think I am still traumatized how much it breaks the concept of the control flow
what am i missing? I'm on a version of haxe that ships the TracyProfiler.hx file and i'm using the latest git hxcpp. I have also tried a clean build a few times but keep running into this linker error
it connects if i comment out cpp.vm.tracy.TracyProfiler.frameMark(); but that's not the point 😄
got it, turns out HXCPP_TELEMETRY is a necessary flag and not an optional one x)
oh, did I list that as optional?
Which honestly isn't such a bad thing cause it opens the door to more than messy code…
But I do remember my good old days using QuickBasic and its goto's… before I even knew what functions were 😄 (I was about 10-ish and the internet wasn't what it is nowadays 😄 )
😄
ok, cortex is officially like 1 year old 😄
totally feels like 3 years
Nothing was really marked as optional or not
ah alright
So I was hunting what looked to be a bug in my keyboard handling.
turns out windows and localization is a CLUSTERFUCK:
- “Alt Gr” on german (and other) keyboards – “Alt Gr” is not the same as right-hand “Alt” on US keyboards, it essentially is a short-cut for “Control” and right-hand “Alt”.
That means I can paste shit by pressing RALT + V
even sending multiple events
testing more ui stuff
turns out I can like port http://flexboxgrid.com to hss and it magically works
pretty much copy and pasta
lolol wtf https://www.reddit.com/r/gamedev/comments/1k5327l/edge_of_chaos_iwar_2_runs_too_fast_on_modern_cpu/
yay, found a little fix that gained me 10 fps in the worst case text testcase on cppia-debug
Les petits ruisseaux font les grandes rivières
Kleinvieh macht auch Mist!
Praten we nu allemaal onze eigen talen?
Ah ah nice one
jo yop, braten von de telen! Kon mer tuten!
[totally made up shit!] 😄
[german or dutch when you have too much wine]
Text fields are such a pain
I made my peace with it. found an angle to grind through
Yeah I’m also quite happy with what I have in Ceramic, it’s modular and pretty clean, while staying totally cross platform (including unity backend) but that’s definitely not a trivial subject
I like that this is just the game engine development channel now lol
got vacations this week, decided to not sweat it. my milestone is to create all the missing pieces to have parity with my old mint ui
so textfield, scrollbars, menus, slider, dropdown & windowpanels
you support dragging selections?
a place for everybody
If you mean by that selecting text with the mouse pointer, yes
If you mean actually moving selected text around, no
selecting + dragging the selection around
Honestly I never use that
it was ok IG, got it to a pretty decent state feature-wise but it was a mess and it didn't have support for internationalization (IME)
oh and multiline didnt work
try here in discord's textfield, looks funny
But now that you ask me, if I wanted to support that, the current foundation would allow it
Also I separated the text selection and the text edition logic. So you can make a text selectable even if not editable
There may be a point where I'll add stuff to the text field. Will have to see when I get to that point, but the base is pretty good
All the fun stuff happens in SelectText and EditText components
I recall you mentioned the horizontal text scroll was missing
This should probably be a thing to add in SelectText, that takes advantage of Text’s quad clipping
thank you haxe
https://try.haxe.org/#Fa121878 i'm only getting 1 on js
is there more on cpp?
Haxe is an amazing multiplatform programming language. Check it out !
f00 does it without local vars
though on cpp the second one resolves to a proper if else if else
shouldnt hurt the average person
in my case I refactored the style system to have proper computed styles and I have the loopkups & checks in the hotpath for rendering
fps got observably worse in cppia debug. removed all the ?? checks and gained some speed again
then I also had to inline some functions, now we are back to where we were before but with a lot more css stability and some more bugfixes & features
would temp vars really cause such a massive issue or is this more to do with the interplay with cppia?
to quote Hugh: "cppia is optimized for fast compile times, not runtime performance. you wouldnt put performance critical code into your script"
and here I am compiling almost the whole engine into the script 😄
ahah
to be fair, if it helps cppia a lot, then it might also have positive side-effects for the rest
probably helpful, but might be in the realm of premature optimisation no?
nah, you wouldnt believe how easy you can speed up some things
i don't know if i want to know 😄
Tbf cppia does some JIT stuff right?
i did have a thought that this stuff was more useful for debug
im supporting 94 css directives now, these have to be looked up & queried for rendering, so that shit better be fast
It seems like a flaw of the haxe compiler that using ?? would have a noticeable effect on runtime, rather than a flaw in the user code
It looks like the local vars are required for cases where the evaluation of the expression could have side effects, maybe it could be optimised for cases of direct variable access
Isnt ?? just syntax sugar for A == null ? B : A
it is
Yeah, but evaluating A twice may give unintended side effects, which is why it becomes var tmp = A; tmp == null ? B : tmp;
I dont rly understand
Can i have an example of a side effect
function call():Null<Int> {
Sys.println("hello world");
return 10;
}
function main() {
// "hello world" should be printed once
trace(call() ?? 0);
// "hello world" is printed twice
trace(call() == null ? 0 : call());
}
Ohhhh
Makes sense
Not surprising to avoid evaluating things multiple times, but i'd also expect that to be fairly well optimized by compilers
Ah, maybe on cppia that's another story right
OOOOOHHH!!!

This is the kind of thing I keep talking about that's missing from haxeui
lol, well this is actually just parts of the haxeui style + animation hacked into my ui. You can totally do the same css animations in haxeui
although not sure if layouts would resolve the same since im using flexbox for everything
looks really responsive 😄
https://haxeui.org/explorer/#miscellaneous/animation/animated_dots demo of keyframe css animations
it has defo been there longer than a year 😂
I SWEAAAR Billy, I would ask about this and you would link me the animations tools section where the text field just shakey a little. I kept asking about css animations and no one knew what I meant XD
Srd has dementia
I might
At the very least this animations section demonstrating css animations is recent
i don't remember the convo buuut
granted, i've defo missed sub category items in the explorer list
NO THERES NO WAY I WOULD MISS THAT 
xD
I literally told you you have dementia
If I can PROVE, these animation pages weren't up on the site BEFORE June 2023, I am sane
Otherwise it's time to lock me up
New roundup topic
FR XD
bro, you literally just said "thanks" and didn't go into any more questioning 🤣
Tbf it was during a roundup roundup, so I was probably in the middle of me talking but I wanted to acknowledge it
Iirc I explained the css stuff specifically in the voice chat

Ian enters the room
https://github.com/haxeui/component-explorer/blob/master/src/views/AnimatedDotsView.hx - 3 years ago - and css animations have been there for ages and ages - i hate them though 😄

Well well srd
oh no
lol
As you said
The only downside with css animations: The real cool animation all need transform support
yeah, i want to add transform support - arguably, for a ui system is better / more useful than the "normal" animations
guess im hackin that now
but i hate the syntax of css animations, like, really hate it
fair enough... let me just grab... my keys from my pocket...
SomeRanDementia
Too bad the door is locked
You ain't getting away chief
same, though I feel like you can do quite a bit these days https://gradienty.codes/animations
What do y'all do for the final, exported asset format
Just copy the files over? Embed them? Compression?
Every solution has its own pros and cons
You should choose whatever is applicable to you

I'm looking FOR solutions
build a game
You can start with something simple like loading png files so you can do other stuff
Right now you are building a web browser xD
Pros: simple as shit, ocns: not ideal
Not loading files
I mean the final output format for the application assets
yeah, the other thing that super useful about using the god awful syntax is it allows users and themes to supply their own animations, which is defo alot more complex if you dont use them
Kha has its whole image format stuff
You can also do something in between multiple solutions
But you should start with loading a basic png and displaying a textured quad
Easiest way is just using haxe’s resource system
There are a million ways though.
Many ways to do things, each one has its own advantages and disadvantages
wait till i plug in wisdom and tracker. I already scouted the backend api and see no issue for cortex ui 😄
Already did that
Then roll with it for now
Don't prematurely search for solutions (as you said) for problems that don't exist yet
Screw it
I'll just copy the assets over to export and come up with a better technique later
Sure
Maybe some form of compressed archive later
yeah, 100%. having plug&play themes kicks ass
Once you have something that can build games you could look into optimising everything including your resource pipeline (atleast in the case of your first engine)
You cannot plan out an entire engine when you've not built one before
I'm trying to think of as much as possible
This is why you build your "thing" first or at least some of it, because all of these questions are already answered
"whilst building project x, i kept tripping up on the way y framework was doing z - how would I change that?
That would definitely be a fun use case 😄
Otherwise, because you have no actual end goal, you become very mentally trapped because there's no focus
everything becomes a potential option
Fair point
I'll start working soon
I have some things I want to work on before starting work on Beacon
also, if you find yourself not sure on what way to do something, try consulting your experience. "Did I have any complaints the way flixel/lime did asset management? yes? see if you can improve that. no? just do the same thing as you're used to it and can always iterate on it later
Good point
hmm, I think I will refactor the whole animation system a little. @pearl slate does haxeui support multiple animations in one animation directive?
asking before I try to analyze the parser
do you have an example?
animation: rotate 1s, spin 3s;
animation: grow 0.2s linear 0s 1, highlightgriditem 0.2s linear 0s 1;
animation: sizedotitem 0.2s ease 0s 1 reverse backwards; is in the dot demo if that's what you mean
basically comma separated.
thats a single animation
ahh
from the looks of it, I think the style does not support it, since you need a list of animations + options
that also means I need a mixer for multiple animations working the same properties
hmm
thinking about this starts to hurt 😄
ah, i dont think so
in fact, fairly sure "no"
i think it applies the style and then sees if there is an animation accociated with the final style, and then applies that one to the component
i might try something else first
ok, I got a prototype for transitions working
Ok, gotta clean that up a little, but we slowly building a bouncy castle 😄
Add A JS engine and you have a browser
not really. it's just animated boxes 🙂
if haxeui used <div> instead of box's you could probably get pretty close to copy pasting html layouts into haxeui lol
cortex' ui doesnt really care about the tagname
it's only important for special controls and stylesheets
you can already copy stuff but it's kinda pointless since you also need to have the styles setup
yeah, layouts are rarely the hard thing to handle
it's the styling lol
what's your ui structure like, you have some amalgamation of various ui things
casually recreating Qt Qml
you're using some library to handle boxes, but you're also using haxeui and iirc you also have your own renderer/parser
is the structure
cortex ui ->
-> flowboxes
-> haxeui
-> custom thing
you've got some kind of abstraction setup going on?
it's not that fragmented
if you want a UI canvas, you need to add it as a component to an entity in the scene, then the other engine systems take over, resource management takes care of files/resources, supply input and render it where it wants to be.
might sound weird, but this way it becomes super flexible and arbitary game objects can have their own full UI
pretty cool
thanks 🙂
AAAAAAAAAAAAAAAAAAAAAAAAAAAA
?
Nothin
LGTM, Ship it! 🙈
If I would ever want to intentionally create a such a fucked up menu, im pretty sure I wouldnt know how
wow, 2am and I added matrix based transforms to the displaylist and it just works?!
now I gotta add oobbs and think of an solution for the scissor rects
shit got expensive. will have to optimize all this new math
ah ofc. the whole frustum culling is fucked in this case
ok, translation, scaling, skewing & rotation can be applied through the hierarchy. now I need to fix the hit detection and wire that shit up for transitions and animations
last goofy one for the night 🙂
prepared in advance for when the UI designer shows some wraparound scifi UI concept and the art director hates the programmers
nice power metal too
omg the skewed render on the boxes with contents looks so nice actually
Totally off topic, but got a desk setup update xD (easily removable so can switch to one setup to the other)
[showcase] Finally added CSS transforms, transition and animation to cortex' UI system. 😄
Im not even sure what im looking at. You stand in front of this?
could also be a platform for your cat to review code?
xD
It's an adapter to create a standing desk yes
Honestly that's very effective
Cats didn't try to climb it (yet)
i completely destroyed shit. will post later once shit is fixed
Have you heard of open usd? Universal scene descriptor?
Sure. what about it?
Would be nice to be able to have it be used by a 3d game engine in Haxe
Open United States Dollar
-# /j
Keep the css transforms and the elastic easings, the rest can be discarded
It's an interchange format similiar to gltf, so shipping something with it doesnt make sense to me
Also makes it easy for people to steal assets
I see
aaaand back in action
had to rework this whole css directive stuff around multi-domain values
im so happy that I can use HSS, its rule file gives a nice overview of the bullshit you have to account for
Also realized that i only need to compile the ui lib into cppia while working on it. once it is stable I can just include it in the host and we gain all the speed back while still being able to iterate UIs
a few stats, the whole engine
which includes the ui lib
bruh 0. 06s?!
2x2TB nmve ssds 😛
What are your plans for shader language syntax?
got none. it's already solved
Ok let me reformulate, how do you solve it xD
I use bgfx and have its shaderc transpiler
That looks like glsl
it is based on glsl
why u asking?
Oh the include thing is nice. Def something I miss when using glsl
I have high performance nvme ssds 😩
how do i shove haxeui and ceramic into a cppia host
in your host's hxml
gonna need to do some googling, I don't even know how to compile a host
also disable dce
Huh can you just use any hxcpp library with cppia
Just curious, at some point I’d like Ceramic to auto-convert glsl shaders to equivalent for unity backend for instance
only if your externs support it. hence why i tweaked all these linc_* libs
The way I tried to setup cppia last time was to build most of ceramic runtime with c++, and only cppia the app itself, so externs arz not really and issue as not used dirzctly
we only need the externs if we want to use the apis right?
If the externs are only used directly by the c++ host it’s fine
I'm in an isolated environment because I just want to focus on ui stuff and not get distracted by app things
so if I can speed up these compiles that would be super cool
Realistically, I’ll probably try cppia again when haxe 5 get released
Or when some remaining fix related to cppia is merged to haxe 4. I don’t recall exactly but on openfl discord something was mentioned. Will have to find the link when I’m on a computer again m
if you are lucky. it should work as long as there is no public api using native types visible to cppia. a single method with a native parameter type will make cppia complain (cant unify with Dynamic)
happened to me a lot in the beginning, esp by force including all code + dce off
ah right
From what it sounds like, you have to precompile the host
but all guides online say you need a script file ahead of time
that's bc hxcpp includes a Host with all the std stuff
noone uses that
so just build your own exe that loads a cppia script and calls its main function
I did the whole setup in the past, it worked, except some weird inheritance bug that stopped me for good
for ceramic specifically?
Yes
It might work for me as i'm using a nightly haxe
i think that might be fixed, i hit something like that, and iirc, Daz minimal repro'd and it got solved
what did you put as the init for the script as ceramic doesn't have a static main? did you just do new Project()
if you have your setup available, i'd happily try and run it 😄
Ceramic does have a static main, it’s just part of the backend
There are some relics of it in the codebase, but nothing usable sorry
oh cool, do you remember what you did to init ceramic?
is it just reference that static main
managed to get a simple example going, have an idea of the structure now
I don't know if what I did is correct, but I basically had the host check if the compiled script changed by checking the file stat
is there something more "built in" or is that "the way"?
I'm planning on writing my own shader cross compiler (GLSL->HLSL, SPIR-V, etc) for HaxeLumina
until then I can only test with LLGL/OpenGL
Most operating systems have some form of file watch api. Linux has inotify for instance
There are abstraction libraries like fswatch out there.
hopefully i'm not naive in thinking the haxe sys api file stat works on all platforms 😄
Look into this maybe
linc_filewatch
I use that to monitor the script and the asset folder
I really have to add all the different easing types now, this wobbly shit in transitions gives the whole thing such a trolly character 😛
import cpp.cppia.Host;
import sys.FileSystem;
class Main {
static var scriptPath:String = '../client/script.cppia';
public static function main() {
var lastModified = FileSystem.stat(scriptPath).mtime.getTime();
Host.runFile(scriptPath);
while (true) {
Sys.sleep(0.5);
var newModified = FileSystem.stat(scriptPath).mtime.getTime();
if (newModified > lastModified) {
Sys.println("Reloading script: " + scriptPath);
lastModified = newModified;
Host.runFile(scriptPath);
}
}
}
}
``` I just did this for now
want to keep things simple because i have no idea how any of this works
makes sense
is this the beginning of your text input stuff?
your ui is going to be so effectful 😆
how are you wobbling the cursor 😂
1-2 lines of css 😄
CSS transitions provide a way to control animation speed when changing CSS properties. Instead of having property changes take effect immediately, you can cause the changes in a property to take place over a period of time. For example, if you change the color of an element from white to black, usually the change is instantaneous. With CSS trans...
havent touch it yet. its the simple one I had so far. decided I wanna check how dynamic I can make shit
The way I did it was create a host that is an empty ceramic app with Project.hx that loads a cppia script which has a starting point very close to Project. You created a CPPIAProject.hx file next to Project.hx and that would be run
As long as the host includes all the ceramic types you need, you are good to go
There is a ceramic.AllApi module made to reference all those types
So you build the host without any dce and that’s it
Oh! I think I kinda get it will have a play. I can't create 2 ceramic.yml files, so I guess we use the ceramic file for the host and then we just use normal hxmls for cppia scripts?
No the same ceramic.yml
Cppia is just a different target
(But some changes in clay backend to add that cppia target are currently disabled)
but as a workaround for your tests, you could try with a regular hxml yeah
Does the client need to reference the libraries as well? how does completion work in this case?
maybe i just forget about completion for now and see if i can just get ceramic compiled into a host
Add this to your host: -D dll-export=bin/export_classes.info
and this to your script: -D dll-import=bin/export_classes.info
this should be the next looming trap people step into when building cppia with shared code
export_classes has been generated but importing it into the script doesn't seem to work
it won't compile because it can't find the files
which files
make sure you -lib .. the same for both compiles
export_classes.info is just a blacklist for the compiler for types that should be imported but not compiled for everything that gets included via -lib & -cp
lol, you are dangerous
the ceramic .hxml's are a bit full so i'm going to keep messing with it a bit
hard to know what to include and what exclude
i'll remove all ceramic flags and just include cp and libs
but i doubt that'll be wise
host compiled fine, its just getting a client script to see if it works
but why??
dont bother
if your goal is glsl, don't
if your goal is hlsl, don't
if your goal is some kind of modified version of hlsl (quite common) then also don't
LLGL doesn't have one, and requires you to supply the shaders
Im not writing the same shader 4 times
why not extern spirv-cross/glslang or use shaderc (like daz)
Thats
What im doing
or write a helper class and extern 2 functions of that
Cobalt — 19:31
I'm planning on writing my own shader cross compiler (GLSL->HLSL, SPIR-V, etc) for HaxeLuminauntil then I can only test with LLGL/OpenGL
Yea
With glslang and spirv-cross
I refuse to write HLSL
that's not writing your own shader cross compiler then lol
don't scare me like that
Technically its cross compiling the sources...
@clear domeCan't seem to figure out the right combo of client flags, do you happen to have any idea on what to put?
Your own
and to that I said (summed up): "That is not a good idea"
Ah whatever specifics don't matter, anyway.
English is a dumb language
Lets all speak in machine code
I'm not gonna manually write a parser for GLSL n stuff
good good
I'm just gonna combine two libraries
This project is large enough as is, im not planning to fully go insane
May as well mine my own silicon at that point
Make my own CPU and GPU
I mean iirc Robert made alot of contributions to SPIRV-cross funnily enough
wait let me check
yeah he did
Fun fact that you might have not known yet lol
(creator of Kha)
good news, im an idiot
turns out I disabled dirtyFlags and every control ran its transform calculation every frame... even when things didnt change. This is why I lost a lot perf in the text-demo. now we made an almost +30 fps jump in cppia
tweenxcore is such a useful little beast
very so
@pearl slate hey where is your head at concerning haxe.ui.styles? Planning any changes there? If you want i can give you access to my computed styles & transition / animation rework
@void condor how does things like statics translate from host to client
it seems like the host doesn't seem to run ceramic's scene setup, not sure what's going on
class MainScene extends Scene {
var logo:Quad;
public function new() {
super();
trace('here');
}
override function preload() {
// Add any asset you want to load here
trace('here');
assets.add(Images.CERAMIC);
}
override function create() {
trace('here');
}
}
the preload() and create() don't get called, but the constructor does get called
statics? same as other fields? if its a class in the host and the client finds it in the class info list it will use the host ones
Oh! I lied, it does seem to work, what isn't working I think is the asset isn't being loaded 🤔
change the string you print. you might get confused since its all the same string 😛
altough by default it should show the line
btw, make sure you compile your script with -debug to get line numbers
i have line numbers
its cool, its working but kind of
the create function only seems to get called once
maybe in prints, but not in stacktraces
is there something I need to do to tell it to rebuild the whole class?
I have literally no idea how your setup looks like 😄
sorry, new thing to play with is pretty fun 😅
lemme draw up how it works in cortex
class Main extends Entity {
public static function main() {
app.scenes.main = new MainScene();
}
}
``` My scripts entry point is this
for some reason I have to explicitly call create() which should be an automatic thing
the tween is running but the quad isn't changing
@clear dome It's possible, just might be some small tweaks 😄
just noticed the tween does run 😄
If you need to call an overrided method explicitly when that should be called already, that definitely look like a cppia bug
It could be, I had to drop down to 4.3.6 to get this to compile
forgot about that
the host is still on nightly haxe though
I think some fixes in haxe5 are needed based on what I’ve seen on openfl discord
I'll try upgrading to absolutely latest nightly, my project wont run on that but i think that's fine for now
Maybe dazKind doesn’t have such issue because he builds the whole project to cppia mostly
oh jeez, it compiles on latest nightly haxe
but compile times are now 8.5s and create is still not called lol
on 4.3.6 they were 2.5
i'll stop playing, pretty cool that it's possible tho
i'll keep the project around if anyone wants it to play with
hm. relooking at the video, it looks like the old mainscene still exists
and it draws over the top of it
sry, got distracted by super secret, super exciting haxe stuff
lol dw
i'm happy to know that its possible to get cppia working
just might require a deeper dive
lifecycle is important. in cortex things are torn down with every reload
as in it resets to a neutral state before the script is executed
I can probably set that up locally as a test but I don't think it will solve why create isn't called
i don't understand why it isn't, preload gets called
must be some logic in ceramic that isn't compatible with cppia
seems weird tho
ah well, fun for another day x)
in simple terms
omitted the init / shutdown, that should clear any state you dont want to survive
basically using static initialization as a registry mechanism instead of any main function / macro / type bullshit
I think it might be something to do with ceramic's build macros
some init things aren't getting applied to the scenes that I have in the client
i wonder if it would work if i add the main scene to the host
Yeah, everything works if the scene is on the host
this might actually be fine for my current use case though, because i'm not actually using scenes at all 😂
I just want to be able to do haxeui dev a bit faster
daz have any idea why compile times are 4x higher on latest nightly haxe?
You are the emissary doing the exploration of ceramic+cppia, good luck xD
debug build of compiler?
ah, could be
next test, see if i can hotreload some haxeui stuff 😄
haxeui doesn't work, invalid cast
maybe it's a setup issue as well, daz can compile haxeui via cppia🤔
seems like cppia doesn't like something with haxeui grids
it takes 14seconds to rebuild and previous components remain... but hey... its working
14s rebuild isn't a nightly issue, occurs on 4.3.6 as well for some reason. No idea what randomly started to cause that
macros?
Tf
i assumed it was change of haxe version because that's when it occured but i just downgraded to 4.3 and the issue remains
ò.Ó
nah
lol
That makes it even weirder honestly
vscode sucks
using vscode 14s
might be using ceramic's haxe which is an older nightly
but, this path isn't worth going further
4s recompile time is longer than my normal rebuild time
hmmm yoga is not re-flowing all subtrees correctly. I wonder what im doing wrong
finally
gotta be careful, browsers do more shit to resolve flex-basis & constraints
now my flex grid properly scales and adjust ❤️
Layouts? I just .x .y .w .h my way through life
I think about the "<v" layout engine once per day
[showcase] Here's a random fact about cortex' ui system: text blocks can be an illusion, every word a full-blown control/element with events, css styles, transitions & animations and mixed into the flexbox layout flow with other elements 🙈
ok, this is awesome
now I really gotta wire up the transfoms
coz they will enable completely next level shit
that's so fucking cool
no need to write more logic to separate text and control it individually 
how are you positioning the inner interactive elements here
<label text="hey wassup" />
``` is the way haxeui handles things, are you stringing together multiple label components?
Every word becomes a "label". The xml macro works sorta like html. it will split things up and generate the controls.
<div class="foo">Lorem ipsum dolor sit amet,<div class="logo_ai"/> consectetur adipiscing...</div>
this is the default with the macro. In the end It's about flexibility. you have a couple of choices. Like all controls can also have a text property you can use (<div text='Lorem ipsum dolor...'>) and have a single control with a lot of text. The whole thing would layout as a single block(rectangle) and you can NOT mix other controls into its text flow
math kicks so much ass
since I moved to a matrix transfom(rotate, scale, skew, translate) per node I can no longer use simple axis-aligned bounding boxes for frustum culling and input. Had to math a little more and now it's all working pixel perfect without costing too much performance ❤️
Almost fainted thinking about doing this in openfl
doesnt openfl's display list do the same? from my flash days i remember there was a matrix property somewhere
I’m thinking specifically about the text, the matrix math would work fine
The relayout every time you hover… I think individual word shaping is cached now so it wouldn’t hit perf as badly
ah yes, my approach to text shaping/layout is very different. I just support basic shaping for now. No harfbuzz magic 😄
holy shit this is awesome
oh wow, nested text is pretty bad ass
what do your divs become? just haxeui box's?
Wait, it also transforms input back to coordinates on the component's surface??
that's sick
I guess it does make sense considering your goal is 3D UI
oh, those must become that flexbox lib you're talking about right?
any html tag becomes a cortex.ui.core.Control, which then can be laid out by yoga or the user
nono, the ui is exclusively 2D but can be rendered as a texture onto a 3D mesh
the transforms supported by cortex.ui.core.Control is just a 2x3 Matrix that can be used to fake 3D. a real 3d object would require 3x4 minimum, so lotsa more ops
i see
but the input can handle any 2d transformation?
size, pos, skew, rotation, etc?
sure. here is how the slider deals with mouse clicks. rot, scale, skew, pos are included in a single matrix
I noticed the icons change colour when you hover over them, how are you doing that?
do you just have highlight doubles of each icon or are you changing the icon colour itself?
i would like to support that in the ceramic backend 👀
the icon list at the top? That's are actually text as well. I just change the color attribute on :hover in css.
ahhh!!! text icons, clever! never even thought about that!
what font is that then? 😄
lemme check
do you just google icon font or something like that?
it's an older version of https://entypo.webflow.com that I use
Entypo is a suite of 411 carefully crafted premium pictograms by Daniel Bruce.
damn that's such a cool idea 😄
what do you think emojis are
never thought about it
just thought they were inline pictures
or at least that's what i think i thought by thinking about it now
Search ENTYPO in ceramic codebase 😛
i've never seen that come up :o
ahh its in the elements plugin!
i've done like 0 design stuff in years
it is a pretty old icon library
it's brand new to me 
i like lucide, but it doesn't have filled icons
lucide is nice, but sometimes i want icons to change colour you know
you can do that with any icon library?
at runtime?
sure?
same way as entypo (turn it into a font) or you can just tint a white version of the icon
lucide is a font???
i've been downloading images from there 🤣
where's the "download as font" button
nice!
not sure of how good an idea it is though, you would just be embedding every single icon
can consider that if I ever run into performance issues 😂
i'd be surprised if a font took out ceramic tho
no, but it would be a very big bitmap
ahhh i see
ah well, these are technical details i would evaluate at the time of implementation
i'm just happy to learn of the new thing
or you can just tint a white version of the icon
anyways pretty sure with ceramic you can just set the color of an image and it'll tint it
that's what i initially thought daz was doing
i don't know what the technical details of tinting is to implement it the backend
i swear i tried that, but maybe i just haven't mapped it properly 
this is how bg-color translates 😄
need to figure out what tint maps to in backend land
naw, i think das is using font glyphs, but the principle is the same: https://haxeui.org/builder/?b8a0c799
obviously with the text (non smilies) it doesnt make much sense, you could just use color
check the ceramic demo
yeah fonts come with a few bonus things compared to normal images+filter
font size i would imagine?
weight, kerning etc. Im gonna add sdf support at some point then outlines etc
bruh so easy 😄
weight is interesting, basically "stroke width"? Does it actually work / look right? Depends on the font / glyph?
I was literally thinking about 30 mins ago... hmm, i'm going to want to try and restyle that checkbox
Here is a test string for ya: ‖ ℹ ← ↑ → ↓ ↰ ↳ ⇆ ∞ ⊕ ⊖ ⊞ ⊟ ⌂ ⌨ ⌫ ⏩ ⏪ ⏭ ⏮ ⏳ ⏴ ⏵ ⏶ ⏷ ■ ▴ ▶ ▸ ▾ ◂ ● ◑ ◴ ☁ ★ ☆ ☕ ☰ ☽ ♡ ♥ ♪ ♫ ⚏ ⚑ ⚒ ⚙ ⚠ ⚡ ⛈ ✇ ✈ ✉ ✎ ✒ ✓ ✖ ❌ ❎ ❓ ❞ ➕ ➖ ➡ ➢ ➦ ⟲ ⟳ ⬅ ⬆ ⬇
what am i supposed to do with this 😂
copy it as string into your sample
i hope the roboto font will even render it
entypo will
ah entyo isn't available out of the box
its in a plugin that i don't use
will need to grab it
just add the font to your haxeui theme?
it's a bit of effort
assuming your backend loads the theme fonts/resources
gotta download, then convert the font to bitmap, then gotta preload
bitmap?!
Ceramic uses msdf bitmap fonts
ah I see
That being said it could be a thing to add runtime ttf/otf support, but that’s not a priority
Basically if I were doing that it would create a bitmap font on the fly from ttf. Kha does that I believe
would be sick
(At runtime)
But latest Ceramic already allows to add a ttf or otf font in assets, and it is converted to msdf at build time (did it for my ld57)
*takes notes
any cons to that?
I feel like you could use bmfont on the command line
i don't have it installed and ceramic ships with a way to do it out of the box
just being a bit lazy x)
oh, i just downloaded entypo and its all svgs
It needs a font rasterization library at runtime, so that’s one more thing you have to implement in every backend
so my plan for lumin-
(generate MTSDF atlases at build-time for builtin + asset fonts, but include support or generating the atlases at runtime too)
imo, both has to be possible. right now cortex uses ttf + a dynamic atlas via nanovg & fontstash. once I need more quality stuff I add my old msdf tool in the resourcepipeline and tweak nanovg. maybe replace it with https://github.com/styluslabs/nanovgXC. we'll see. we accept shitty font visuals for now
you say shit, but the videos seem to all show some quite good looking text
certainly usable any how
oh you been styling your finance thing?
a bit too constrasty
there are a lot of colors going on
i gotta finish something up, but after that I'll make a few mock ups
To be fair, I think you can make good looking text with Ceramic msdf fonts, given that it’s properly scaled for the screen
Using ttf at runtime wouldn’t give a very different visual output. At the end, you are rasterizing font glyphs to bitmap font glyphs and displaying them
ttf runtime support can still be useful, for example when you need to support CJK characters, or if you want to use system fonts
nah i have no beef with ceramic's font rendering, just messing with !b
In terms of workflow, being able to just put a ttf/otf font in assets folder is already a nice addition that doesn’t add any runtime requirements
Anyway, if I add runtime font rasterization, it will be optional, from a ceramic plugin
I am also thinking about supporting (optional) meta files next to asset files. Tried to avoid them, but getting more and more use cases where it could be useful, like when putting a ttf font and wanting to configure the rasterization settings, which list of characters to include etc…
(For now just thinking, nothing planned short term, but might be added in a future version of Ceramic)
😉 one of my old engine's meta files
current version of the concept in cortex
cool idea, especially with icon fonts being a thing
the good thing is that you can also include target specific override settings
downside: you need some cli tools or an editor to manage these files easily
On ceramic, obviously, that will be yaml heh
lol
aw man i was hoping for sqlite
disappointing. I was hoping for plist
isnt that just xml lol
It's XML structured like JSON
o
Which is a shame, because you get the downsides of both JSON and XML and no upside
xD
The other interrogation I have is what file extension to use. Just .meta files like in Unity? Maybe that's the most straightforward idk
.meta.yml
.ttf.yml lol
nah
.ini
I just suffix .cxr 😛
yeah use the .ini extension but have yaml inside it
😄
what's cxr
cortex
Ah lol
shit I made up, cortex-resource
.cer
(but that's already a "certificate" extension, not "ceramic resource")
For now best candidate is just .meta, but as long as it's not done, it's not definitive
there is a really funny discord message (that I can't find right now) from the founder of Hashicorp (and creator of HCL) talking about meeting the designer of yaml
i recognized that example instantly lol
@void condor #787070137756418079 message still inheritance issues with haxe 4.3.7 and cppia apparently 😦
the issues don't occur on nightly
Not sure, apparently it doesn’t happen on « simple use cases »
cppia + ceramic works, it has some issues with ceramic but they're macro setup issues
i think if it can work with ceramic its pretty solid - no?
It works until it doesn’t, can’t rely on cppia if it breaks randomly on a bigger project, that’s what happened to me the first time I tried it, small projects worked, Make More Views didn’t
interesting that it worked for you 🤔
Can’t say it work without testing it on large codebases. If some day it works on my bigger Ceramic projects, I may start to trust it, but apparently from other devs feeback we aren’t there yet
Fair I guess, I gave up on investigating it because haxeui + ceramic on cppia took longer to compile than electron and a new project
I’m pretty sure daz doesn’t hit that issue because he builds everything with cppia so nothing in cppia part has to inherit from host part
oh, that makes sense
do you have a repro for the issue at all? I could test it with my cppia setup
no. I use inheritance for all kinds of things. I specifically compile the engine core into the host and derive from stuff once it gets stable. I guess you are triggering an edge case that is off the beaten path. If you cant debug or report it, chances for a fix are low. So I guess no cppia for you? 😄
When I hit the issue, I tried to reproduce it on a smaller project that I could share, but no, it only happened on the actual game project and I can’t share that one
does the openfl one you linked have any simple repro?
He is trying to make a repro case too apparently
though luck, but fair. I would have prolly compared the virtual lookups in the runtime for both sample and project to get an idea
again, this cppia stuff is no rocketscience when it comes down to how it works
Cortex/HL when 
i don't think it'll happen
oh I can answer that: never
cppia is pretty op for daz 😂
I dont get why people find HL interesting. It's just an improved neko that reinvents a lot of shit like externs and bindings, needs its own GC, barely works in C builds and has no host + script interop.
Like on paper hxcpp + cppia is better in every way for even more years
in the outer haxe world hl is the quick compile target
so it just gets natural attention
cppia is a buried thing that nobody knows about or has planned to work with
HL is more supported in the haxe foundation
Tier 3 vs Tier 2 (hxcpp)
all that means is that the foundation will invest time into it themself
it doesn't necessarily mean that hl is better or worse
does anything HL even work on mobile?
its possible but i believe its buggy/untested
i remember asking about this a long while ago in the heaps channel and someone mentioned that deadcells had a hl mobile version but it was so buggy, it was pulled, they hired a 3rd party to port it to android/mobile and released that instead
well, anything that shiro doesnt release for is buggy and untested
but that's a secondary source, no idea on how true that is
noone in their right mind will pick HL to release something commercial except for shiro. sad fact
on the other side: hxcpp has made millionaires
they don't need to target anything but windows because they've got massive reach
hl can compile to linux but they ship the windows executable and have it run through wine instead
that's what I call a deadend. I wonder if you can easily reverse engineer the source code from bytecode
however they do have someone working on hl now and i think they're pretty interested in better cross platform support
"they" are. but noone else really. And if I have to choose I'd rather stick to community supported tech (hxcpp) than company supported tech (HL)
any PR you send to HL will get eyed as a risk or low prio for Shiro internals, so it will linger around till they find it useful
If I ever happen to try cppia with Ceramic and hit similar issue, don’t worry you’ll be the first pinged person 😂
I’d ask for help to investigate it for sure
I wouldnt worry till hx5 release
But I’ll likely wait for more positive feeback of devs trying it before doing that myself
Things will break in hx5?
nightlies have fixes and improvements all over the place. I lost track so I dont bother with official versions for cortex anymore
with hx5 stuff should finally be in the right place
I can't wait until hx5 release honestly
an evening porting everything over sounds lovely to me
and I don't mean that sarcastically
what exactly is it about your setup that makes it so quick to compile daz? is it mostly a lack of macros in the host?
which compile you talking about?
host or script
Pretty sure theres a rust package for that
cppia reloads/scripts
why??
I have HL on linux native and it runs fine 😭
because windows and wine is tested more than hl and linux
you can check with defines and --times where you spend the time
it's a sensible approach for a low playerbase platform
Meanwhile I’m sticking to web target for reasonably fast iterations
macros and file access plays a big role. esp under windows make sure you to keep an eye on Defender, most exe's and file accesses are actually slowed down by the antivirus
I was gonna target HL primarily for haxelumina
I learned how to make extensions for it
7s on "filters" whatever that means 😄
and that's why i always put exclusions on my projects folder :P

