Page 1 of 16

Xenon UI OXP

Posted: Thu Jun 04, 2015 10:21 am
by phkb
I've been playing around for a while with some background replacements, and now that I've worked out how to display a higher-res image (thanks Norby!), I've come up with this.

Image
Edit: Screenshot has been updated to remove text issues noted in later posts.

With all the backgrounds I've made the assumption that the player is viewing a screen at a terminal on their ship, so I've tried to come up with a look and feel that's inline with that concept. This means I've moved away from photo-like backdrops.

One question for the devs, though: With the larger screen-size images (I'm using 1600x900) comes a larger file size. Most of the backgrounds weigh in at about 600k. And there are a lot of them in the OXP, around 60 (catering for HUD on/off scenarios, inflight and docked, red alert and standard). Does Oolite hold any of these background images in memory, or does it access them each time they're requested? If I do release this as an OXP, I don't want to break anyone's computer...

For more info see the Wiki entry here: http://wiki.alioth.net/index.php/XenonUI
Download available via the download manager, or via these direct links:
Main Xenon UI oxz: http://wiki.alioth.net/img_auth.php/0/0b/XenonUI.oxz
16:9 OCR A Extended Font: Pack A
16:10 OCR A Extended Font: Pack B
16:9 Xolonium Font: Pack C
16:10 Xolonium Font: Pack D
16:9 Dangerous Square Font: Pack E
16:10 Dangerous Square Font: Pack F
16:9 Default (Helvetica bold) Font: Pack G
16:10 Default (Helvetica bold) Font: Pack H

The Redux version is for narrower screens (eg 4:3). Also note that the Redux version is flagged as incompatible with the main version. You can't have both installed. If you try, the main version will win.

Re: Background replacement experiment

Posted: Thu Jun 04, 2015 3:26 pm
by Layne
I like the looks of this, yes, indeedy-do. The backgrounds in BGS are very nice, but they're not as immersive as having 'authentic' GalCop interface screens would be.

If I may suggest, phkb (Why can I not resist the temptation to add vowels to your screen name?), you might want to release two versions of the OXP, the way Smivs usually does for his ship packages-- a high resolution version and a lower one?

Edit: Side note, you seem to have an extra 's' at the end of 'dampers'.

Re: Background replacement experiment

Posted: Thu Jun 04, 2015 4:06 pm
by Smivs
Very nice (even with the spare 's' :P ), and like you I am a 'view-screen' guy and don't like picture backgrounds a lot.
I keep meaning to update Better Screens, but this looks so good I may not bother. I see you struggled with that horrid grey bar/line under the Commander's name as well - maybe there is a way to remove it?

Re: Background replacement experiment

Posted: Thu Jun 04, 2015 5:29 pm
by cim
phkb wrote:
Most of the backgrounds weigh in at about 600k. And there are a lot of them in the OXP, around 60 (catering for HUD on/off scenarios, inflight and docked, red alert and standard). Does Oolite hold any of these background images in memory, or does it access them each time they're requested?
Both. There is texture caching but not every texture in the OXP will be loaded at once. Textures not used for a while will be unloaded, especially if lots of textures are currently in use on ships. GUI textures are very likely to be unloaded if you're not looking at the GUI screen which uses them.

1600x900 will be rounded up to the next powers of two [1], and as a 2048x1024 texture, it'll need 8Mb of RAM to store. It might cause slight slowdowns on older computers, but it shouldn't actually break anything.

If you turn on texture.load.asyncLoad in your logcontrol.plist you'll see when Oolite actually loads the textures it needs from disk.

[1] It's probably worth you doing this to the source file, or designing them at that size to begin with - your paint program will potentially rescale better than Oolite does, and it will speed up texture loading too if Oolite doesn't need to redo the image itself on every load.
Smivs wrote:
I see you struggled with that horrid grey bar/line under the Commander's name as well - maybe there is a way to remove it?
In 1.82, there is. Set screen_divider_color = "0 0 0 0"; in gui-settings.plist

Re: Background replacement experiment

Posted: Thu Jun 04, 2015 7:25 pm
by Norby
Nice image, just the left and right 5-5% on a 16:9 image should not contain any text due to in 16:10 displays these will be out of the screen. For example in an 1920x1080 image you should fill up 96 pixels on sides with marginal contents. My laptop show your example in this cropped form:
Image

Re: Background replacement experiment

Posted: Fri Jun 05, 2015 1:05 am
by phkb
Thanks for the feedback and help.
Layne wrote:
Edit: Side note, you seem to have an extra 's' at the end of 'dampers'.
:shock: What the... aw, dang it.

Not sure how to handle the 16:10 screens atm. I'll certainly produce a version that is just the grid background and the centre window for users with narrower screens, but...hmm. I'll get back to you.

Re: Background replacement experiment

Posted: Fri Jun 05, 2015 1:12 am
by Wildeblood
phkb wrote:
Thanks for the feedback and help.
Layne wrote:
Edit: Side note, you seem to have an extra 's' at the end of 'dampers'.
:shock: What the... aw, dang it.
In that same block, "System power" has a lower case p, but every other word is capitalized.

Re: Background replacement experiment

Posted: Fri Jun 05, 2015 1:44 am
by phkb
Wildeblood wrote:
n that same block, "System power" has a lower case p, but every other word is capitalized.
Double dang it! Man, I need to spell-check/proof read more, especially before building 60-odd Paint.Net files with the same mistake in them!

Re: Background replacement experiment

Posted: Sat Jun 06, 2015 10:11 am
by phkb
You can now download the Xenon UI OXZ from this link https://app.box.com/s/cubl9bn9lzivg6ya36m3y45nn39jkudq. It's a fairly hefty size, at around 34mb, so be prepared for a long download on a slow Internet connection. This version is designed for a 16:9 display ratio. A "redux" version of the OXZ is also available here https://app.box.com/s/mb2u5pbes257ou42d96evz9472j2i4dy, which is only 11mb, but without the sidebars. This should work on other display ratios. Note that the redux version is incompatible with the full version. If you try to install both, the Xenon UI version will win.

I've updated the screenshot in the first post with the latest look.

But first, some warnings: This OXP will pretty much override any backgrounds set by other OXP's, including any F4 interface backgrounds. This is by design! See, it says so right there on the side of the box. The concept of this set of backgrounds is to create the illusion that you, the player, are communicating with the game-world via a console type of screen. And so, to maintain the illusion, I am forcing these backgrounds on all screens.

But note: There is a way to override the override. If you realy want to keep the background of a particular OXP, if you open up the OXP you'll find sample code in the header section of the "xenonui.js" file (or "xenonreduxui.js" for the redux version) that will enable you to add some code that will allow other OXP's to keep their particular backgrounds, as long as that OXP uses a screenID on their "mission.runScreen" command.

In order to keep the size of the OXP down, I've used a program called "pngcrush" to reduce the size of the PNG files. This seems to work fine on my Windows machines, but I don't have a Linux or Mac box available to test on those platforms. If the compressed files don't work I'll replace them with the full-size versions.

For those with 16:10 ratio displays, I'm still working through the options. Perhaps I can get a show of hands on how many 16:10 users would be interested in a version scaled for their display? Yep, I see your hand at the back there, Norby. Anyone else?

Also included in both OXP's is a new Oolite theme music for the title screen, composed by me. You don't have to like it! If you don't want it, just remove the "OoliteTheme.ogg" file from the "Music" folder. Oh, and also delete the "descriptions.plist" file in the "Config" folder as well, otherwise I'll end up taking credit for NoSleeps's original theme, which wouldn't be fair. Or right, even.

Let me know what you think, or if you hit any problems. If you find a screen I've missed let me know and I'll issue an update.

If there's no major issues I'll load them to the manager later.

Re: Background replacement experiment

Posted: Sat Jun 06, 2015 10:25 am
by Smivs
phkb wrote:
But first, some warnings: This OXP will pretty much override any backgrounds set by other OXP's...
I'm not sure this is a good idea as some of the backgrounds may be essential to an OXP. I'm thinking in particular of a couple we used in Xeptatl's Sword which are used to convey visual information which the player needs.

Re: Xenon UI OXP

Posted: Sat Jun 06, 2015 10:27 am
by phkb
Right. Well, as I learn about them, I'll add exceptions directly into the pack.

Edit: Although, after having the briefest look at Xeptatl's Sword code, it appears to be using overlays, rather than backgrounds, like this: overlay: { name: "spikes.png", height: 512 }. I just did a quick test and the overlay will still work with Xenon setting the background. So I think it's still OK...

Re: Xenon UI OXP

Posted: Sat Jun 06, 2015 10:46 am
by Tichy
Which one is better for a 16:10 display?

Re: Xenon UI OXP

Posted: Sat Jun 06, 2015 11:09 am
by phkb
Until I make a 16:10 specific version, go with the redux.

Re: Xenon UI OXP

Posted: Sat Jun 06, 2015 11:14 am
by Smivs
phkb wrote:
Right. Well, as I learn about them, I'll add exceptions directly into the pack.

Edit: Although, after having the briefest look at Xeptatl's Sword code, it appears to be using overlays, rather than backgrounds, like this: overlay: { name: "spikes.png", height: 512 }. I just did a quick test and the overlay will still work with Xenon setting the background. So I think it's still OK...
Ah, OK. That's good news anyway. I do like these so sorry for any bother. :)

Re: Xenon UI OXP

Posted: Sat Jun 06, 2015 11:51 am
by Wildeblood
:!: Bogus code:

Code: Select all

// adds a screen ID to the list of mission screen ID's for which this OXP will not override
this.$addMissionScreenException = function(missionScreenID) {
	var found = false;
	if (this._disableMissionScreen && this._disableMissionScreen.length > 0) {
		for (var i = 0; i < this._disableMissionScreen.length; i++) {
			if (this._disableMissionScreen[i] == missionScreenID) found = true;
		}
	}
	if (found == false) this._disableMissionScreen.push(missionScreenID);
}
:idea: Try:

Code: Select all

// adds a screen ID to the list of mission screen IDs which this OXP will not override
this.$addMissionScreenException = function (missionScreenID) {
        if (this._disableMissionScreen.indexOf(missionScreenID) === -1) {
            this._disableMissionScreen.push(missionScreenID);
        }
}
:?: Could you explain what this is for?

Code: Select all

this.startUpComplete = function() {
	...
	// each of these items can't be set using setScreenBackground - needs to be done via the plist file
	this.$addMissionScreenException("oolite-contracts-parcels-details");
	this.$addMissionScreenException("oolite-contracts-passengers-details");
	this.$addMissionScreenException("oolite-contracts-cargo-details");
}