Ancestors

Written by oli on 2024-11-09 at 11:51

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

Written by Rune Skovbo Johansen on 2024-11-09 at 15:50

@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

Toot

Written by oli on 2024-11-09 at 18:37

@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

Descendants

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113454464675884891
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
262.965305 milliseconds
Gemini-to-HTML Time
0.935548 milliseconds

This content has been proxied by September (3851b).