I wrote a Rust version of @runevision 's LayerProcGen: https://crates.io/crates/layer-proc-gen
It has a small demo in the examples (i'll set it up on GitHub pages so you can try it out in the browser soon™️)
Initially I replicated the C# 1:1 (modulo internal layers and multithreading), and then modified it to feel more Rust-like (to me) as I extended the demo further.
It's entirely game engine independent, even though the demo is written for macroquad
=> View attached media | View attached media
=> More informations about this toot | More toots from oli@hachyderm.io
@oli This is really interesting, and sounds cool!
I'm curious to better understand the differences in your version, like not having to implement layer types, and data being generated just-in-time. Unfortunately I don't know Rust well enough to really understand the code. Do you think these might work in C# as well or do they rely on Rust features?
What would be equivalents of the GetRoadsOverlappingBounds and GetRoadsOwnedWithinBounds example functions on this page?
https://runevision.github.io/LayerProcGen/md_Patterns.html
=> More informations about this toot | More toots from runevision@mastodon.gamedev.place
@runevision wrt Layers being (final?) types, not child classes:
This should definitely work in C#, too. Basically I moved the layer-specific information like chunk width and height to the chunk itself. LayerDependency registration disappeared when I moved to lazily fetching chunks.
A Rust/C# difference is that I statically define a set of types that are layer dependencies and then require you to pass them to Layer
. But with the C# Singletons, this is not needed, you just access what you need
=> More informations about this toot | More toots from oli@hachyderm.io
text/gemini
This content has been proxied by September (3851b).