This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Exerro's profile picture

How to deal with varying screen sizes?

Started by Exerro, 14 March 2015 - 05:37 PM
Exerro #1
Posted 14 March 2015 - 06:37 PM
I'm working on the latest version of Nova, and I'm having some problems thinking of how to deal with varying screen sizes.

I wrote a screen recording app and video player, but for obvious reasons, the video doesn't play fullscreen by default, so just cuts the bottom of the screen recording off when playing. I could add a "fullscreen" button, but then if the video is 51x19 and the device is 26x20, it will still not show properly. I could add some scrollbars on the side of the video if it goes over, but that's awkward if you're trying to see the whole thing. I could make it scale the video down if it is too big, but then there is a lot of detail lost, particularly things like screen recordings.

The current app layout:
Spoiler

This is also an issue for the PowerPoint-like app I want to make (Slides). How big should a slide be? Should I cater for normal computers and make it around 47x14, or cater for pocket computers? Then what happens when a turtle tries to use it? Slides will have a similar layout to Video, with the exception of the bar on the bottom (unless I go with the single line + dropdown menu approach).

This isn't a question that requires a definite response, I'd just like to hear people's opinion on how I can tackle this.
InDieTasten #2
Posted 14 March 2015 - 06:51 PM
I would assume cutting stuff off would be the solution, that is preferred most of the time. At such low resolutions scaling is like killing everything. And I don't know of any better method. It's just on how you and where you cut off. You could let this process manually, or do "diversity of change" analysis to select the parts, that are shown and those, that get cut out.

I'm not familiar with your powerpoint clone, but I think scaling those would be much more sufficient, since you know what text is actually text, and what text is used in special formation to form (for example) a table border. All the data has much more meaning, so you can define special rules to the behavior of a text box, if it starts to overflow the screen size.
In raw screen captures you cannot do apply this, since you don't know the meaning of characters and background colors.

I love the app layout btw :3 (especially the "menu button?" with the equal sign)
Exerro #3
Posted 14 March 2015 - 07:01 PM
You know it just dawned on me that I could have options (almost like youtube) to switch between cutting, scaling and using scrollbars. As for the powerpoint clone, that's a very good idea. I could have the coordinates go from 0-1 and scale everything accordingly, including applying scrollbars where necessary. Raw screen captures won't be a thing, but you'll be able to cut out frames from a video in the "Fiddle" section of Video.

I don't know what "diversity of change" is though? I'm guessing it's something like scrolling around the video based on what is changing, which could be cool actually, but hard to implement.

Yes, it is a menu button… and has a little animation to go to this:
Spoiler
InDieTasten #4
Posted 14 March 2015 - 07:21 PM
IT'S SO PRETTY *O*

Yeah, with "diversity-of-change" analysis I meant an algorithm that is much like a video codec, and extracts the "interesting" parts of the video, based on whats new, and whats "changing" the most. It doesn't have to be implemented hard, but you could study this for years I guess if you wanted xD
Bomb Bloke #5
Posted 14 March 2015 - 09:24 PM
I would crop the video when your UI elements are visible, and enter fullscreen automatically a few seconds into the video (assuming no user input is received).

I would also block videos from playing if the current display lacks the resolution to display them. You could make use of an external monitor to play eg pocket computer videos via a regular computer.