(NEW RELEASE) NumericHUDv3.oxp

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

Moderators: winston, another_commander

User avatar
CommonSenseOTB
---- E L I T E ----
---- E L I T E ----
Posts: 1397
Joined: Wed May 04, 2011 10:42 am
Location: Saskatchewan, Canada

Re: (WIP) Numeric Style HUDs(another first!)

Post by CommonSenseOTB »

First pics of the prototype Numeric HUDv1 showing condition yellow and green. Work is about 90% complete with minor script tweaks and any potential bugfixes to be done.

Image
Numeric HUDv1a by CommonSenseOTB, on Flickr


Image
Numeric HUDv1b by CommonSenseOTB, on Flickr

:D

What do you think?

Many late nights and all my spare time in the last 10 days have resulted in a nearly finished work. In a couple of days I should be ready to post a download link on a wiki page. As this hud has newly created gauges I will require all willing players to playtest this and post the results to this viewtopic. This is gonna be fun!!! :D
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.


CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Re: (WIP) Numeric Style HUDs(another first!)

Post by another_commander »

Very nice, well done man! My only nitpick would be that the numbers seem to be a bit too big for my taste. Any chance of making them somewhat smaller or (even better) configurable in size?
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2279
Joined: Tue Jan 02, 2007 12:38 pm

Re: (WIP) Numeric Style HUDs(another first!)

Post by Killer Wolf »

damn!
User avatar
CommonSenseOTB
---- E L I T E ----
---- E L I T E ----
Posts: 1397
Joined: Wed May 04, 2011 10:42 am
Location: Saskatchewan, Canada

Re: (WIP) Numeric Style HUDs(another first!)

Post by CommonSenseOTB »

Thank you another_commander! :D You are going to have fun with this. For the time being there will be the one size of number. The method used to make them requires that the the numbers be at least as thick as they are now. In version 2 I will attempt smaller sizes.
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.


CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
User avatar
CommonSenseOTB
---- E L I T E ----
---- E L I T E ----
Posts: 1397
Joined: Wed May 04, 2011 10:42 am
Location: Saskatchewan, Canada

Re: (WIP) Numeric Style HUDs(another first!)

Post by CommonSenseOTB »

Killer Wolf wrote:
damn!
:lol: You like? Perhaps a future hud style for one of your excellent ships. :D
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.


CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Re: (WIP) Numeric Style HUDs(another first!)

Post by another_commander »

Just saw this: The target range on the HUD in the first screenshot does not agree with the range reported on the reticle. Are you calculating range to the center of the model? It should really be range to the edge of its bounding box.
User avatar
CommonSenseOTB
---- E L I T E ----
---- E L I T E ----
Posts: 1397
Joined: Wed May 04, 2011 10:42 am
Location: Saskatchewan, Canada

Re: (WIP) Numeric Style HUDs(another first!)

Post by CommonSenseOTB »

Here's the code another _commander. :)

