How should I organize chunk data of a voxel game in Rust?

(Marku Bu) #1

Hi there,
I want to write YAMCC (Yet another Minecraft Clone). I have a basic idea how these games work because I actively created some code for another MC clone called Minetest.

I have a basic idea how to generate and organize chunk data, but I’m not sure how I should do it in Rust and Amethyst.

I would store each chunk in an array of u32. In this array I only store the index of the block type. Additional data like light levels, rotation or metadata like the content of a chest I would store in separate data structures

But how does it work in Amethyst? Should I handle chunks like entities? Or what’s best practice in Rust and Amethyst?

Hope you can show me the idiomatic way to do this

Markus

1 Like