Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Questions About Graphical User Interfaces
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#1
Photo  Questions About Graphical User Interfaces

I'm bored, so I just wanna ask and see if anyone at all knows anything about this.

Why is Amnesia's GUI slightly scaled down? I'm messing around with a fully custom GUI for a mod (I don't plan on releasing the mod, I just test things to see how much I can modify), and I've noticed that the files aren't drawn in the same size as their .tga file is. I understand this is the case with the background of the main windows because it needs to fit the size of the window itself, but things like the cursor bug me a bit.

As an example, I drew a Windows Classic cursor in the .tga file for the cursor. In-game it appeared slightly smaller in scale. It is as if it's only 95% of the actual size, but it is enough to distort the image and blur the lines.

How the .tga file looks when I open it:
[Image: jDgvgcO.png]

In-game:
[Image: lK0vVGA.png]

This same thing happens with the HPL editors. It makes the whole thing feel unstable to me. I don't know, I just really like things to be accurate and smooth. I guess it's my OCD hitting my head.

In the GUI configs you can also define a so-called active_size="-1 -1". If anyone has been messing with it, are you able to actually explain what it does? I have tried different values but I don't understand the logic behind it. The cursor's size doesn't change, but some of the GUI components have unpredicable results.

I don't expect anyone to know why this is (apart from the ones who actually developed the rendering engine), but perhaps anyone have any thoughts? Tongue

(This post was last modified: 05-19-2014, 11:03 PM by Mudbill.)
04-24-2014, 01:49 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#2
RE: Questions About Graphical User Interfaces

I can only assume it is based on your monitor's dimensions or settings in your in-game options, just like any other game.

Playing just about any game at lower than it's normal resolution will bring scaling issues. You could also configure some stuff in your settings which dictate how big/small things are based on things like your texture filter, blooming, using billinear or trillinear, etc.

Under heavy assumption how all trailers when FrictionalGames and TCR released their YouTube teaser trailers were in 1080p, I assume they're using 1920x1080 resolution, which will probably run without any scaling as it is likely the "natural" dimensions for running the game.

Edit: Your .tga link is also broken. Just letting you know Smile

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 04-24-2014, 01:57 PM by Romulator.)
04-24-2014, 01:54 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#3
RE: Questions About Graphical User Interfaces

Well, I was running the game in 1080p resolution when taking the screenshot, though I should probably try disabling all the specific effects. But what about the editors? They don't have much of graphic options. They are ran in the same engine as the game though, so perhaps the rendering engine is just built to do something like this.

You don't really notice much scaling with the default GUI because it's optimized for it, but anything that tries to be pixel-accurate turns out blurry. I also don't think the cursor is actually affected by screen resolution because it remains the same size for different ones. I have a 1440p monitor, just to have that said. I run the game in a window.

Odd that the .tga link was broken. Looks fine to me: http://prntscr.com/3cyktx
(I blame this site then, cause I just found one on Google cause I'm not at home atm. It looks identical though. http://www.javascriptkit.com/script/script2/cursor.gif )

Edit: Just updated the image to my actual one. I also tried to see how it would be without any smoothing or anti-aliasing sort of effects and they don't appear to affect GUIs at all. So I'm back to the beginning of the thread.

(This post was last modified: 04-24-2014, 03:11 PM by Mudbill.)
04-24-2014, 02:05 PM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#4
RE: Questions About Graphical User Interfaces

Yeah I wondered that as well... And I didn't like that cursor either.
The one you want is redist/gui/default/gui_def_pointer_normal.tga
That's the one the editors are using.

Mine I replaced it with the Amnesia's redist/gui/main_menu/gui_amn_mm_pointer_normal.tga
Looks way better, you should try it yourself.

I also changed the font, some icons, colors, and others.
Being the font the most relevant one.

04-26-2014, 03:55 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#5
RE: Questions About Graphical User Interfaces

I actually drew a pointer for the editors which looks like this:
File and In-editor:
[Image: YmQAm7G.png][Image: ZLdaTdC.png]

But I'm not talking primarily about the editors default cursor (which I didn't really like either). I'm talking about using custom GUIs in mods for the game itself. I've been practising GUI designing and the way I used to understand and separate all the files was to recreate a Windows Classic style. I think it works pretty well, but it does not seem to be pixel-accurate, therefore I can't quite make it as nice as I'd like.

This is how the results are so far xP
Spoiler below!

[Image: g3ZnKX0.png]
[Image: IhYXX8F.png]

(This post was last modified: 04-26-2014, 04:06 AM by Mudbill.)
04-26-2014, 04:02 AM
Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#6
RE: Questions About Graphical User Interfaces

Not sure what you have tried, or abided by when making your stuff. I opened the:
gui\default\gui_def_pointer_normal.tga

and observed the scale of the image. The thing is set as follows - Width: 14 Height: 25

It's set in a 9:16 relation, where 9 is the width and 16 is the height. I'm assuming this is to 'counteract' some sort of scaling which happens in game, where the 16:9 (1080p) resolution stretches the image.
Edit: Short video of it: http://www.twitch.tv/acies404/c/4136335

14 (width of the image) x 16 (widescreen width relation in 1080p) = 224
25 (height of the image) x 9 (widescreen height relation in 1080p) = 225
In the end; an almost square shaped image.

Which would mean that in order to display an image properly you would have to stretch it some extra in height to account for widescreen resolutions. That 'extra stretch' should be proportionate to account for reversing the 16:9 widescreen-effect.

You might already have noticed this though, if not, gl hope it might solve something :]

[Image: mZiYnxe.png]


(This post was last modified: 04-26-2014, 06:52 PM by Acies.)
04-26-2014, 06:47 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#7
RE: Questions About Graphical User Interfaces

Hm, yes that does make sense. Perhaps it affects it. I think I remember resizing the editor's cursor once just to see how it was, but I didn't mess much with it.

Many of the files have odd resolutions (as in non-pow2). Perhaps the formatting of the file is odd as well. When making a new Photoshop file, you can specify the resolution in PPI (pixels per inch). Normally, that's 72, so maybe these have something else.

I should do some testing.

Edit: It looks like the file resolution does not affect how it's rendered. I think the reason it's only 16x25 is because that's all the space they needed to draw the cursor. Resizing it to 64x64 doesn't change anything of how it looks. I'm guessing you'd only need a bigger file if you wanted to draw a bigger image.

(This post was last modified: 04-26-2014, 07:40 PM by Mudbill.)
04-26-2014, 07:27 PM
Find




Users browsing this thread: 2 Guest(s)