HUD scripting example

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

Moderators: winston, another_commander

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:

Post by Cody »

Nice one, KW, they look really good, especially the 'damage' HUD.
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
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

The scripting can be optimised somewhat by using a switch based on the alert condition (as condition 0 is docked). If I get a little time tomorrow I'll throw a quick demo script together for you.
User avatar
JazHaz
---- E L I T E ----
---- E L I T E ----
Posts: 2991
Joined: Tue Sep 22, 2009 11:07 am
Location: Enfield, Middlesex
Contact:

Post by JazHaz »

Killer Wolf wrote:
just to officially announce, you guys fkn RULE!!

ah, that's my new ship kitted out, let's launch and have some fun
Looks great! :) Didn't realise you had made some new HUDs!
JazHaz

Gimi wrote:
drew wrote:
£4,500 though! :shock: <Faints>
Cheers,
Drew.
Maybe you could start a Kickstarter Campaign to found your £4500 pledge. 8)
Thanks to Gimi, I got an eBook in my inbox tonight (31st May 2014 - Release of Elite Reclamation)!
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

stunning new HUDs!!!
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2279
Joined: Tue Jan 02, 2007 12:38 pm

Post by Killer Wolf »

ah, thanks guys :-)
the weedy pics don't really show them off (specially the knackered HUD), i feel. the thinking behind them was that in-flight would use a normal HUD w/ all the info, but in cobat you'd get a combat-specific HUD shouwing only stuff you really need to know, and an enlarged scanner to help fight enemies. there might be a little tweaking going on, maybe try and make some of the bars a little more transparent etc.
dithering over whether to release the OXP now or wait until the next release when more people are likely to have the build that can utilise the new code.
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

Killer Wolf wrote:
ah, thanks guys :-)
the weedy pics don't really show them off (specially the knackered HUD), i feel. the thinking behind them was that in-flight would use a normal HUD w/ all the info, but in cobat you'd get a combat-specific HUD shouwing only stuff you really need to know, and an enlarged scanner to help fight enemies. there might be a little tweaking going on, maybe try and make some of the bars a little more transparent etc.
dithering over whether to release the OXP now or wait until the next release when more people are likely to have the build that can utilise the new code.
Release it! If nothing else it will encourage early adoption of the new version!!!
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Post by Diziet Sma »

Wow.. :shock: seriously impressed, I am.. nicely done, KW!
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6885
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Post by Disembodied »

Woah! That's some seriously good stuff there. This has got the potential to really enhance the gameplay, I think. A major step forward in immersion as well as offering new tactical options. This is great! 8)
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

lovely stuff KW, looks fab! i agree, might be worth releasing a version of it for the oolite trunksters to have an early peek at.
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post by Lestradae »

Disembodied wrote:
... seriously good stuff there. This has got the potential to really enhance the gameplay, I think. A major step forward in immersion as well as offering new tactical options. ...
This!

I say, release it! Great idea!

And even contains a believeable solution for "broken HUDs" (if you treat cockpits as equipment, something I cobbled together for my personal use - for now).

All thumbs up from here!
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

KW, I can only repeat what the others have said: great stuff! :)

It'd be a real blast if you released it now, but if you don't, at least we have these excellent pictures to look at! ;)
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2279
Joined: Tue Jan 02, 2007 12:38 pm

Post by Killer Wolf »

Cool, i'll try and get it up for the weekend (!). Thargoid gave me an updated script but i didn't get a chance totry it last night so i'll be off soon to give it a whirl. Naffing Oolwiki looks to be down again tho >:-(
User avatar
ClymAngus
---- E L I T E ----
---- E L I T E ----
Posts: 2514
Joined: Tue Jul 08, 2008 12:31 am
Location: London England
Contact:

Post by ClymAngus »

Wow, this is the kind of thing I was trying to do with the medusa hud (in an everything in the one window kind of way), out of interest how many different states could you hang a hud off? I'm thinking a scooping hud if cargo is selected (basically a massive resizing of the scanner for locating cargo) and is there a problem when it comes to auto switching if you have too many (ie can you override one if another perametre is met, an AND OR statement?)

With this coding hanging off the back end this could seriously revolutionise future artistic hud design.

A weapons strength drag and drop version would be heartily applauded.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

ClymAngus wrote:
out of interest how many different states could you hang a hud off? I'm thinking a scooping hud if cargo is selected (basically a massive resizing of the scanner for locating cargo) and is there a problem when it comes to auto switching if you have too many (ie can you override one if another perametre is met, an AND OR statement?)
Any JS handler can be used as a trigger for changing HUDs. It's all up to you, really. The target-cargo-switch-to-scoopHUD scenario is entirely plausible in trunk. You can also use any conditional expression to decide which exact HUD you would like to autoswitch to and you can even pick one at random from a pool of HUDs if you feel like it.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

another_commander wrote:
The target-cargo-switch-to-scoopHUD scenario is entirely plausible in trunk.
yes, following is tested to work:

Code: Select all

this.shipTargetAcquired = function (target)
{
    if (target.isCargo) log(this.name, "Targeted: "+target);
}
Instead of logging you than must do your actions.
Post Reply