Skip to content

Overhaul TD encyclopedia UI#21631

Merged
PunkPun merged 6 commits into
OpenRA:bleedfrom
pchote:td-encyclopedia-rework
Nov 3, 2024
Merged

Overhaul TD encyclopedia UI#21631
PunkPun merged 6 commits into
OpenRA:bleedfrom
pchote:td-encyclopedia-rework

Conversation

@pchote

@pchote pchote commented Oct 27, 2024

Copy link
Copy Markdown
Member

Closes #21625.

Screenshot 2024-10-27 at 16 46 15

The headline change is the addition of large rendered portraits from (primarily) the original game manual.

The embedded jpgs were dumped from the manual shipped with the steam release: many of these were already the right size, they just needed their white/black points adjusting and then a small amount of cropping. The rest were at only half resolution and not quite wide enough: these were upscaled and some extra background added on one side of the image.

I manually recreated a few of these low resolution portraits (e.g. commando, buggy, bike) where the renders used by the manual were themselves available. Apache and Supply truck were created from RA renders. Obelisk was created from an ingame FMV.

@pchote pchote added this to the Next Release milestone Oct 27, 2024

@dragunoff dragunoff left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, nice work 👍 I left some minor comments.

Comment thread mods/cnc/chrome/encyclopedia.yaml Outdated
Comment thread mods/cnc/rules/aircraft.yaml
Comment thread mods/cnc/chrome/encyclopedia.yaml Outdated
Comment thread mods/cnc/uibits/portraits.png Outdated
Comment thread mods/cnc/uibits/portraits.png Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is now a noticeable delay when accessing the encyclopedia for the first time (I assume as this file gets loaded). It's not a blocker but we may think about some sort of lazy loading as this is not a critical asset. Or maybe preloading when the user hovers over the button.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UI artwork is loaded on demand, so the simplest workaround here would be to split the portraits over several smaller images. Although this means that they couldn't all live in the same collection, which complicates the plumbing... I'll have a think about this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option would be to bypass the regular UI and atlasing system completely and load the portraits as individual png files directly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the images split the opening of the encyclopedia is now instant.

@PunkPun PunkPun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ingame it looks awesome. Some entires will need their descriptions have their newlines fixed up, but that's out of scope

@pchote

pchote commented Oct 28, 2024

Copy link
Copy Markdown
Member Author

Some entires will need their descriptions have their newlines fixed up, but that's out of scope

Indeed. I also want to add entries for the missing support units (a10, c17, boat, lst, mhq) and adjust the wording on the tech structures. These can be done in a followup PR.

@pchote

pchote commented Oct 28, 2024

Copy link
Copy Markdown
Member Author

I've pushed a commit to test the performance improvement from splitting out individual portraits.

@dragunoff can you please comment on whether this helps with the panel open time (my SSD is too fast to properly test 😞)

@pchote

pchote commented Oct 30, 2024

Copy link
Copy Markdown
Member Author

Updated and ready for rereview.

@pchote pchote force-pushed the td-encyclopedia-rework branch from cd59d06 to 6282f23 Compare October 30, 2024 18:27
@pchote

pchote commented Oct 30, 2024

Copy link
Copy Markdown
Member Author

Updated again to include appropriate faction colours on the previews.

@PunkPun PunkPun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM

Comment thread OpenRA.Mods.Common/Widgets/Logic/EncyclopediaLogic.cs
Comment thread OpenRA.Mods.Common/Widgets/Logic/EncyclopediaLogic.cs Outdated
@pchote pchote force-pushed the td-encyclopedia-rework branch from 6282f23 to 4d94c36 Compare November 3, 2024 15:11
@pchote

pchote commented Nov 3, 2024

Copy link
Copy Markdown
Member Author

Fixed.

@PunkPun PunkPun merged commit 9bcf1b3 into OpenRA:bleed Nov 3, 2024
@PunkPun

PunkPun commented Nov 3, 2024

Copy link
Copy Markdown
Member

changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TD Database UI layout is bogus

3 participants