Open Jojendersie opened 10 years ago
I can think of two ways: A. All coordinates are in screen space [-1,1]x[-1,1]
B. positions are in Screencoords and the size defines the ratio height/with correct as well as an abstract size
To maintain readability text should not be stretched. This harmonizes with B. but can be build up with S. too with automatic font size adjustments to fit in the defined borders.
Am i missing out an important fact why any of these solutions is the better choice or not imaginable at all?
Ideas for a better concept?
B. I see problems when neighbored elements begin to overlap due to the fact that the dynamic ratio allows a different scaling factor either in x or in y direction.
A. I like this more because it is much more obvious how things will react.
Good observations! However I think A and B are almost the same - in each case there is some kind of relative coordinate system that is stretched or not. In case A the ratio is implicitly defined by the positioning of the elements itself, in case B it is defined by the screencoords used for positioning.
Also I think there are some other possiblities. In each case it is important to be able to define element positions to a given anchor like top-left, top-right, bottom-left, bottom-right, center etc. I'll try to list my view on the possibilities:
I think we all can agree that uniform scaling is definitely not the way to go! Ratio conserving scaling is complicated, sometimes confusing and there are many details to look after. However I think this is the "ultimate solution" when combined with proper anchoring. No scaling (+ anchors) is a much easier solution that is not as bad as it sounds! The big drawback is that the game may become unusable outside a DPI range.