• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

The UI system is stupid, change my mind

Status
Not open for further replies.

Chaosy

Tutorial Reviewer
Level 41
Joined
Jun 9, 2011
Messages
13,239
So I have spent the last few hours trying to make a basic UI system.

After a while I noticed I have 6 tabs of UI tutorials open, this is way too complex for something that should be VERY simple.

1. create background
2. create icon on top of the background

upload_2020-1-6_0-41-7.png


in html/css this would take me a minute at most.

css:
#bg {
background-image: url("bg.png");​
}

#bg img {
margin-left: 100px;​
}
html:
<div id="bg">
<img src="warden.png>​
</div>

This took me almost one hour to figure out in wc3. Why?

1. There is no accessible list of default frames, or previewer so I know what they look like. A list like this should not be required through third party sources, and even if it was okay how is it useful without an image preview?

2. Who the fuck thought it was a good idea to make a relative scale from 0 to 0.8/0.6, ever heard of % ? or 0 to 1. Without looking up a tutorial I have no way of knowing what the max value is. Even if you want to keep this stupid scale the max value should be visible in the editor. And dont get me started on the fact that the max value does not reach the edge of the screen on widescreen monitors.

2b Why is there no way to position based on pixels? and not only relative units? (from what I could find at least)

3. Why are there no default values?? if I do not specify a position the frame does not appear. Why shouldn't it appear at 0,0 by default. If I do not specify a size it does not appear either, just make it 0.1 in size or something. This would make prototyping a 100 times easier. Not to mention cutting down on the required arguments like framepointtype which really should not be required to specify.

Just look at the UI systems that are supposed to simplify this process. They require a 20 page user manual. [JASS/AI] - UI Utils Manual this is not to throw shade at those trying to make such systems, but rather at the horrific base they have to build it on.
 

Attachments

  • upload_2020-1-6_0-24-9.png
    upload_2020-1-6_0-24-9.png
    25.4 KB · Views: 54
Level 18
Joined
Jun 13, 2016
Messages
586
What exactly are you complaining about here? That the UI system of a 18 year old game is jank as fuck? Wow, who woulda guessed.

It's pretty evident there's very little effort being put into creating developer-friendly systems in Blizzard. The UI API is pretty much just whatever shit they had internally this whole time, exposed over a janky JASS API. I doubt their management is going to let anyone spend development time making anything better.

Yeah, it's shit. It's gonna stay shit, because 98% of the feedback goes unheard anyway.
 
Level 18
Joined
Jun 13, 2016
Messages
586
HTML came out in 1991 and has better fundamentals.

edit: html3 came out in 1996

point is, age is not an excuse for bad design. Especially when they are about to release a remake of said game.

"Don't touch it if it works."

This is, unfortunately, the safest principle to follow when working with old codebases. They could try and improve the old UI system but it would likely push the (already delayed) release date several months back, introduce an insane amount of bugs, and generally be a pain in the ass.

Yeah, age isn't an excuse for bad design. But you know what is? Development deadlines and code freezes.

The API they exposed is very low-level and basically the same thing they have in the engine. It should be possible to build something more usable and high-level over it. Just nobody bothered to do it yet, and Blizzard devs evidently aren't allowed to prioritize this (and big surprise, they will never be).

EDIT: I'm not trying to defend Blizzard here. I'm just offering a realistic perspective onto the development process, especially considering the 2 years of updates that we've had to, uhm, endure. I'd rather they not touch anything that "just works" in fear of them breaking something again, and never bothering to thoroughly fix it again.
 
This took me almost one hour to figure out in wc3. Why?
You have to learn something new, hence it takes longer. FDF is quite different from html. FDF was defined for a multiplayer rts game, html to share documents.

