11-22-2013, 09:54 PM
A C++ class or struct would require an API and calling a function is a costly operation in this context - there's a function name lookup (stringmap), parameter serialization and deserialization... too heavy to be done on the order of 10k times per second.
Remembering only eligible blocks is problematic, too:
1. You need to classify them as soon as a chunk is loaded (how about chunk borders?). Costly.
2. There's still not much saved - if half of the blocks are mossy and the other half cobble, there's still 32k potentially growable blocks to remember.
Remembering only eligible blocks is problematic, too:
1. You need to classify them as soon as a chunk is loaded (how about chunk borders?). Costly.
2. There's still not much saved - if half of the blocks are mossy and the other half cobble, there's still 32k potentially growable blocks to remember.