It’s hard to find the 5-50 (?) adopters out there across space and timezones, let alone encourage them to get in touch via Github issues or YouTube comments. I try to be just easy enough to find, which seems to fit discord best.
Reddit and bluesky gave me too much stress altogether so I’m off of those.
So just in edge case you were looking for me, I’ll be checking the discord daily and I have a chance of being active between 21:30 and 00:00 CEST
Updating curves at runtime does seem to cause some cpu spikes.
Of course I try to put in some stuff to help mitigate it, but it’s pretty hard to get across all the potential of 2D vector graphics.
Most notably:
you could pack and ship a pretty tiny web game, with all the disk space you save using 2D vector graphics.
you could generate rasterized images at runtime via script using code I already built in (if you follow the button trail that is)… Even spritesheets
auto scaling images for GUI (is also in there)… Currently I’m working on auto-scaling touch button textures in my game
But also drawing collision shapes in engine way more quickly .. I dunno, seemed quite useful to me.
For 2D rendering OpenGL does seem to perform best by far on the devices I’ve tested with, but of course to make stuff look good some type of GPU based antialiasing is helpful
Which is why I’ve been lobbying a bit for likes on this pull request:
For instance by making this video about it:
I don’t know about you, but I think Godot for lightweight web games has huge potential.
I think this has a lot of uses beyond that. A LOT of published game resources come in SVG formats. Being able to manipulate them for animation could be really useful. All of Kenney’s 2D assets have alternate SVG versions - usually in sprite sheet form. Craftpix releases a lot of their art with alternate SVG versions.
How do you do it? From what I saw in your videos, you tesselate beziers and update native line and polygon nodes with tesselated points. Point count change will always trigger the whole gpu buffer update. Since in most typical bezier editing situations only a single/few segments are affected, you could do partial buffer updates for those segments only, going directly to the rendering server. The constraint would be fixing the number of sample points but that may be acceptable.
If you constantly tesselate, the obvious thing for improving performance would be to delegate that part to native code via gdextension. It’d be harder to maintain and install but you could have this version for anyone who needs performance boost.
From what I saw in your videos, you tesselate beziers and update native line and polygon nodes with tesselated points
Yes, each time ScalableVectorShape2D.curve emits changed a flag is set to invoke tessellate on it in the next _process invocation. For bézier curves I can simply invoke the native code from godot’s core.
When there are arcs registered in the ScalableVectorShape2D.arc_list those segments are tessellated by gdscript code I adapted from godsvg’s bounding-box calculation:
If you constantly tesselate, the obvious thing for improving performance would be to delegate that part to native code via gdextension
As you can see, performance optimization is not my forté, but for a lot of use-cases there are no serious bottlenecks.
That being said, if I were a good c-programmer I would probably want to have a dedicated compute thread to batch all these tessellates to… I’m not a good c-programmer though
And with only 2 focus hours per day to spend I need to pick something I can handle without too much effort: learning better c/c++ would take too long.
Also: I love the ease of shipping for web (also android based web browsers and pwa for touch interaction) and with that ease comes the nothreads compile flag