Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An option for segment_size_XY:auto (also maximum to render) #18

Open
PeridexisErrant opened this issue Jun 24, 2014 · 1 comment · May be fixed by #132
Open

An option for segment_size_XY:auto (also maximum to render) #18

PeridexisErrant opened this issue Jun 24, 2014 · 1 comment · May be fixed by #132

Comments

@PeridexisErrant
Copy link
Contributor

If it is possible to resize the XY segmentsize while stonesense is running - and retrieve the dimensions of the window or overlay - an interesting possibility pops up.

To completely fill a window of X by Y pixels, we can render a segment of 2^0.5 * ( X + Y ) / 32 (rounding up) stonesense tiles on each side. Doing this while stonesense is running would cope with window resizing, while always filling the window regardless of user settings. For a fullscreen HD window, this comes out at 133 - meaning that the default of 70 may be increased for some users.

The init setting for segmentsize would then be a maximum, allowing users to cut off part for a crossection or performance reasons if desired, or reducing configuration otherwise. It would also help users who play different computers with the same package, since it balances screen size and performance automatically.

Further performance improvements could be achieved by not rendering tiles which would be outside the viewable rectangle. Using the minimum segmentsize to fill a given window, fully half of the segment will not be visible - so the improvement is potentially quite large.

@KevinCathcart
Copy link
Contributor

First, yes, it is possible to dynamically change The X and Y segment sizes dynamically. Indeed they can actually be changed independently. They are only combined in the config file. No clue why.

Your formula slightly oversimplifies some things, given the different modes, zooming options, and the functioning of the Z dimention, but the basic concept is valid and reasonable, and would actually make good sense to be the default option.

There actually is code intended to avoid rendering tiles that are completely outside the view area of the window. I'm not so sure that it is actually working though, since the check for invisible tiles comes earlier in the same method. That probably needs to be fixed.

I don't plan to submit a patch for this one myself, but I would like to see it implemented.

realSquidCoder added a commit to SquidCoderIndustries/stonesense that referenced this issue Jan 9, 2025
realSquidCoder added a commit to SquidCoderIndustries/stonesense that referenced this issue Jan 13, 2025
@myk002 myk002 added this to 50.15-r2 Jan 14, 2025
@github-project-automation github-project-automation bot moved this to Todo in 50.15-r2 Jan 14, 2025
@myk002 myk002 removed this from 50.15-r2 Jan 15, 2025
@myk002 myk002 added this to 51.05-r2 Jan 28, 2025
@github-project-automation github-project-automation bot moved this to Todo in 51.05-r2 Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

3 participants