Author
Topic: High Res Interfaces? (Read 1641 times)

High Res Interfaces?

It's almost 20 years since FreeSpace 2 was made and we're still stuck with 1024x768 as our highest interface resolution.

How barbaric.

Sure it upscales, but wouldn't it be nice to have crisp and clear interface art?

High res interface for FSO has always been a bit of a chicken and egg thing. Coders won't work without assets, and who would make assets if they're not going to be used?

When I was making JAD2.22 I had the insane idea to make a completely new interface for it (be sure to play it if you haven't! /shamelessplug). Making it (the interface) wasn't that bad, just tedious and motivation sapping. But I planned ahead. I made it so that one day, if 1080p resolutions ever came to FSO, I would be ready!

And as it happened, coders were just waiting for that one day someone would show up with 1080p res art and stuff might get going.

It just took a year for us to realize this missed connection...

Well, I did need a bit of help which MageKing supplied to help cut up the 1080p interface art correctly. I had a series of batch scripts from Water that would cut things up, but it only worked for 1024. But now, we're all good!

Here is a preliminary test "3_" interface set for the pilot selection screen. I'll begin converting more over the next week or so. The slicer folder has the batch script and base images for the lit and hover button sets. The batch script also has the x,y and width and height of the buttons as part of the call to the graphic magick cropping to make them. So for new button coordinates you can just grab them from there.

Re: High Res Interfaces?

It would probably be a good idea to make this new system based on the aspect ratio of the interface instead of hard-coding "3_" to mean 1080p. This might need a new table to make the file name formats configurable by the modder.

I have a lot of free time now so I guess I could try to implement this

Re: High Res Interfaces?

I think there was a LUA scripted mainhall in Starfox SoL that used fs2 missions as background, but it probably won't work on newer builts (and I never checked that).

Q. Why does it require a new table then? Is this due to the different size ratio of widescreen?

At the moment, the interface is completely hardcoded. We cannot really move controls around (we can fudge locations a bit, but that's about it), we can't really do much of anything with the interface as coders, and modders can do even less. The only way to make the interface customizable is by introducing definitions for it that the engine reads on startup.

Re: High Res Interfaces?

I would love to work with a modder so that we can actually get that branch ready for merging. It's working pretty well but I will need input by some modders for determining if the system will work properly.

Re: High Res Interfaces?

I am not qualified to comment on what system to use. All I require is for it to be able to do what we already do, but without the resolution limitations. Play anims, show text, don't mess with mainhalls, use buttons.

Beyond that, if I can figure out creating mainhalls using that clunky table system then I can figure out how to mod using any of these options you linked to.

Re: High Res Interfaces?

So, I looked at the UI code a bit to see how easy it would be to add support for dynamic resolutions to the old UI system. Unfortunately, it looks like pretty much all the coordinates are hard-coded for the individual resolutions. That means that a system with proper support for dynamic resolutions would need to have access to all those coordinates.

In my opinion, such a system would be at least as much work to implement as a comparable libRocket solution without all the additional flexibility libRocket provides.

@Axem: I know that adapting to a new system would be difficult but I believe that it would make the UI system of FSO easier to use in the long run. What is your opinion on that topic?

EDIT: I want to clarify that your current work would not have been for nothing. The individual parts of your custom interface should be adaptable to the new system.

Re: High Res Interfaces?

I sort of figured it wouldn't be easy. If you think this is a great impetus to go ahead with a new interface system then, well... have at it? I mean its your time and sanity at play here!

My only apprehension about libRocket is its another thing for modders to have to learn. I know its HTML/CSS basically, but not all of us are mjn. (But maybe with that, you can get mjn into a blood oath contract to make some interface templates that we can later keep reusing for other uses)

Re: High Res Interfaces?

I thought about how to add support for the higher resolution image files and found two possible solutions:

Expose the coordinates of each element (button, text, ...) in a table and let the modder specify them

Add some sort of declarative UI markup for specifying the locations

1. is too specific for the individual UI screens in my opinion so every screen would need a lot of additional table parsing code without actually improving the UI situation much. 2. would be nice but that pretty much replicates what libRocket already does.

I think I'll put together a small libRocket test mod with a short tutorial for the FSO specific features. We could use that as a starting point for developing a template for FS2 style interface elements.