I think it's at least a reference; like calibrating white balance on a camera.
Progress
Moderators: winston, another_commander
- Redspear
- ---- E L I T E ----
- Posts: 2685
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance.
Re: Progress
-
- Quite Grand Sub-Admiral
- Posts: 6681
- Joined: Wed Feb 28, 2007 7:54 am
Re: Progress
Just to clarify, this feature does not aim to fix or calibrate anything. It is just a way of making a scene's colors more vibrant or less vibrant, depending on the user's preference.
- phkb
- 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: Progress
I've just pushed into master an update for mission screens. Presently, the only key a mission screen can watch for is the "enter" key, when the player presses it on a choice. This limits what can be done with UI design.
This update corrects this by allowing any key (including function keys or shift/ctrl/alt combinations) to be registered on a mission screen, with the callback function being called when one is pressed. Two changes are needed for a mission screen to make use of this feature.
Add the "registerKeys" property to the options dictionary. This property lists all the desired keys for the mission screen in a dictionary object. For example:
Add the "keyPress" parameter to the callback function. This parameter is in addition to the existing "choice" parameter. It will contain the dictionary key name for the registered key. For example:
I've put together 3 examples demonstrating the new functionality:
RegsiterKeysDemo1.oxp.zip Uses the arrow keys to enter a 4 digit code.
RegisterKeysDemo2.oxp.zip Allows character entry to search for systems on the chart.
RegisterKeysDemo3.oxp.zip Recreates the F3F3 Shipyard, responding to the arrow up/down keys to change the displayed ship.
Existing mission screens should still work and be unaffected by this change.
This should be in the next nightly build.
This update corrects this by allowing any key (including function keys or shift/ctrl/alt combinations) to be registered on a mission screen, with the callback function being called when one is pressed. Two changes are needed for a mission screen to make use of this feature.
Add the "registerKeys" property to the options dictionary. This property lists all the desired keys for the mission screen in a dictionary object. For example:
Code: Select all
this.$openScreen = function () {
var opts = {
screenID: "myScreenID",
title: "Sample Title",
message: "A sample screen.",
choices: {"default":{"text":"Press ESC to exit"}},
registerKeys: {"escape":[{key:"esc"}]}
};
mission.runScreen(opts, this.$myScreenHandler.bind(this), this);
}
Code: Select all
this.$myScreenHandler = function(choice, keyPress) {
if (keyPress != "escape") this.$openScreen();
}
RegsiterKeysDemo1.oxp.zip Uses the arrow keys to enter a 4 digit code.
RegisterKeysDemo2.oxp.zip Allows character entry to search for systems on the chart.
RegisterKeysDemo3.oxp.zip Recreates the F3F3 Shipyard, responding to the arrow up/down keys to change the displayed ship.
Existing mission screens should still work and be unaffected by this change.
This should be in the next nightly build.
- Cholmondely
- Archivist
- Posts: 5364
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: Progress
Great! Well done sir!
Question: how did Svengali (OBM) manage this in Vector OXP/Library OXP:
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
- phkb
- 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: Progress
You do everything via the list of menu items. Arrow up and down to select an option. Press enter to do that function. The update I've just pushed in would allow for a bunch of keys to function as actions, without needing to press enter constantly. It would allow for a completely different implementation.Cholmondely wrote: ↑Sun Aug 13, 2023 4:24 amQuestion: how did Svengali (OBM) manage this in Vector OXP/Library OXP:
- Cholmondely
- Archivist
- Posts: 5364
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: Progress
Apropos of Hiran's comment earlier this week, there should really be several systems, no? One official GalCop version for each Galaxy, one for the Commies (thought police with blinking blotches), one for the Juntas (puffs of smoke from the "chimneys" of the astrofactory), one for the english feudals (squires with flags), one for the korean feudalsetc. Merry havoc could ensue! But gosh! would it look good....Celt wrote: ↑Sat Nov 02, 2013 5:46 amOn the subject of docking and buoys, it would seem that an alternative (and more real-life likely) docking aid would be something like the PAPI system used IRL today at airports, where pilots get a series of red and white lights which change colour depending where the pilot is on the glide slope . . . All red = too low . . . All white = too high . . . Do this in two dimensions and the pilot would be able to lock the centerline much easier and then just has to get the rotation right. aircraft carriers have similar systems called the Optical Landing System, or meatball . . .
Probably very OXPable . . .
http://en.wikipedia.org/wiki/Precision_ ... _indicator
http://en.wikipedia.org/wiki/Optical_landing_system
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
-
- Quite Grand Sub-Admiral
- Posts: 6681
- Joined: Wed Feb 28, 2007 7:54 am
Re: Progress
Coming back to this for a second, in today's nightly we will have the ability to set the color saturation by script. To achieve that, two new global methods will be used:another_commander wrote: ↑Fri Feb 24, 2023 7:26 pmJust added some intital shader code to control final output color saturation. Right now you have to edit the value at the start of the main function of the final fragment shader to change it, but I believe it would not be very hard to make it a game parameter, either as a defaults file entry or as a game menu option (if we are able to find any space in the options list to insert it, that is).
What this does, you ask? Well, here are two sets of screens to show you. The first screen in each set uses a saturation of 0.5, the second one uses 1.0 (the default value which creates the output we are all used to), the third uses a saturation of 2.0 and the fourth uses 3.0, which is probably too high a value and is used for demonstration of the effect. A saturation of 0.0 will produce a black and white image and the HUD is not affected by default, it is affected when in colorblind mode, though. There is no current limit to the saturation value, but IMO it should be restricted between 0.0 and 2.0, so that it does not producce unreasonable or simply ugly or ridiculous results.
getColorSaturation()
and setColorSaturation(desiredColorSaturation)
. For the second method the range of saturation will be from 0.0 to 2.0, with 0.0. being black and white and 2.0 being full saturation. The current saturation default is 1.0.- phkb
- 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: Progress
In the next nightly, we now have the ability to define extra keys for most GUI screens.
What does that do for us? Well, to use some examples:
1. We can make an OXP like Galactic Registry be accessible from the F6 screen, rather than having to go through F4 pages. Or, we could make Library Config be accessible from the F2 screen.
2. We could perform custom functions on the F8 screen, like "freeing all slaves".
The idea here is to potentially reduce the amount of items that currently have nowhere else to go but the F4 screen.
Also with this change, you can now create mission screens while in flight. You can't use a model on such a screen (like having a spinning Cobra behind your text, and you can't use the "allowInterrupt = false" - the player can always exit your mission screen.
To set up a custom key for a GUI screen, you do the following:
This code would callback $myGuiScreenCallback function if the player pressed Ctrl-g on the F5F5 Manifest screen.
As you can see, the definition is very similar to the station.setInterface call.
Not all screens can have extra keys defined. It is essentially GUI_SCREEN_OPTIONS, GUI_SCREEN_EQUIP_SHIP, GUI_SCREEN_SHIPYARD, GUI_SCREEN_INTERFACES, GUI_SCREEN_STATUS, GUI_SCREEN_MANIFEST, GUI_SCREEN_SHORT_RANGE_CHART, GUI_SCREEN_LONG_RANGE_CHART, GUI_SCREEN_SYSTEM_DATA, GUI_SCREEN_MARKET and GUI_SCREEN_MARKETINFO.
You can also clear extra keys with the following code:
What does that do for us? Well, to use some examples:
1. We can make an OXP like Galactic Registry be accessible from the F6 screen, rather than having to go through F4 pages. Or, we could make Library Config be accessible from the F2 screen.
2. We could perform custom functions on the F8 screen, like "freeing all slaves".
The idea here is to potentially reduce the amount of items that currently have nowhere else to go but the F4 screen.
Also with this change, you can now create mission screens while in flight. You can't use a model on such a screen (like having a spinning Cobra behind your text, and you can't use the "allowInterrupt = false" - the player can always exit your mission screen.
To set up a custom key for a GUI screen, you do the following:
Code: Select all
setExtraGuiScreenKeys(this.name,
{
guiScreen:"GUI_SCREEN_MANIFEST",
registerKeys:{"key1":[{key:"g",mod1:true}],
callback:this.$myGuiScreenCallback.bind(this)
}
);
As you can see, the definition is very similar to the station.setInterface call.
Not all screens can have extra keys defined. It is essentially GUI_SCREEN_OPTIONS, GUI_SCREEN_EQUIP_SHIP, GUI_SCREEN_SHIPYARD, GUI_SCREEN_INTERFACES, GUI_SCREEN_STATUS, GUI_SCREEN_MANIFEST, GUI_SCREEN_SHORT_RANGE_CHART, GUI_SCREEN_LONG_RANGE_CHART, GUI_SCREEN_SYSTEM_DATA, GUI_SCREEN_MARKET and GUI_SCREEN_MARKETINFO.
You can also clear extra keys with the following code:
Code: Select all
clearExtraGuiScreenKeys(this.name, "GUI_SCREEN_MANIFEST");
- Cholmondely
- Archivist
- Posts: 5364
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: Progress
This sounds as though it could end up being a major innovation! Well done, sir.
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
- Griff
- Oolite 2 Art Director
- Posts: 2483
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
Re: Progress
yeah that sounds great! Awesome work
Wiki homepage for my OXP: http://wiki.alioth.net/index.php/Griff_Industries
-
- Quite Grand Sub-Admiral
- Posts: 6681
- Joined: Wed Feb 28, 2007 7:54 am
Re: Progress
Explosions can now specify a brightness value so that they can be tweaked to appear really bright and impactful. The definitions inside explosions.plist can now contain a "brightness" key, with a float value that has to be higher than or equal to 1.0. The default value is 1.0, which keeps the explosions as we have them till now.
An example explosions.plist from ZygoUgo's explosions OXP is provided below as a showcase of how this is supposed to work.
Also, example screenie follows. Note how the brightness of the explosion causes blooming around the ship:
If you do decide to change the brightness of explosions, be aware that the brightness property value is clamped to 1.0, but is not clamped on the other side, so theoretically you can make them stupidly bright. Some caution is advised, though. The sun is supposed to be the brightest thing in the game, so explosions should typically be kept a bit lower.
First build containing this feature: d3c624c
An example explosions.plist from ZygoUgo's explosions OXP is provided below as a showcase of how this is supposed to work.
Code: Select all
{
// main ship explosion
"oolite-default-ship-explosion" = {
"alpha" = 0.85;
"brightness" = 10.0;
"color_order" = "rgb";
"count" = 25;
"duration" = 2.5;
"growth_rate" = 1.5;
"size" = 2.5;
"texture" = "ZygoUgo-particle-cloud2.png";
};
// slower clouds from fragment explosions
"oolite-wreckage-explosion" = {
"alpha" = 0.85;
"brightness" = 4.0;
"color_order" = "rgb";
"count" = 10;
"duration" = 4.5;
"growth_rate" = 0.6;
"size" = 2.5;
"texture" = "ZygoUgo-particle-cloud2.png";
};
/*
// spark effects as ships badly hit
"oolite-wreckage-chunk" = {
"alpha" = 0.85;
"brightness" = 3.0;
"color_order" = "rgb";
"count" = 10;
"duration" = 1.2;
"growth_rate" = 2.6;
"size" = 2.5;
"texture" = "ZygoUgo-particle-cloud2.png";
};
*/
}
If you do decide to change the brightness of explosions, be aware that the brightness property value is clamped to 1.0, but is not clamped on the other side, so theoretically you can make them stupidly bright. Some caution is advised, though. The sun is supposed to be the brightest thing in the game, so explosions should typically be kept a bit lower.
First build containing this feature: d3c624c
- Cholmondely
- Archivist
- Posts: 5364
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: Progress
How bright is the sun? I've not found anything on the wiki about it. Sky/Nebulae, yes. Suns, no.another_commander wrote: ↑Fri Jan 19, 2024 3:40 pmIf you do decide to change the brightness of explosions, be aware that the brightness property value is clamped to 1.0, but is not clamped on the other side, so theoretically you can make them stupidly bright. Some caution is advised, though. The sun is supposed to be the brightest thing in the game, so explosions should typically be kept a bit lower.
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
-
- Quite Grand Sub-Admiral
- Posts: 6681
- Joined: Wed Feb 28, 2007 7:54 am
Re: Progress
It's currently set to 6400 nits absolute brightness, but normal screens will display it with their maximum available brightness, whichever that might be.Cholmondely wrote: ↑Sat Jan 20, 2024 5:58 pmHow bright is the sun? I've not found anything on the wiki about it. Sky/Nebulae, yes. Suns, no.
-
- Quite Grand Sub-Admiral
- Posts: 6681
- Joined: Wed Feb 28, 2007 7:54 am
Re: Progress
A new feature was introduced during the forum's downtime: FXAA. I only posted about it on Discord at that time and forgot about it, but since we have a forum again, here goes for everyone:
In the latest nightly we have support for Fast Approximate Anti-Aliasing, commonly known as FXAA for those who can't use MSAA, the game's default AA method, for whatever reason. It is done by shaders and (for now) can be script-activated by executing
If you have working MSAA in the game you may not need this, but for any setups without MSAA support (Windows HDR I'm looking at you!) this will probably be most helpful. Or you may even prefer what FXAA looks like compared to MSAA, so you have the option to choose now.
The effect's strength can be adjusted in the oolite-final.fragment shader by modifying the line
Change the 10. to whatever feels best for you.
There is a slider-based without FXAA/with FXAA comparison image at https://imgsli.com/MjQyNDE2 to assist with better visualizing what this does.
Enjoy!
In the latest nightly we have support for Fast Approximate Anti-Aliasing, commonly known as FXAA for those who can't use MSAA, the game's default AA method, for whatever reason. It is done by shaders and (for now) can be script-activated by executing
postFX=5
.If you have working MSAA in the game you may not need this, but for any setups without MSAA support (Windows HDR I'm looking at you!) this will probably be most helpful. Or you may even prefer what FXAA looks like compared to MSAA, so you have the option to choose now.
The effect's strength can be adjusted in the oolite-final.fragment shader by modifying the line
Code: Select all
#define FXAA_STRENGTH 10.
There is a slider-based without FXAA/with FXAA comparison image at https://imgsli.com/MjQyNDE2 to assist with better visualizing what this does.
Enjoy!
- phkb
- 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: Progress
In the next nightly, I've added a new feature to allow equipment items to specific their default activate and mode keys.
So, for example, you can do this:This would make the default activate key Ctrl+0, and the default mode key Ctrl+9. With our keyboard config screen these defaults can be changed, obviously.
If an equipment item is updated to include these defaults, and you have already purchased the item at least once, you will need to go into the keyboard config screen and reset each of the values, at which point the defaults will be applied. Otherwise, the keys will be attached as soon as you purchase it.
If a conflict is detected with an existing key combination during the game start process, the offending key of the equipment item will be deleted and an error will be reported in the log file. You would then need to remove the conflict by reassigning the key of whatever function was in conflict, and then, when you next start the game, the default will be imported successfully.
What does this allow us to do? For one thing, it will allow for OXP developers to avoid having to inform players about needing to step through the prime-able equipment list to find the correct equipment item. Instead, they can simply say, press Ctrl+9 to change the mode (or whatever the mode action is really doing), and press Ctrl-0 to activate it.
It also allows for OXP devs greater scope to do innovative things. For example, the "Resistance Commander" OXP employs a hack to enable ship-to-ship instructions, essentially subverting the pylon mounts and turning them into instructions. Instead, using this feature, individual keys could be applied to a number of equipment items to instantly send an instruction (rather than cycling through the pylon list) because you can directly activate a single function.
So, for example, you can do this:
Code: Select all
// sample equipment.plist file
(
(
5,
1000,
"My special equipment item",
"EQ_MYSPECIALEQUIP",
"An example equipment item with default keys",
{
available_to_all = yes;
available_to_NPCs = no;
available_to_player = yes;
default_activate_key = ({key = "0"; mod1 = true;});
default_mode_key = ({key = "9"; mod1 = true;});
script = "my_equipment_script.js";
}
)
)
If an equipment item is updated to include these defaults, and you have already purchased the item at least once, you will need to go into the keyboard config screen and reset each of the values, at which point the defaults will be applied. Otherwise, the keys will be attached as soon as you purchase it.
If a conflict is detected with an existing key combination during the game start process, the offending key of the equipment item will be deleted and an error will be reported in the log file. You would then need to remove the conflict by reassigning the key of whatever function was in conflict, and then, when you next start the game, the default will be imported successfully.
What does this allow us to do? For one thing, it will allow for OXP developers to avoid having to inform players about needing to step through the prime-able equipment list to find the correct equipment item. Instead, they can simply say, press Ctrl+9 to change the mode (or whatever the mode action is really doing), and press Ctrl-0 to activate it.
It also allows for OXP devs greater scope to do innovative things. For example, the "Resistance Commander" OXP employs a hack to enable ship-to-ship instructions, essentially subverting the pylon mounts and turning them into instructions. Instead, using this feature, individual keys could be applied to a number of equipment items to instantly send an instruction (rather than cycling through the pylon list) because you can directly activate a single function.