if(player.ship.target)
{
missionVariables.numericgaugevalue = (player.ship.position.distanceTo(player.ship.target.position) / 1000);

If you can help me improve it to perform better, please. The updating of each gauge is as quick as it can be(0.25 seconds) and I suspected that a slight delay might have been the cause of the discrepancy in range but the value is determined just prior to updating the gauge. However the target reticle range updates constantly so while mine is waiting to update again the target reticle is getting ahead of my gauge. (0.25 seconds) is a long time in which my target range gauge remains static. The purpose of the target range gauge is to give range when the target reticle is off screen so the slight lag in updating will not be noticed much. This kind of gauge has been requested before several times so I decided to include it for testing in version 1. Someone's gonna be happy! :D
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.


CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
User avatar
Staer9
---- E L I T E ----
---- E L I T E ----
Posts: 570
Joined: Fri Feb 18, 2011 4:53 pm
Location: Hatfield, Hertfordshire (poor industrial)

Re: (WIP) Numeric Style HUDs(another first!)

Post by Staer9 »

Nicely done, however I do agree with another_commander, the gauges are to large.
but if you fix that it would look truely incredible.
Image
Zireael
---- E L I T E ----
---- E L I T E ----
Posts: 1396
Joined: Tue Nov 09, 2010 1:44 pm

Re: (WIP) Numeric Style HUDs(another first!)

Post by Zireael »

Where's the download, I'd love to play-test it after my exams!
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Re: (WIP) Numeric Style HUDs(another first!)

Post by another_commander »

CommonSenseOTB wrote:
Here's the code another _commander. :)

if(player.ship.target)
{
missionVariables.numericgaugevalue = (player.ship.position.distanceTo(player.ship.target.position) / 1000);

If you can help me improve it to perform better, please. The updating of each gauge is as quick as it can be(0.25 seconds) and I suspected that a slight delay might have been the cause of the discrepancy in range but the value is determined just prior to updating the gauge. However the target reticle range updates constantly so while mine is waiting to update again the target reticle is getting ahead of my gauge. (0.25 seconds) is a long time in which my target range gauge remains static. The purpose of the target range gauge is to give range when the target reticle is off screen so the slight lag in updating will not be noticed much. This kind of gauge has been requested before several times so I decided to include it for testing in version 1. Someone's gonna be happy! :D
Are you using timers for your updates? If yes, then this is probably not what you would need. The 0.25 seconds update would most likely get in the way of gameplay, because the HUD information should really be updated per frame, as it happens with the standard "analogue" HUD. You may want to have a look at Frame Callbacks (see here for a starting point).

Regarding the code for calculating distance to the bounding box, it should be something like this:

Code: Select all

missionVariables.numericgaugevalue = (player.ship.target.position.distanceTo(player.ship.position) - player.ship.target.collisionRadius) / 1000;
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Re: (WIP) Numeric Style HUDs(another first!)

Post by DaddyHoggy »

Amazing job - given that not so long ago - such things were considered impossible!

They're a bit overwhelming but as a proof-of-concept - simply stunning.

Well done.
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
CommonSenseOTB
---- E L I T E ----
---- E L I T E ----
Posts: 1397
Joined: Wed May 04, 2011 10:42 am
Location: Saskatchewan, Canada

Re: (WIP) Numeric Style HUDs(another first!)

Post by CommonSenseOTB »

Thank you another_commander. I will use collision radius and I will take a look into frame callbacks. :)

Thanks DH. :D
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.


CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
User avatar
CommonSenseOTB
---- E L I T E ----
---- E L I T E ----
Posts: 1397
Joined: Wed May 04, 2011 10:42 am
Location: Saskatchewan, Canada

Re: (WIP) Numeric Style HUDs(another first!)

Post by CommonSenseOTB »

another_commander, I couldn't get the code you sent to work. :?

missionVariables.numericgaugevalue = (player.ship.target.position.distanceTo(player.ship.position) - player.ship.target.collisionRadius) / 1000;

However the following does work perfectly and gives a correct reading as close as a few meters in testing.

missionVariables.numericgaugevalue = ((player.ship.position.distanceTo(player.ship.target.position) - player.ship.target.collisionRadius) / 1000);

As for using a timer the gameplay isn't seriously affected as I use an attacked function to immediately update the gauges as well. I will look into frame callbacks when I get a chance as frame updating for these gauges would be truly stellar!

Once again thanx another_commander for the excellent help! :D
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.


CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: (WIP) Numeric Style HUDs(another first!)

Post by Svengali »

Looks good, CommonSenseOTB .-)
User avatar
CommonSenseOTB
---- E L I T E ----
---- E L I T E ----
Posts: 1397
Joined: Wed May 04, 2011 10:42 am
Location: Saskatchewan, Canada

Re: (WIP) Numeric Style HUDs(another first!)

Post by CommonSenseOTB »

Thanx Svengali!

another_commander, I must sincerely thankyou for steering me to the Frame Callback script. I have now in front of me a target range readout that updates just as smooth and quick as the target reticle range readout. :D It's flipping cool! 8)

Unfortunately I had to disable the rest of my script to do it as it was laid out in such a way that it will require a slight rearrangement to allow the whole hud to work the same way. Cut and paste is my best friend. :)

One concern I have at the moment is bogging down the hud(and the game) by updating too frequently(never thought that would be a problem). If it becomes a problem is there anyway to put a pause in the frame callback or should I simply use a counter in the script to return out of the separate sections before making any calculations or screen changes as in 1 time in 2(for example) I use a return at the beginning of the appropriate sections of script before they are executed.

In any event I will take just a little longer to try to get the whole script working like this with frame callback but if I can do it this hud is gonna rock!!! :lol: :D :lol: :D Yeehaw!
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.


CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
Post Reply