stefnotch / rtr23-round-cat

1 stars 0 forks source link

Asset Server #20

Closed stefnotch closed 10 months ago

stefnotch commented 11 months ago

Asset Server flawed

So I wrote an asset server, but it turns out that an uncompressed Sponza scene file is really freaking heavyweight.

https://www.wolframalpha.com/input?i=297607031+bytes is how large it is when pointing bincode at an imported struct.

Which means that unless I whip out zero copy rkyv or https://github.com/Tommoa/rs-process-memory , the whole "transfer file over IPC and deserialize" approach is never going to work.

Which leads me to think...

Hot Reloading

With https://github.com/rksm/hot-lib-reloader-rs/tree/master , we could actually get game-engine-like behaviour. Where we keep the GPU buffers around during development, cause that's literally the fastest imaginable option.

We'd put "creating the Vulkan instance" into the main part, and everything else lives in the hot reloaded game. And the shared API would be something minimal like

Learned

Well, I still learned a lot from writing the asset server:

also