metauni / metaboard

Multiplayer drawing boards for sharing knowledge in Roblox.
Mozilla Public License 2.0
28 stars 6 forks source link

RoundedParts threshold angst #23

Closed dmurfet closed 1 year ago

dmurfet commented 2 years ago

In the latest version if Config.WorldLineType == "RoundedParts" then a threshold is used to determine whether to put cylinder caps on lines in order to reproduce with parts the nice look of UICorners in the GUI Canvas

Config.WorldLine = {
    ZThicknessStuds = 0.01,
    StudsPerZIndex = 0.001,
    RoundThresholdStuds = 0.05,
}

I have been attempting to find a good value for this threshold and it makes me sad, because the RoundedParts look so much better. On reflection this is a graphics quality tradeoff which may be best left to the clients.

Note that the client can set Graphics Quality in their settings, and we can access that value using UserGameSettings (https://developer.roblox.com/en-us/api-reference/class/UserGameSettings). The problem is that the cylinders are created on the server and replicated to the client (and line lengths are modified if the threshold is met). So one proposal would be that if the client has their quality settings below some cutoff, when the client sees lines with StartCylinder and StopCylinder as children it destroys these and adjusts the line length to counter the server adjustment.

Then clients with limited memory don't spent it all on pretty lines, but clients with more resources see prettier boards.

Obviously if you adjust your graphics quality settings you won't get the cylinders for lines that have already been drawn, but I think this is acceptable.