SmartlyDressedGames / Unturned-3.x-Community

Community portion of the Unturned-3.x repo. If you have access to the source code you can find it here:
https://github.com/SmartlyDressedGames/Unturned-3.x/
88 stars 18 forks source link

PSA: uGUI Refactor #2059

Closed SDGNelson closed 4 years ago

SDGNelson commented 4 years ago

In the "glazier" Steam beta branch the game has been updated to use uGUI rather than IMGUI. The goal at the moment is seamless compatibility, so if you run into any bugs please report them, whereas quality improvements will be done later down the road.

This will affect any plugins with custom menus. Any custom canvas with a sort order >15 will show over top of the built-in UI, and <15 will show underneath.

  1. Right-click Unturned in your Steam Library
  2. Select Properties and switch to the Betas tab
  3. From the dropdown select "glazier"

Originally described in issue #1234

ghost commented 4 years ago

Loading into Singleplayer and quitting back to menu doesn't load the menu again at all. Unturned_aBnA6MQHQ8

Throws a null reference with something to do with Glazier. Logs Attached Client.log

Also, for some items with longer names the quality overlaps the name. This even happens at higher resolutions Unturned_dOWitqxI65

SDGNelson commented 4 years ago

Thanks for trying it out, and for the log file! I will get all of those fixed up.

Edit: there were quite a few issues with returning to the menu during testing, but it seemed fixed, and now here's another one. 🤕

MoltonMontro commented 4 years ago

Left-clicking/right-clicking while dragging an item in inventory does not work (item cannot be manually dragged to a different inventory slot).

SDGNelson commented 4 years ago

Thanks Molt! How did item drag-dropping manage to break between yesterday and today?!

educatalan02 commented 4 years ago

I found another bug, related to the chat itself. It would be good if people cant use things like <color=Red>//<size=50>//<b>

Btw are the shadow in texts intended?

Also here is the video https://youtu.be/ozWYHAbxvZg And here is the Client.log: Client.log

Trojaner commented 4 years ago

It would be great if this system could be used to create GUIs from code instead of having to use Unity. Rust uses json that describes what UI elements to create and what properties they have (e.g. anchors, callbacks on click/submit, etc.).

SDGNelson commented 4 years ago

@educatalan02 The server should be rejecting client messages with tags (same as current release version), so I will double-check that. I will also fix the chat field to not format rich text tags. The shadows are similar to the shadows/outlines on the current release version.

@Trojaner The current way plugins are creating UIs is not really intentional, originally someone realized they could spawn uGUI canvases and went from there. I agree that long-term plugin UIs would need a way to use the game UI code, in particular to work with UIElements down the road.

negrifelipe commented 4 years ago

I have found a bug with the spy in lower resolutions

Video: https://youtu.be/L_-0PSG4UGY

SDGNelson commented 4 years ago

I've just released a patch which should fix all of the bugs reported so far. 🙂

Thanks for the report 01-Feli! - Will fix. (not fixed in the patch just released)

negrifelipe commented 4 years ago

I have found a new bug in this case is related to scopes. First Bug: When you have graphics presets in medium and higher a really wired circle Second Bug: When you have low quality in your scope when you try to enter in the escape menu you cant see itt because of the scope quality

Video: https://www.youtube.com/watch?v=CV2Czu2nKk8 (Sorry for my friend voice i forgot to mute my discord and my sellf 😂)

negrifelipe commented 4 years ago

I have found another big bug for lower resolutions If you use a lower resolution in the menu you can see some buttons and you cann click then while you are in the menu ui| Video: https://youtu.be/IeOuFs2WX5M

I have another question: if it is a problem for you if i post a lot of bugs in diferent comments

negrifelipe commented 4 years ago

I don't know if this a bug cause by the game ui

You cant select spawned objects in the beta version

Video: https://youtu.be/MeyoXFm9MeY

Client Log: https://pastebin.com/raw/6GNY100c

negrifelipe commented 4 years ago

The last bug i found is this:

This bug is related to the devkit ui, i can't interact with it, the same happends when i tried to use it in the editor Video: https://youtu.be/oi0G4WxViR4

SDGNelson commented 4 years ago

if it is a problem for you if i post a lot of bugs in diferent comments

@01-Feli it is preferable to consolidate into a single comment to avoid spamming everyone. If you want to report others separately then please email me instead.

iBowie commented 4 years ago

Cyrillic fonts (and probably some other languages) have issue with letters being too far from each other fonts Also shadows are not applied everywhere or applied not enough, leading to some not appealing and mixed with backgrounds results. fonts2 fonts3

Another issue i noticed is last clicked button or any other clickable control will stuck in "clicked" state, only visual bug.

SDGNelson commented 4 years ago

@iBowie the spacing in the tooltip was made wider to prevent the shadows from conflicting, but I agree it does not look very good. I will experiment with a box soft shadow behind the tooltip to reduce the text shadow.

The other text shadows closely match the current shadows in the IMGUI version, but especially on the life bars they could use a contrast boost.

The clicked state is because uGUI keeps a "selected" control for gamepad/keyboard navigation, though it does look a bit odd. Maybe I will disable the selected visual for now.

warren39 commented 4 years ago

Missing Chinese text in Workshop: workshop

warren39 commented 4 years ago

