Xenon UI OXP

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Xenon UI OXP

Post 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.
Last edited by phkb on Fri Jun 26, 2015 5:08 am, edited 8 times in total.
Layne
---- E L I T E ----
---- E L I T E ----
Posts: 355
Joined: Sat Mar 28, 2015 11:14 pm

Re: Background replacement experiment

Post 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'.
Reports of my death have been greatly underestimated.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Background replacement experiment

Post 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?
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Background replacement experiment

Post 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
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Background replacement experiment

Post 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
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Background replacement experiment

Post 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.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2453
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

Re: Background replacement experiment

Post 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.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Background replacement experiment

Post 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!
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Background replacement experiment

Post 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.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Background replacement experiment

Post 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.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Xenon UI OXP

Post 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...
User avatar
Tichy
---- E L I T E ----
---- E L I T E ----
Posts: 345
Joined: Wed Jul 11, 2012 5:48 pm

Re: Xenon UI OXP

Post by Tichy »

Which one is better for a 16:10 display?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Xenon UI OXP

Post by phkb »

Until I make a 16:10 specific version, go with the redux.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Xenon UI OXP

Post 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. :)
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2453
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

Re: Xenon UI OXP

Post 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");
}
Post Reply