02-14-2012, 07:59 AM
Okay, no-one protests, so the code's up in the repository. Go grab it and fight it
It's still far from perfect, many things are broken, but it's a start.
Off my head, the things broken:
- generating - sometimes a chunk is generated twice, resulting in "broken" trees
- saving - when unloading unused chunks, they need not get saved
- lighting - after generating a number of chunks, lighting gets really slow and actually seems to cause clientside problems - temporary freezes
- entities - player entities don't seem to be removed from the world when the player disconnects
- altogether threadsafety - cChunkPtr is not exactly thread-safe, so while it works in 99 % cases, it fails horribly in the rest 1 %.
Still, I think there are some key concepts in the commit that are worth pursuing:
- locking, locking, locking
- letting objects manipulate themselves instead of "external godmode" (ForEachClient() instead of GetAllClients())
- pluggable world storage (cWSSCompact class reads and writes the PAK files, more schemas may be introduced and user-specified)
- decouple objects that should not be coupled (cChunkMap and cWorldStorage)
It's still far from perfect, many things are broken, but it's a start.
Off my head, the things broken:
- generating - sometimes a chunk is generated twice, resulting in "broken" trees
- saving - when unloading unused chunks, they need not get saved
- lighting - after generating a number of chunks, lighting gets really slow and actually seems to cause clientside problems - temporary freezes
- entities - player entities don't seem to be removed from the world when the player disconnects
- altogether threadsafety - cChunkPtr is not exactly thread-safe, so while it works in 99 % cases, it fails horribly in the rest 1 %.
Still, I think there are some key concepts in the commit that are worth pursuing:
- locking, locking, locking
- letting objects manipulate themselves instead of "external godmode" (ForEachClient() instead of GetAllClients())
- pluggable world storage (cWSSCompact class reads and writes the PAK files, more schemas may be introduced and user-specified)
- decouple objects that should not be coupled (cChunkMap and cWorldStorage)