Hello!
I'm currently working on a 2d game, mostly inspired by Minecraft. (still just for learning purposes)
I had many different approaches, but then I came across an idea that sounded very interesting.
My approach before was to have a Chunk class that obviously represents a Chunk. This Chunk Class had it's own 2D-Array of bytes representing the Blocks in this Chunk.
But because I have many operations, like light calculations, that go beyond the chunkborders, this is far from perfect.
So...
2D Circular Array
I'm currently working on a 2d game, mostly inspired by Minecraft. (still just for learning purposes)
I had many different approaches, but then I came across an idea that sounded very interesting.
My approach before was to have a Chunk class that obviously represents a Chunk. This Chunk Class had it's own 2D-Array of bytes representing the Blocks in this Chunk.
But because I have many operations, like light calculations, that go beyond the chunkborders, this is far from perfect.
So...
2D Circular Array