VolmitSoftware / Wormholes

See what's on the other side
4 stars 0 forks source link

An idea for better performance in projection #69

Closed LazoYoung closed 6 years ago

LazoYoung commented 6 years ago

Before I start please understand that I am poor at English.

It looks like your plugin uses fake blocks to render the projection for each players who look into the portal. Moreover, those blocks are constantly replaced over and over depends on the change of the viewer's angle.

What if the projection blocks are created at the beginning and never changes?

Although this idea would make the projection only available for one side, I believe that it's the key for the performance solution. (besides, I found an issue that sometimes the fake blocks never vanish)

cyberpwnn commented 6 years ago

The blocks that persist in the view each time you move never change, only if they need to be removed or re-placed. It keeps track of this. The reason performance is not the best is because they are chunk maps (shreds bandwidth) You also cant send half of a chunk (16x16x16 cube), and sending block changes kills clients. So the rasterer is doing the best it possibly can under the game's protocol.

It's the projection service that gets improvements, the calculation of what you should and shouldnt see. That is why it slows down. Currently its an iterative renderer meaning it will push a partial frame if you are moving faster than it can compute a single frame.

LazoYoung commented 6 years ago

Thanks for such a fast reply sir.

cyberpwnn commented 6 years ago

Yeah, totally have nothing else going on to focus on this all the time :P