Xenon HUD

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

Moderators: winston, another_commander

User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 462
Joined: Mon Sep 17, 2018 5:01 pm

Re: Xenon HUD

Post by Milo »

Code: Select all

00:32:35.767 [script.javaScript.timeLimit] OperationCallback: ***** ERROR: Script "(nil)" ran for 0.167818 seconds and has been terminated.
00:32:35.767 [script.javaScript.stackTrace] OOJSDumpStack:  0 (../AddOns/XenonHUD_beta.oxz/Config/script.js:1200) <anonymous function>
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     this: null
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     delta: 0.015000104904174805
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     calc: undefined
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     mode: undefined
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     deviation: undefined
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     cf: undefined
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     radius: undefined
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     dist: undefined
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     rng: undefined
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     endpoint: undefined
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     startpoint: undefined
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     s: [Sun ID: 107 position: (235828, 1.75511e+006, -1.00936e+006) radius: 71.205km]
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     switchNrml: false
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     switchHi: false
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     w: [Script "XenonHUD" version 3.8.4]
00:32:35.767 [script.javaScript.stackTrace] DumpVariable:     p: [PlayerShip "Cobra Mark IV" position: (226823, 1.03096e+006, -291893) scanClass: CLASS_PLAYER status: STATUS_IN_FLIGHT]

Code: Select all

22:33:15.562 [script.javaScript.timeLimit] OperationCallback: ***** ERROR: Script "(nil)" ran for 0.49869 seconds and has been terminated.
22:33:15.562 [script.javaScript.stackTrace] OOJSDumpStack:  0 (../AddOns/XenonHUD_beta.oxz/Config/script.js:1237) <anonymous function>
22:33:15.562 [script.javaScript.stackTrace] DumpVariable:     this: null
22:33:15.562 [script.javaScript.stackTrace] DumpVariable:     delta: 0.03100001811981201
22:33:15.562 [script.javaScript.stackTrace] DumpVariable:     calc: 0.1584473228026798
22:33:15.562 [script.javaScript.stackTrace] DumpVariable:     mode: ""
22:33:15.562 [script.javaScript.stackTrace] DumpVariable:     deviation: 0.15734993771546968
22:33:15.562 [script.javaScript.stackTrace] DumpVariable:     cf: 0.07500400000000004
22:33:15.562 [script.javaScript.stackTrace] DumpVariable:     radius: 71205.4609375
22:33:15.562 [script.javaScript.stackTrace] DumpVariable:     dist: 449395.1660273537
22:33:15.562 [script.javaScript.stackTrace] DumpVariable:     rng: 6.5
22:33:15.562 [script.javaScript.stackTrace] DumpVariable:     endpoint: 6.5
22:33:15.562 [script.javaScript.stackTrace] DumpVariable:     startpoint: 22
22:33:15.563 [script.javaScript.stackTrace] DumpVariable:     s: [Sun ID: 107 position: (235828, 1.75511e+006, -1.00936e+006) radius: 71.205km]
22:33:15.563 [script.javaScript.stackTrace] DumpVariable:     switchNrml: false
22:33:15.563 [script.javaScript.stackTrace] DumpVariable:     switchHi: true
22:33:15.563 [script.javaScript.stackTrace] DumpVariable:     w: [Script "XenonHUD" version 3.8.4]
22:33:15.563 [script.javaScript.stackTrace] DumpVariable:     p: [PlayerShip "Cobra Mark IV" position: (366230, 1.52243e+006, -647675) scanClass: CLASS_PLAYER status: STATUS_IN_FLIGHT]
Note the different line numbers 1200 and 1237 in script.js.
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 HUD

Post by phkb »

Those two points in the code are where I would expect that sort of thing to happen. The first one is a calculation, the second is the HUD switch point. I've put some improvements into the code to hopefully mitigate the first one. The second one, though, is tougher. The issue appears to be relating to how Oolite handles bitmaps and images. The more images it has to keep a reference to, the more likely it's going to stutter when retrieving one, and Xenon HUD has a few. I've been meaning to dive into the source to see if there are any obvious bottlenecks when processing images, but I haven't had any luck so far.

In any case, here's the latest beta: XenonHUD_beta.oxz.

