Render distance option
OdekaiTomakai opened this issue ยท 3 comments
Would it be possible to add a render distance option to the config? Currently the distance is too short for what I want to use on my server, and would be awesome if I could increase it!
Hi @OdekaiTomakai,
Yamipa renders images in a 12x12 chunk area around the player (that's sort-of equivalent to a 12 chunk view distance).
How can that be "too short"? ๐
Keep in mind the highest allowed view distance value in Spigot is 15, and the default is 10.
Hey @josemmo!
My server is currently using the default 10 block view distance, however the images disappear WAY before the chunks unload. Was using the images as a form of fancy decoration at spawn but it really breaks the effect when large images suddenly disappears XD
I don't think Minecraft renders chunks as a perfect square, rather it's likely an eclipse. So in reality the chunks can be viewed from much farther than the 12x12 area you've defined by default. Also, I don't think it's a 12x12 chunk area? It feels like images disappear closer to 3-5 chunks away from the player or so.
Hi @OdekaiTomakai,
Was able to reproduce this, turns out Yamipa is only rendering on 6x6 chunk areas instead of 12x12.
Problem is, increasing the view distance will slow down the server. Not because Yamipa will use too many CPU cycles, but because it'll need to send so many network packets that it'll clog the connection socket between the server and the client. This is caused by ProtocolLib effectively being single-threaded (it processes packets in a queue).
v1.2.4-SNAPSHOT-b2 comes with an updated image rendering and sending system that should solve this issue by sending fewer and shorter packet bursts, and "hijacking" ProtocolLib to send packets in a non-blocking way.
Once the snapshot has been tested to work properly, I'll release a new version that increases the view distance.