voxels data -> chunks -> marching squares contour detection -> tracing edge loops -> convex decomposition -> ear clipping triangles
and its so fasttttttt and can update in real time!
mesh parts next. i really hope i dont hit an engine limitation so much work went into this haha
@LvieReal I wish.. but being able to deploy my code to 144 million+ daily active users, with 1 click, for free - is a pretty compelling value proposition
@albie_io I dont know this one but it looks cool! Its neat that so many people in are showing me nostalgic games this reminds them of. There's clearly a lot of ideas based around this tech :D
@Fiorikto I'm not against releasing this - but it's not as useful or general purpose as it might first appear... unless you're making the exact same game as me.
Worth saying nothing here is that novel either, I've just combined a bunch of well known rendering practices together
@Fiorikto If you mean in 3D, then it would be quicker to solve that problem from scratch than try adapt this. It's a very different problem. Or you could use the new union APIs that are coming soon (or maybe even released idk).
@averlyst_@MaximumADHD Silencing issues is especially bad if you've got a big codebase because changing a type somewhere might cause errors in some other random file.
I have this static analysis tool that scans all files and looks for type errors. Catches a lot of issues before I even run the game!
@averlyst_@MaximumADHD I'm not sure I understand what you mean.
If you cast the entire object then you're pretty much defeating the point of the whole type system because issues like this are silenced
casting nil :: string | nil for just the optional properties isnt ideal but a bit better imo
One of the fun things about Luau’s new type solver is that strict table types require you to exactly match the shape of a type, even if it’s redundant to do so.
For example: A value of {} no longer fits { Field: string? }, you have to write it as { Field = nil :: string? }
@averlyst_@MaximumADHD You can do this but you lose the 'benefit' of the type system warning you if you forgot a property.
Explicitly casting each property to :: nil? means if you forget something, you get a type error on the entire constructor
@realmaloni Lots of things don't work at scale it seems, another example being the beam waterfall on my lovely toolbox terrain 🥲
I expect I'll have to use a lot of tricks to make this game look good
@realmaloni I need to be able to zoom the camera out all the way to let players see the whole map.
Even on max graphics, the engine terrain turns so blocky at this distance.
Also the collision mesh of the engine terrain seems pretty unreliable, the grenade kept falling through it.
rendering each chunk with a mesh part now
triangulation has some precision related issues and it seems like i'll need to use parts/wedges along the boundary for collisions
it slows down a bit updating the entire map like this but it's not optimised for this at all
@PolyyDev I might end up using baseparts around the edges of islands for collisions and then a visual mesh to render it.
I've done a bunch of testing and it seems pretty fast though (assuming I chunk the mesh) so thats a last resort.
Grenades now go boom. I switched the terrain over to a custom marching squares approach. It's just creating thousands of parts right now. I will try out a dynamic mesh next + hopefully proper textures