Closed olls closed 7 years ago
Basic idea for mob spawning around all players using the lighting framebuffer:
LocalInterface.spawn_mobs(n)
where n
is the number of spawn 'fames' to runLocalInterface.spawn_mobs(n)
calls Server.spawn_mobs(n)
which calls Game.spawn_mobs(n)
Game.spawn_mobs
:
LightingBuffer(p_pos-r, p_pos+r)
range(n)
:
(p_pos-r, p_pos+r)
This does not allow reuse of the lighting framebuffer in the rendering if they overlap... which might not be a problem.
Now we have the new lighting buffer, we can add light level dependent spawning. We will need to modify the renderer so we can get the lighting buffer separately from the renderer, before we run the mob update cycle.