Non-standard aspect ratio - now solved for Fighter HUD
Moderators: winston, another_commander
-
- ---- E L I T E ----
- Posts: 389
- Joined: Sat Sep 26, 2009 2:14 pm
- Location: Christchurch, New Zealand
Why should we even have to be aware of such ratio issues? If things are anchored relative to the centre of the screen and/or edges, such ratio problems need not become an issue.zevans wrote:How about add support for a new tag describing aspect ratios and what to do in case of rendering emergency - and have the default assumption "4:3" and "nothing" so that HUDs that don't know about the new stuff continue to behave in the old way?
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
even the Grim Reaper keeps his distance.
-- Paul Wilkins
- Killer Wolf
- ---- E L I T E ----
- Posts: 2278
- Joined: Tue Jan 02, 2007 12:38 pm
out of interest, how come altering the Y placement value in the HUD plist in 1.73 doesn't shift the vamp HUD down to get rid of the gap? is something else overriding that?Ahruman wrote:This was due to a bug in 1.65 which was fixed in 1.67. In 1.65, the HUD coordinate system varied between planets. From 1.67, it is standardised on the previous Mac behaviour.Killer Wolf wrote:interesting thread. i use 1280x1024 and my vamp HUD doesn't fit the 1.73 release when it used to work fine in 1.65.
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
- Captain Hesperus
- Grand High Clock-Tower Poobah
- Posts: 2310
- Joined: Tue Sep 19, 2006 1:10 pm
- Location: Anywhere I can sell Trumbles.....
<garble>pmw57 wrote:... static ...
<blue screen of death...>
Captain Hesperus
The truth, revealed!!
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Platforms, buggrit. :-pCommander McLane wrote::shock:Ahruman wrote:This was due to a bug in 1.65 which was fixed in 1.67. In 1.65, the HUD coordinate system varied between planets.
"Planet Macintosh to planet Microsoft: If there is any intelligent life-form at your place, please respond..."
E-mail: [email protected]
- Cmd. Cheyd
- ---- E L I T E ----
- Posts: 934
- Joined: Tue Dec 16, 2008 2:52 pm
- Location: Deep Horizon Industries Manufacturing & Research Site somewhere in G8...
<Planet Microsoft reboots communication array just in time to watch Planet Macintosh's Main Power Station (read- battery) explode>
<shrugs> meh...
<shrugs> meh...
Find my OXP's at:
Deep Horizon Industries - Your Planet Our Design
Deep Horizon Industries - Your Planet Our Design
- Killer Wolf
- ---- E L I T E ----
- Posts: 2278
- Joined: Tue Jan 02, 2007 12:38 pm
If i can drag this back on topic.
this HUD stuff getting on my t*ts now. nothing i do gets the thing to place flush against the bottom of the screen. i've even sized the image to be 1024x768, and tried 1280x1024, and used that. it still gets resized by the game, leaving strips at top and bottom. changing the WIDTH and HEIGHT settings in plist, when larger than the image (ie, using 1280 etc when the image is 1024) makes it bigger and doesn't fit the screen, making it the exact size leaves strips. as mentioned earlier, using the X and Y values appears to have no effect.
i've made everything 4:3 which, if i'm reading ahruman's post correctly, means it shouldn't need to be scaled and should fit perfectly. or am i missing something obvious?
i've made everything 4:3 which, if i'm reading ahruman's post correctly, means it shouldn't need to be scaled and should fit perfectly. or am i missing something obvious?
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
- Killer Wolf
- ---- E L I T E ----
- Posts: 2278
- Joined: Tue Jan 02, 2007 12:38 pm
What do you think about this patch, which allows HUD items to specify new x_origin and y_origin properties which describe the desired co-ordinate system? (The values should be floating point numbers, e.g. x_origin = 1.0 means that the x co-ordinate is interpreted relative to the right hand side of the screen, and y_origin = -1.0 means that y is relative to the screen bottom. If x_origin is set to 0 or unspecified, then x is interpreted relative to the middle of the screen (duplicating the existing behaviour), and similarly for y_origin.)
The patch is too big to include inline, so is available here:
http://oolite.pastebin.com/f34ad437e
I've updated the default hud.plist to use y_origin to align the legends and dials to the screen bottom, even on tall aspect ratio displays.
The advantages of this approach:
The patch is too big to include inline, so is available here:
http://oolite.pastebin.com/f34ad437e
I've updated the default hud.plist to use y_origin to align the legends and dials to the screen bottom, even on tall aspect ratio displays.
The advantages of this approach:
- HUDs can easily anchor different objects to different parts of the screen (e.g. the crosshairs in the middle and the dials flush against the bottom edge), regardless of aspect ratio. This will work even if the crosshairs are sprites and even if the resolution or window size is changed at runtime, which was previously impossible.
- It's completely backwards compatible; all existing HUDs will work as well (or as badly) as they ever did.
- Although positions become quite flexible with this patch, there's no corresponding facility for sizes. (For instance, something like the Fighter HUD would probably like to be able to specify that the opaque glass image be sized to about 60% of the screen height.) That could be added later if necessary.
- I didn't update the constants in HeadUpDisplay.h to match the new hud.plist. Although it would be cleaner to change those to specify y_origin as well, there is a slight risk that doing so might break weird custom HUDs which assume that particular HUD items live at fixed positions without specifying them explicitly. If this patch is applied, then the constants should probably get updated eventually.
Looks very promising! We'll take it for a spin, and - barring accidents - you might just have found a way to give both Screet and pmw57 some extra peace of mind!
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Everyone with a standard 19" TFT or 17" TFT with 19" resolution would benefitKaks wrote:Looks very promising! We'll take it for a spin, and - barring accidents - you might just have found a way to give both Screet and pmw57 some extra peace of mind!
How's testing going? I myself have trouble with the example since it's mixing the new and old revision, thus I don't have any idea how I could tell svn or some other program on how to modify my version according to the example...I'd really like to give it a try...
Screet
Haven't started testing yet. This weekend I should have some free time, provided I can stop myself from taking on extra commitments...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)