Author Topic: HUD table values  (Read 3876 times)

0 Members and 1 Guest are viewing this topic.

Offline WMCoolmon

  • Purveyor of space crack
  • 213
How should they be specified?

Absolute values:
Quote
Goober:
Here's my idea: Add full support for all the gauges by specifying exact coordinates, but *only* for 640x480. The game will automatically adjust the coordinates for the other resolutions.

This way people can have the exactitute of specifying absolute pixel coordinates, but the gauges will still be scaled for alternate resolutions. I think doing it by percentages would eventually get far too confusing.

As a bonus, all the values would be integers, so you wouldn't get floating-point slowdown.


Percentages are the percentage of the screen to the left or top of the item, ie 50%, 50% would specify the middle pixel of the screen.

From 0 to 1, basically percentages except with decimals...
« Last Edit: May 30, 2004, 03:26:11 am by 374 »
-C

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
isn't 0 to 1 the same thing as Percentages?

anyway I like 0 to 1 becase it's like UV coordanants, and also the easiest to code for (for all the many new resolution modes, IMHO)
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Yeah, it is.
-C

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
hmmm you edited your post :)
now I look like an idiot :D
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
I'm voting pixels. It might mean some minor messing when it came time to resize for different resolutions, but it does give you a more accurate representation of your motion. ie - .0001 might not move you at all in real terms. Also, it's easier to specify the sizes of your guages in pixels as that's the way Aniview and your paint program spits them out...And we will be able to change sizes right?
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Yeah, which is in pixels.
-C

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Awesome :yes:. And the relevance was that it'd probably be less confusing at the user end to use a single set of numbers for both size and location, ie. pixels.
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 
The problem with doing it in 640*480 seems to me that not every resolution is a direct multiplacation from that number. Because if you need to multiply it by 1.5, you're still be using floats. 0 to 1 makes more sense if you ask me, though if you go from 0-4 for horizontal, and 0-3 vertical it might make more sense, because then every 1,1 block is square.
just another newbie without any modding, FREDding or real programming experience

you haven't learned masochism until you've tried to read a Microsoft help file.  -- Goober5000
I've got 2 drug-addict syblings and one alcoholic whore. And I'm a ****ing sociopath --an0n
You cannot defeat Windows through strength alone. Only patience, a lot of good luck, and a sledgehammer will do the job. --StratComm

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
wait why is size in pixels?
it should all be the same system so the HUD looks the same in all resolutions.

I'm thinking I'm getting an idea about how you'r trying to implement this and I think maybe there should be two types of positioning systems one were you indicate the upper left hand courner and the lower right, and another were you indicate the center and it's size. internaly it can be easily converted to what ever the hud is useing.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Lightspeed

  • Light Years Ahead
  • 212
Percentages.

Pixels will look odd because screen resolutions don't multiply directly and so it can lead to odd misaligned gauges and stuff.

0-->1 will get a pain with the values you have to insert (0.12639202973 = blah).

Percentages work basically the same way, but you'll have a more useful scale (0->100) so you can make things more precise without having to use zounds of decimals.
Modern man is the missing link between ape and human being.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Quote
Originally posted by Lightspeed
0-->1 will get a pain with the values you have to insert (0.12639202973 = blah).
Is that any different from 12.639202973? :p

 

Offline Lightspeed

  • Light Years Ahead
  • 212
Yes, because its very possible you set something at say, 50.283% which looks okay, number wise.

On the other hand, 0.50283 is gettin insane (and hell of easy to typo).

The human mind just works better with 'normal' numbers than long stings of decimals. That's the whole deal why we came up with logarithms and all :)
Modern man is the missing link between ape and human being.

 
Check the thread on this in the recent builds forum, I posted something that might work for all of this.
just another newbie without any modding, FREDding or real programming experience

you haven't learned masochism until you've tried to read a Microsoft help file.  -- Goober5000
I've got 2 drug-addict syblings and one alcoholic whore. And I'm a ****ing sociopath --an0n
You cannot defeat Windows through strength alone. Only patience, a lot of good luck, and a sledgehammer will do the job. --StratComm

 

Offline JarC

  • 28
oooooooh.,...I hate this....now I gotta go and try and find the thread your are talking about,'is it really too much of an effort to either repeat it here or post a link? that way it still makes sense next week...

oh btw...0.25308 or 25.308 is the same to me...and for the enduser/modder, only pixels are of importance, since that can be visually mapped out and checked...percentages or any other system requiring to work in decimals is a pain in the but to position correctly...and no matter which non-pixel coordinate system you are going to use, something will always end up 1 pixel too far in any direction when you don't want it coz of rounding...
« Last Edit: May 31, 2004, 09:34:47 am by 106 »
Use the WiKi Luke
See You @ WIGGY's

 
just another newbie without any modding, FREDding or real programming experience

you haven't learned masochism until you've tried to read a Microsoft help file.  -- Goober5000
I've got 2 drug-addict syblings and one alcoholic whore. And I'm a ****ing sociopath --an0n
You cannot defeat Windows through strength alone. Only patience, a lot of good luck, and a sledgehammer will do the job. --StratComm

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
you talk of exactatude of pixel coordanants, but the thing is it will only be exact for the resolution you specify, you wil lack controle on the higher resolutions, and the lower ones will be off by ever larger degrees (based on how much higher the resolution you are working in.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
If you need precision relative to other HUD gauges, the gauge will have to be a mini-gauge. In that case you can specify the location with relative pixel coords.
-C

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
mini-gauges are gauges that are parts of other gauges right?

the floating point representation could be relitive to the size of the parent gauge.

or you know I just thought of something, why not have at the top of the table a $X_scale_division_factor: and a $Y_scale_division_factor:, it divides any numbers parsed by that, you can put 1024 and 768 in respectively and anything you put in will be the pixel space for the 1024X768 display mode, internaly the code handels it as a floating point, divides the table value by the division factors to get  the 0 to 1 value then multiplies it by the current screen resolution to get the actual pixel position, you can store the floating (0 to 1) representation for maybe a later in game resolution switch.
if you were to put in 1 and 1 for both division factors then the values entered would be the 0 to 1 system, if you put in 100 for both it would be percentages.
« Last Edit: June 01, 2004, 10:50:31 pm by 57 »
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline JarC

  • 28
Quote
Originally posted by Bobboau
you talk of exactatude of pixel coordanants, but the thing is it will only be exact for the resolution you specify, you wil lack controle on the higher resolutions, and the lower ones will be off by ever larger degrees (based on how much higher the resolution you are working in.
exactitude :D so why bother with the decimals? just pick 800x600 as reference res to work from, let the game deal with the decimals and the modder with the exact pixels...rounding errors will occur anyway no matter which system you choose...
Use the WiKi Luke
See You @ WIGGY's

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
I DO NOT want the hud to look the same in all resolutions

I absolutely despise the 640x480 HUD, however the 1024x768 hud is good

Pixels, relative position

ie X=1 is one pixel from left and X=-1 is one pixel from right edge
Y=1 one from top, Y=-1 one from bottom
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir