Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explore replacing the game's Scaleform GFx UI with a new Avalonia UI #65

Open
5 tasks
alexrp opened this issue Sep 12, 2023 · 0 comments
Open
5 tasks
Assignees
Labels
area: client Issues related to the launcher and client integration. area: research Issues related to reverse engineering of the game. area: tools Issues related to the internal CLI tools. state: deliberation Issues that require considerable deliberation and/or discussion before a resolution can be found. type: feature Issues that are classified as feature requests.
Milestone

Comments

@alexrp
Copy link
Sponsor Member

alexrp commented Sep 12, 2023

This is a very, very long term project that will require a lot of experimentation.

The idea is to completely rip out the ancient, slow, and ugly Scaleform GFx UI from the game. We would replace it with a new UI, written from scratch, using Avalonia.

Here's what I think we would roughly have to do:

  • Remove all calls to Scaleform GFx in the client.
  • Hook any functions necessary to get game notifications relevant to the UI subsystem.
  • Figure out how to forward relevant keyboard/mouse/controller input events to the UI subsystem.
  • Write an Avalonia platform backend that hooks into the game's rendering.
  • Actually implement the entire game UI. 😰

For the Avalonia backend, I think we would basically just do a classic IDXGISwapChain::Present() hook. In the hook, we make Avalonia render using Direct2D or Win2D, which should be fairly easy since Avalonia already has an official Direct2D backend that we can learn from. Using Direct2D is advantageous because it can interoperate with Direct3D.

Note: TERA only works with DirectX 11.0+ since the 64-bit upgrade. However, Direct2D/Direct3D interop will require Direct3D feature level 11.1. Unfortunately, the client currently hardcodes feature level 11.0 when calling D3D11CreateDevice(), so we will need to patch that.

@alexrp alexrp added state: deliberation Issues that require considerable deliberation and/or discussion before a resolution can be found. type: feature Issues that are classified as feature requests. area: symbiote area: research Issues related to reverse engineering of the game. labels Sep 12, 2023
@alexrp alexrp added this to the v2.0 milestone Sep 12, 2023
@alexrp alexrp added the area: tools Issues related to the internal CLI tools. label Sep 13, 2023
@alexrp alexrp added area: client Issues related to the launcher and client integration. and removed area: symbiote labels Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: client Issues related to the launcher and client integration. area: research Issues related to reverse engineering of the game. area: tools Issues related to the internal CLI tools. state: deliberation Issues that require considerable deliberation and/or discussion before a resolution can be found. type: feature Issues that are classified as feature requests.
Projects
None yet
Development

No branches or pull requests

2 participants