Designing a HUD - without trial and error

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

Moderators: winston, another_commander

Post Reply
User avatar
Nomad
Above Average
Above Average
Posts: 16
Joined: Mon Sep 12, 2016 4:37 am

Designing a HUD - without trial and error

Post by Nomad »

As a few of you may have seen, I did a partial rework of Coluber HUD CH01, and called it, appropriately enough, Coluber HUD CH02. Up until this point, I've been moving things around via trial and error. In other words, I do this...

1) Change something
2) Relaunch Oolite (while holding down shift)
3) See if thing is where I want it (it usually isn't)
4) Close Oolite
5) Change the thing again
6) ...

The whole process is fairly tedious.

Here are the rules that I've worked out so far...
  • Everything is positioned from the center of the game screen, and both x and y can vary between ±512, assuming that x_origin and y_origin are set to 0. This appears to be true regardless of
  • The coordinates used are (always?) relative to the center point of an object. In other words, setting an MFD to be at x=0, y=0 will place it exactly in the center of the screen.
  • Width and height appears to be in the same units as coordinates
  • Sometimes, coordinates are normalized on a scale of ±512, and other times the scale is ±1.
Here are my questions...
  • Are the above assumptions correct? I haven't found any documentation pertaining to the HUD coordinates.
  • When do I use the ±512 scale, and when do I use the ±1 scale?
  • Is there a better/faster way to position things?
  • Is it possible to change the anchoring position of an object? (ex: setting the coordinates of the top-left/top-right/bottom-left/bottom-right)
  • Is there a way to reloading a plist file without relaunching Oolite?
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: Designing a HUD - without trial and error

Post by Norby »

Nomad wrote:
Is it possible to change the anchoring position of an object? (ex: setting the coordinates of the top-left/top-right/bottom-left/bottom-right)
See x_origin. Others are as tedious as you described, a bit more if you would like to be compatible with HUDSelector.
User avatar
Nomad
Above Average
Above Average
Posts: 16
Joined: Mon Sep 12, 2016 4:37 am

Re: Designing a HUD - without trial and error

Post by Nomad »

Thanks. Do you know when to use the ±1 and ±512 coordinate systems? Is there a difference between them, or is ±1 just a decimal form of the ±512 system?
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: Designing a HUD - without trial and error

Post by Norby »

Nomad wrote:
Do you know when to use the ±1 and ±512 coordinate systems?
What the wiki say: in crosshairs and color you should use decimals and others are integers.
Post Reply