Skip to content

Smooth light source #3

@Redbeanw44602

Description

@Redbeanw44602

When the light source moves, the light appears to be flickering.

Possible reasons

  1. If the latter light source block is created before the former one, it is possible that rendering causes the intensity of light to overlap. When the previous light source block is destroyed, the field of view will suddenly become "dim".
  2. If the light source block of the latter is not yet fully created before the destruction of the former light source, there will be a brief moment where no light source is available.

Possible solutions

Change the way "destruction" is carried out: Currently, destruction is instantaneous (lightLevel 15 -> 0). An ideal way to destroy light source blocks would be a gradual process (lightLevel 15->12->9->6->3->0). This could possibly be achieved by continuously sending multiple UpdateBlockPacket, but the final effect is unknown. It may require re-implementing the lightMgr.
The downside of doing this is also obvious: it's not friendly to low-end devices and server bandwidth. Therefore, individual switches should be provided for each player and a main switch for the server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions