space-nerds-in-space icon indicating copy to clipboard operation
space-nerds-in-space copied to clipboard

Text placement issues at various resolutions

Open smcameron opened this issue 11 years ago • 10 comments

A user was testing out snis on a computer with i3 window manager and two 1920x1080 monitors, which lead to ui placement issues. h ignored them because of the unusual environment, but then a community member in Steam Linux User Group also had issues.

This other guy was kind enough to take a couple screenshots: snis-help snis-menu

He said "line 225 and 226 of snis_font.c .. I added in * 0.7" and that made it so the fonts did not overlap anymore.

It might suitable, for now, to have a way to set the resolution. Perhaps an option --resolution=XxY

smcameron avatar Apr 17 '15 00:04 smcameron

I have added a --aspect-ratio option to snis_client which will allow specifying an aspect ratio that differs from the display's aspect ratio as reported by the window manager. So you can specify "--aspect-ratio 16:9" and that will match the aspect ratio of the machine the game was designed on. See commit dab38d59a2d4a7b187f2bebf3a7920723c2fedfd

This doesn't really solve the issue, in that now arbitrary aspect ratios may be specified, and for some possible aspect ratios a sane UI is impossible. For example, the game will run with a 25:1 aspect ratio, but it is not possible to actually do very much with such a setup. So in that respect, I have made the problem worse by adding an infinite variety of unfixable UI issues. However, at least now if your display is significantly different than 16:9, you can try some other aspect ratios to get something more likely to work.

I will probably continue to work on the UI to make it more tolerant of various aspect ratios.

smcameron avatar Apr 18 '15 16:04 smcameron

The issue seems to persist with the patch.

http://runlinux.net/snis/snis-fonts.png

psymin avatar May 19 '15 22:05 psymin

Thanks for reporting this. Probably a silly question, but, you are trying from top of tree? Can you try:

git pull make mostly-clean make

Your screenshot does not look like mine at 16:9 on any computers I have tried, so I suspect you're not running the same code I am, and although it's possible something else is going on, I'm not sure what that something else would be. snis-16x9

smcameron avatar May 20 '15 02:05 smcameron

You mention a patch... perhaps I sent you a patch to try? I don't remember, as that was at least a month ago if I did.

smcameron avatar May 20 '15 02:05 smcameron

You're right. I was't working with the newest code. I should have done "make mostly-clean" beforehand. My apologies.

Thanks for fixing this and I hope this goes over well this weekend at the convention :)

psymin avatar May 20 '15 14:05 psymin

Ok, cool. Hope you can take some pics and/or videos. Would be cool to see.

smcameron avatar May 21 '15 00:05 smcameron

1512-o Similar problem when using a 3840x2160 display. With a 1920x1080 window, the problem persists. Only when changing the display's resolution to something like 1920x1080 do the fonts display correctly.

BurnZeZ avatar May 01 '17 00:05 BurnZeZ

Is it just the help text?

I just now made commit dcce4918a17167fca37f996ee1b9686d1015e3be which might help. It seemed to work for me at various aspect ratios and it seemed ok to me with that commit, (but setting aspect ratios via the ASPECT_RATIO variable that quickstart and snis_launcher understand isn't exactly the same thing as running on that native resolution -- I did not duplicate your screen shot when I tried export ASPECT_RATIO=16:9 for instance.

Also, if you're running full screen at a non-native aspect ratio, you'll get weird behavior with buttons and sliders and other UI elements -- the clicking doesn't land where you expect. But if you take it out of full screen, so that the window is the right size for the aspect ratio, then that particular problem disappears.

I'm also sure that at that high resolution of 3840x2160 it probably looks kind of crappy since all the single pixel wide lines will render rather faintly. The software world isn't quite ready for that resolution. Hardware world probably mostly isn't either -- you need a hellacious fill rate.

smcameron avatar May 01 '17 02:05 smcameron

That did seem to help in the help screen, but it's still problematic most other places. 1513-o 1514-o

I expected current tech to not handle 3840x2160 very well either, but that turned out to not be the case. GTX 970 here.

BurnZeZ avatar May 01 '17 02:05 BurnZeZ

Couple of incremental improvements here:

commit 100c15475911880e357bc87116eca070378d86d1 commit 33d6df8911c813184fbef8b75ba54c56914d4218

smcameron avatar May 14 '18 02:05 smcameron