VloxyEngine icon indicating copy to clipboard operation
VloxyEngine copied to clipboard

The external API is too blurry

Open dexsper opened this issue 1 year ago • 1 comments

There are a lot of difficulties in using the library without rewriting the source code for concrete projects For example, ChunkManager does not always have up-to-date information, public methods such as IsChunkLoaded do not guarantee that the chunk currently has a collider or is visible on the scene

There is constant confusion whether the local coordinates of the chunks are used or the world coordinates, for example, I would like to cache positions through int3 so as not to clog up memory and access blocks through it, but Worlutils does not provide the ability to generate coordinates from local back to world

Why, for example, couldn't ChunkAccessor also be made public for an external API It would be great to have a single point of storage for information about the chunk, the state of its mesh, collider and blocks

dexsper avatar May 30 '24 15:05 dexsper

I agree that the API needs some thought on how things should be exposed. Going down on the history of the project, there was a version with a lot of customizability and extension support using generics and function pointers, but it all came at the cost of performance, which led me to the decision to remove all of that and expect the User to make source level changes to achieve customizability. However, that requires good docs and a consistent API, which will be my focus after implementing more crucial systems.

BLaZeKiLL avatar Jun 11 '24 06:06 BLaZeKiLL