Some semi-random thoughts on terrain generation
It's taking a bit longer than anticipated, because the underlying framework isn't working properlyTongue
cChunkDesc's blockarea writing was buggy, is only basic, there's no merging, ...

I'm also unhappy about cChunkDesc and cBlockArea having a lot of similar code, but being unable to share it between them. I was considering making the cChunkDesc actually a direct descendant of cBlockArea. This would have the advantage of having all cBlockArea functions accessible in cChunkDesc, thus only one implementation of merging. But there's also the disadvantage of exporting some functions that should stay internal, such as the cBlockArea::Create() function, that should definitely not be accessible from cChunkDesc. Even if I managed to hide it in C++, ToLua would probably export it anyway.
Another approach would be to encapsulate the cBlockArea as a member of cChunkDesc, with cChunkDesc's functions being only wrappers calling the cBlockArea's functions. This could work better, but needs a wrapper function for everything.
Reply
Thanks given by:


Messages In This Thread
RE: Some semi-random thoughts on terrain generation - by xoft - 03-19-2013, 07:01 AM



Users browsing this thread: 9 Guest(s)