This version hopefully makes the Hi-Contrast auto-switching process a bit better (shouldn't flicker as much, better calcs for determining when mode should be switched on). I've also added the speed and space compass distance values to the HUD, which requires the Combat MFD to be installed.
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 462
Joined: Mon Sep 17, 2018 5:01 pm

Re: Xenon HUD

Post by Milo »

I think the switching delay could be reduced to 1 second, it feels a bit slow. Otherwise, very nice.

I noticed the speed numeric indicator disappeared in interstellar space however.

And, the MISSILE warning near the crosshair got stuck somehow (even after going through witchspace, it remains).
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: Xenon HUD

Post by dybal »

Thanks for the changes, phkb!

Does something tell the alert condition? I saw in the wiki that part of the crosshairs will go red on red condition, but is there something to make if clear if the alert condition is green or yellow? (apart from the MFD set, of trying to Torus)
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 462
Joined: Mon Sep 17, 2018 5:01 pm

Re: Xenon HUD

Post by Milo »

In yellow, mass-lock text appears near the crosshair.
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: Xenon HUD

Post by dybal »

Small nitpicks:

- the components of the Space Compass are off-center in relation of each other (in the amber version at least): the backgound, the external circle, the internal circles, the roll/pitch/yall indicators (at zero)
- I find the text in green over the "Weapons systems off/online" too small, but I guess it would "collide" with the comm area to its right if bigger
- when docking, the speed dial moves to the screen border but the numeric speed value doesn't move with it (it stays near the center)
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 HUD

Post by phkb »

Thanks for the reports. I’ve got a fix in the works so I’ll add these issues to the mix.
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 HUD

Post by phkb »

OK, next beta release is here: XenonHUD_beta.oxz. Should address most of the issues raised so far (fingers-crossed).
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 HUD

Post by phkb »

After a lot of fiddling, I think I've been able to stabilise the automatic hi-contrast switching system. So, version 3.8.7 is now the official release, and available via the download manager. Here's a list of all the changes since 3.7:

3.8.7
- Removed joystick sensitivity indicator.
- Improved calculations to determine when to auto-switch to Hi-Contrast mode.

3.8.6 (beta)
- HUD warning elements will now switch off correctly when threat/event is gone.
- Auto-switch anti-flickering time set to 1 second (down from 2 seconds).
- Combat MFD speed value no longer visible on docking HUD.
- Better alignment of space compass elements.
- Added current status text (GREEN, YELLOW, RED) to HUD.

3.8.5 (beta)
- Moved script.js to xenonhud.js (to reduce clutter in Config folder).
- Added code to prevent flickering when in auto-Hi-Contrast mode.
- Improved calculations to determine when to auto-switch to Hi-Contrast mode.
- Added some interfaces for Combat MFD values (speed, distance to space compass target).

3.8.4 (beta)
- Added selected missile name to area under missile display (Oolite 1.89 required).
- Cleaned up warning/indicators around crosshairs.

3.8.3 (beta)
- Fixed issue that was stopping the auto-Hi-Contrast mode from engaging correctly.
- Rearranged the warning indicators around the central HUD, and changed the masslock light into a similar label.
- Re-worked method for adding warning and indicator texts to the HUD.

3.8.2 (beta)
- Better alignment of MFD underlays with MFD frames.
- Further increased the distance at which checking for Hi-Contrast mode begins.
- Attempt to correct issue where MFD underlay was shown even when no MFD was in the slot.

3.8.1 (beta)
- Improved visibility of MFD's when in Hi-Contrast mode.
- Fixed issue with jump fuel required marker disappearing from fuel gauge when in Hi-Contrast mode.
- Reduced font size in comms log and message GUI panels.
- Slightly increased the distance at which checking for Hi-Contrast mode begins.

3.8 (beta)
- Added 2 additional MFD slots, making 9 in total.
- When prime-able equipment is removed (via Library Config), the Hi-Contrast mode will be automatically engaged when glare increases (Oolite 1.89 required).
- Changing the setting for removing the prime-able equipment is now being saved correctly.
- Made Library OXP a requirement for the OXP.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Xenon HUD

Post by Cody »

Removed joystick sensitivity indicator.
This had me scratching my head earlier... 'til I realised I was looking at Xenon HUD, not Xenon GUI.
That'll teach me not to read posts before I've had my morning caffeine shot!
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
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 HUD

Post by phkb »

Cody wrote: Mon Jul 26, 2021 8:49 am
That'll teach me not to read posts before I've had my morning caffeine shot!
:D
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 462
Joined: Mon Sep 17, 2018 5:01 pm

Re: Xenon HUD

Post by Milo »

I'm seeing a lot of these:

13:53:46.545 [script.javaScript.exception.unexpectedType] ReportJSError: oolite.oxp.phkb.XenonHUD.oxz/Scripts/xenonhud.js, line 1225.
13:53:46.563 [script.javaScript.exception.unexpectedType] ReportJSError: ***** JavaScript exception (<unidentified script>): TypeError: s.position is undefined

Also some of these:

13:37:27.054 [script.javaScript.exception.ooliteDefined] ReportJSError: oolite.oxp.phkb.XenonHUD.oxz/Scripts/xenonhud.js, line 1228.
13:37:27.068 [script.javaScript.exception.ooliteDefined] ReportJSError: ***** JavaScript exception (<unidentified script>): Error: Vector3D.subtract: Could not construct vector from parameters (undefined) -- expected Vector, Entity or array of three numbers.
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 HUD

Post by phkb »

Milo wrote: Sat Aug 07, 2021 5:58 pm
I'm seeing a lot of these:
Thanks Milo. Should be fixed in new version 3.8.8, which is out now.
User avatar
Slartibartfast
Deadly
Deadly
Posts: 175
Joined: Mon Jan 21, 2008 3:54 pm

Re: Xenon HUD

Post by Slartibartfast »

hello

i have just installed "XenonHUD 3.8.9"

... i miss the line with "selected missile: ...... "
// lower left part of the display //

matthias
Oolite 1.91 / Imp. Trader ( slighly modified :wink: ) on Lubuntu 22.04 LTS on AMD64 2x 3800+ ,
ATI Radeon R7240 XFS / Samsung TV 40" 1080p
C-Media CMI8738 / Yamaha RX-V575 / DIY-Speaker
Logitech Attack3 & standard german keyboard
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 HUD

Post by phkb »

Slartibartfast wrote: Tue Jul 12, 2022 6:15 pm
... i miss the line with "selected missile: ...... "
// lower left part of the display //
Fixed in 3.8.10, now available. Thanks for the bug report!
Post Reply