The image you shown is also in the warcraft UI createable in a low amount of time.
Lua:
TimerStart(CreateTimer(), 0, false, function()
    local frameBackground = BlzCreateFrame("QuestButtonBaseTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 0)
    local frameIcon = BlzCreateFrameByType("BACKDROP", "", frameBackground, "", 0)
    BlzFrameSetSize(frameBackground, 0.2, 0.2)
    BlzFrameSetSize(frameIcon, 0.04, 0.04)
    BlzFrameSetAbsPoint(frameBackground, FRAMEPOINT_CENTER, 0.4, 0.3)
    BlzFrameSetPoint(frameIcon, FRAMEPOINT_CENTER, frameBackground, FRAMEPOINT_CENTER, 0, 0)
    BlzFrameSetTexture(frameIcon, "ReplaceableTextures\\CommandButtons\\BTNHeroPaladin" , 0, false)
end)

Some of my tutorials are kinda bad and they do not focus onto one subject. This Frame natives are such a huge subject. They can be used to create frames, alter frames, stop hotkeys, detect targeting/selection mode and much more. And even the creation of frames has atleast 2 ways. One can write custom FDF or don't bother that whole custom written fdf stuff. Some of my tutorials actually show that, one can create working frames without knowing how fdf works at all to some degree. It is still benefitting to know the names of frames one can create/inherit hence that list exists you linked. You are right it would be more useful with images.
But I am a bit hesitant with that, Reforged might look different and might throw over the Ingame UI.

Who the fuck thought it was a good idea to make a relative scale from 0 to 0.8/0.6, ever heard of % ? or 0 to 1. Without looking up a tutorial I have no way of knowing what the max value is. Even if you want to keep this stupid scale the max value should be visible in the editor. And dont get me started on the fact that the max value does not reach the edge of the screen on widescreen monitors.
Maybe with 0.8 to 0.6 they wanted to tell it is 4:3. They can't tell you the max values in the editor right now, cause the whole UI-Frame natives are not ported to the Editor at all. You only can use them with manual written code or with modified GUI Trigger Data.
This max values are only valid for one group of frames. There are 2 groups: Frames and SimpleFrames (do not mix that up with SIMPLEFRAME also a SimpleFrame but it is a specific type). SimpleFrames can leave the 4:3 space they can even leave the shown screen.

2b Why is there no way to position based on pixels? and not only relative units? (from what I could find at least)
One can do that with some math blizzard provided natives to get the local resolution checkout common.j. I read UI-Utils can do this pixel base stuff. This game supports alot of resolutions, if you place stuff based on pixeles the result will differ quite much for different resolutions. x/y is for one the Center of the screen while for the other it is the corner.

3. Why are there no default values?? if I do not specify a position the frame does not appear. Why shouldn't it appear at 0,0 by default. If I do not specify a size it does not appear either, just make it 0.1 in size or something. This would make prototyping a 100 times easier. Not to mention cutting down on the required arguments like framepointtype which really should not be required to specify.
Many Frames have a default size for them you only need to set the position. This frames in fdf that don't have a size are often meant to be used as functional children for a more advanced frame that automatically controls their position and size.
Well in Warcraft 3 frames require a position to be displayed. This framepoints simplefy relative posing alot this is also probably the reason why there is no frame get pos on screen. There is no need for that you can place frames relative to other frames and interactive frames are handled by TriggerEvents which also takes away the burden to sync stuff.

Not to mention cutting down on the required arguments like framepointtype which really should not be required to specify.
You can write a wrapper without framepointtypes. But the usage of different framepointtype can alter the result quite much.

The API they exposed is very low-level and basically the same thing they have in the engine.
and the given code API is incomplete.
 
Last edited:

Chaosy

Tutorial Reviewer
Level 41
Joined
Jun 9, 2011
Messages
13,239
You have to learn something new, hence it takes longer. FDF is quite different from html. FDF was defined for a multiplayer rts game, html to share documents.
The LoL game client is done in HTML which has online capabilities.
WoW's login screen also uses some amount of HTML as their noticeboard was bugged half a year ago displaying some HTML code.

Not saying they should have done their UI in HTML, but I am saying that I find it highly surprising that they went in a more stupid direction when there were better methods to take inspiration from when designing a new format.

Maybe with 0.8 to 0.6 they wanted to tell it is 4:3. They can't tell you the max values in the editor right now, cause the whole UI-Frame natives are not ported to the Editor at all. You only can use them with manual written code or with modified GUI Trigger Data.
This max values are only valid for one group of frames. There are 2 groups: Frames and SimpleFrames (do not mix that up with SIMPLEFRAME also a SimpleFrame but it is a specific type). SimpleFrames can leave the 4:3 space they can even leave the shown screen.

You can tell us it is 4:3 in the patch notes instead of using a weird scale to make a point.
And yes, I noted that some frames can be positioned outside which only adds to my confusion.

One can do that with some math blizzard provided natives to get the local resolution checkout common.j. I read UI-Utils can do this pixel base stuff. This game supports alot of resolutions, if you place stuff based on pixeles the result will differ quite much for different resolutions. x/y is for one the Center of the screen while for the other it is the corner.

Fair. Still, how this is not easily done through the API annoys me though. Not that this is entire new to wc3 modding. *old dds systems, cough*

Many Frames have a default size for them you only need to set the position. This frames in fdf that don't have a size are often meant to be used as functional children for a more advanced frame that automatically controls their position and size.
Well in Warcraft 3 frames require a position to be displayed. This framepoints simplefy relative posing alot this is also probably the reason why there is no frame get pos on screen. There is no need for that you can place frames relative to other frames and interactive frames are handled by TriggerEvents which also takes away the burden to sync stuff.
Should note that I do only use code, I have not touched fdf. I want as much generated UI as possible without imported files.
But yes, it is possible that I did not clear the positions before trying to move etc. I do not remember exactly how the code looked at the time.

You can write a wrapper without framepointtypes. But the usage of different framepointtype can alter the result quite much.
I understand that the option to use framepoints is important.
But my annoyance is that fast prototyping is not possible.
In html I just do <button>click me <button> and I have a button <p>some message</p> and I have a text with default size, color and position.

Technically I do not even need the clickme text for it to be visible in my document. Compare this to making it in wc3. If I am learning and just want to see if stuff works it slows me down to no end.
In my opinion creating a simple UI element should be one function call with two arguments at most. I would love to create a simple wrapper for this but I cant because it depends on what type of element I want to create. Some UI elements can be created with few arguments while others cant.

Some of my tutorials are kinda bad and they do not focus onto one subject. This Frame natives are such a huge subject. They can be used to create frames, alter frames, stop hotkeys, detect targeting/selection mode and much more. And even the creation of frames has atleast 2 ways. One can write custom FDF or don't bother that whole custom written fdf stuff. Some of my tutorials actually show that, one can create working frames without knowing how fdf works at all to some degree. It is still benefitting to know the names of frames one can create/inherit hence that list exists you linked. You are right it would be more useful with images.
But I am a bit hesitant with that, Reforged might look different and might throw over the Ingame UI.
I did not make this to bash tutorials, I try to bash blizzard for making 10 tutorials from third parties required at all.
 
Level 21
Joined
Apr 12, 2018
Messages
494
The LoL game client is done in HTML which has online capabilities.
WoW's login screen also uses some amount of HTML as their noticeboard was bugged half a year ago displaying some HTML code.

Not saying they should have done their UI in HTML, but I am saying that I find it highly surprising that they went in a more stupid direction when there were better methods to take inspiration from when designing a new format.
I think you are, and frankly HTML also has its own set of problems. Don't act like there is a God Tier scripting language, because there isn't.

And why should anyone waste their time "changing your mind" when it's clear you made up your mind before you made the post? That just makes you confrontational, not wise.
 

Chaosy

Tutorial Reviewer
Level 41
Joined
Jun 9, 2011
Messages
13,239
Never said HTML is perfect.
I am saying I think it is better than utter garbage.

Android uses XML files to design apps if I recall, that would be miles better than what wc3 has.
edit: android studio has a graphical editor to create and position/edit elements which is even better

And why should anyone waste their time "changing your mind" when it's clear you made up your mind before you made the post? That just makes you confrontational, not wise.
I have a current opinion, but opinions change.
If someone came along and said something along the lines of: "ACTUALLY you can position your elements using this method, you just didn't know about it."
Then fair enough. Or "But wc3's way of doing things offer advantage X"

And no, I am not wise. Never pretended to and never will.
I am middle of the pack if not less.

FYI, the title is a reference to a somewhat popular meme. It was not meant to be taken too seriously.
crowder.jpg
 
Last edited:
Status
Not open for further replies.
Top