Closed geraintwhite closed 7 years ago
You can't approve it yet...
I didn't mean to start a review
We will have to generate a larger lighting buffer on the server if we want to keep the same spawning range as we currently have. To support this better, and to prevent having to pass offsets everywhere, we should probably store the coordinates of the lighting buffer inside it.
I think the lighting map will have to be generated in the LocalInterface
s, this means clients can generate one for the size of the window, and a server generates one the size of the mob spawn range.
I'm not sure whether the server lighting map generation should be done in the LocalServerInterface
or the Game
.
Currently the mobs can spawn anywhere in the server's loaded map, we can't generate a lighting buffer for the entire map as it is too big and not continuous. To fix this we could only spawn mobs within a range of each player and generate lighting buffers for each one, one at a time. This might be too slow though, maybe we should put mob spawning into a background thread...
Mob spawning is correctly working with the lighting now. The only other thing we might want to do is tweak the spawning conditions a bit.
And compatibility with the Python renderer
Only spawn mobs in darkness. This will need to be reworked to create the lighting buffer separately from the render process, and to support the Python renderer.
136