This actually seems really quite close.Rachael wrote:Hmm.. try this...
diff = w * 240 / h - 320
Any 4:3 (e.g. 800x600) would result in 0 which is correct.
Any 5:4 (e.g. 1280×1024) would result in -20 (rather than the 0 he specifies).
Any 16:9 (e.g. 1920x1080) gives 320/3 = 106.67 (rather than the 117 he specifies).
Any 16:10 (e.g. 1680x1050) gives 64 (rather than the 67 he specifies).
So this may be usable, but I've no idea what it would do to the HUD elements with ultrawidescreen or multi-monitor setups.
Taking a 21:9 monitor resolution (though by pixels they aren't exactly 21:9 - https://en.wikipedia.org/wiki/21:9_aspe ... r_monitors) of 2560×1080 it would give a diff value of 248.89.