Skip to content

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

@PeridexisErrant

Description

@PeridexisErrant

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions