fenomas / noa

Experimental voxel game engine.
MIT License
616 stars 91 forks source link

Optimizations for chunk building #47

Closed terrac closed 4 years ago

terrac commented 6 years ago

One thing I've been thinking about is how to optimize chunk building for specific types of maps based on a formula

Could there be an "optimization hook" which allows you to take the queue of chunks and prioritize them? Eg for example if you wanted to make a large 2d level, or an infinitely falling level you would tell it to prioritize building chunks in a certain order.

fenomas commented 6 years ago

Hey, sorry for the late reply. I agree this is a good idea, though I'm not confident I can get to it soon.

Rather than making an overly general thing where the game client has complete control over chunk processing order, it would probably make sense to simply have a bias property that sets whether to prefer certain axes (e.g. the Y axis for a falling level, or the XZ axis for a typical wide/flat level).

fenomas commented 4 years ago

Note: it's not very easy or simple, but this is now possible via #115. You can't easily modify the default behavior, but you can override it if you don't mind manually controlling everything, so I'll close this.