Text shadow inconsistent between English and Chinese txt

SDGNelson commented 4 years ago

Thanks @warren39! I will check into those

gegtor commented 4 years ago

The gamma issue is fixed and besides the issues mentioned above everything seems to work on macOS

As a big bonus, something about this reworked GUI gave macOS big performance boost around 20+ FPS

SDGNelson commented 4 years ago

@warren39 those issues should now be fixed on the beta branch. The problem with the workshop details in the server info screen was insufficient vertical space causing the text to truncate, so I reviewed all the shorter labels in the game to hopefully ensure no other labels would have problems with CJK text.

SDGNelson commented 4 years ago

With misc changes yesterday/today I think the uGUI update might be ready to go for next Friday!

ghost commented 4 years ago

With misc changes yesterday/today I think the uGUI update might be ready to go for next Friday!

That's exciting, the new UI does seem better mostly.

I'm not sure how open to changes you are willing to make for the sake of appearance, but there are a few annoying things.

The menus being generally "lighter" and less shaded does look better in some spots but causes issues in others

image

That's how the Skills menu used to look, and this is how it looks now, just harder to read some of the text, especially the actual attributes: image

Before: image New UI: image Before: image New UI: image

Before: image New UI (ignore the film grain, the text is just harder to read: image

The text shadows as well can look iffy in some parts, although that's more up to personal preference I suppose: Before: image New UI: image

Some of the menus look better with lighter shading/more sleek, like the weapons menu.

Of course, most of that is just my opinion, and I understand if you don't really think it's worth it to clean up those minor appearance things, still more gained than lost.

I would say the most annoying thing is just the shading for inspecting an item in your inventory with the new glazier UI. As shown above, it's too light and makes the text hard to read vs the text behind it.

I figure I should mention this stuff now before it gets released and people think you just made the text much harder to read/worse.

SDGNelson commented 4 years ago

Thank you for the feedback Miku! Thanks for trying it out again, much appreciated.

I agree with your comparison of how the UI appears "lighter", good point, and will make it more opaque accordingly.

Unfortunately making the text outline match between them is more challenging. uGUI uses distance fields which are not pixel-perfect, so the shadow has to be a bit stronger to show consistently at different sizes. The current settings have been revised several times, can adjust more with further feedback, but I'm hopeful that they're okay.

ghost commented 4 years ago

Thank you for the feedback Miku! Thanks for trying it out again, much appreciated.

I agree with your comparison of how the UI appears "lighter", good point, and will make it more opaque accordingly.

Unfortunately making the text outline match between them is more challenging. uGUI uses distance fields which are not pixel-perfect, so the shadow has to be a bit stronger to show consistently at different sizes. The current settings have been revised several times, can adjust more with further feedback, but I'm hopeful that they're okay.

Thanks for hearing me out.

I realized after that I was taking those screenshots with super modified UI Colors. The issues are pretty much the same/not affected by it, but the new UI does look a decent bit better using default colors.

I feel like a lot of people are going to dislike the text shadows at first, but to be honest, I've kind of grown to like them. Gives me old fallout games UI Vibes.

With the default settings, the indicator for selection/typing is almost the same color as the box itself, it's really hard to see your "typing spot indicator" when uploading workshop or searching for servers. At first, I thought it was gone completely. menu The same thing for selecting, really can't tell what I have selected. select

One last thing, all of the text boxes now flash at you when you start typing in them, the ones on the main menu (server searching, etc) and even Signs Flash They didn't use to do it before. NoFlash2

That's pretty minor though, just slightly annoying

SDGNelson commented 4 years ago

Currently the text field selection color is (1 - textcolor) because the text color is configurable, but it does look really difficult to see there. Will experiment with a different approach - maybe it should be handled differently for light/dark theme.

Agreed the flash when starting editing is annoying. I will change that to use the selected sprite instead.

SDGNelson commented 4 years ago

Misc fixes and changes have been uploaded to the beta branch now. For the text field selection color I tried a few alternatives taking into account the background color, but settled on using the separate foreground color setting with 50% transparency. By default this contrasts with the background and text, and looks better with custom color schemes.

Edit: server beta is broken right now, will fix.

SDGNelson commented 4 years ago

Closing this issue because the rewrite has been released, so reported issues will be handled separately.

ghost commented 4 years ago

It might be worth considering, in the future, more publicly announcing these betas, if you do another. Maybe announce alongside a game update, asking for any feedback, and also on the SDG Forums/wherever possible. Just something to try to encourage people to explore the Betas and provide feedback before they hit live.

You announced this update's beta in 14.0's update notes, but maybe including a direct link to give feedback, stating more boldly that it will be merged into the game soon, and maybe even offering a basic cosmetic for checking out the beta could be helpful. This might be more useful for Unturned II though, as Unturned 3.0 might not have any more major updates like this again.

Just trying to give some ideas for how to avoid situations like this in the future, where for example the interact bug or the sign/crafting bug were unlikely to be found by a handful of beta testers.

Specifically in this one, you mentioned The goal at the moment is seamless compatibility, so if you run into any bugs please report them, whereas quality improvements will be done later down the road, which probably didn't help either, as I thought you were saying you only wanted bugs reported for the first few weeks.

SDGNelson commented 4 years ago

Fair point. It would be nice to have more participation next time