Wynntils

Wynntils

611k Downloads

Overlays merging into Features

DalwynWasTaken opened this issue ยท 1 comments

commented

After looking at the code from the Wynntils and seeing the changes implemented so far during the port to Artemis, I believe that this is an obvious next step.

Reasons for this move:

Simplicity
Instead of splitting features into multiple different things, keeping it all the same essential thing which can have addons like keybinds, config and in this case a visual feature (or overlay, not too sure about the naming since it's an addon so VisualFeature feels more appropriate than Overlay). This makes making new features easy as all you have to do is add what you want and no need to find what goes where and how.

Benefits:
In Wynntils it was easy to use hookElements in the RenderGameOverlayEvent and it makes sense, but with the cross version this causes some issues. Mainly that events are now done by Architectury or Mixins. This change will allow you to simply import and subscribe to the render event needed for the situation.

This will allow for Visual stuff to be completely redone and made more appropriate for the situation it finds itself in.

Now we have reasons and benefits for the move lets answer the "how":

What we need to store about the Visual part is it's location on screen, yeah, that's all. I mean we could store the name of the overlay but simply getting the feature name it's a part of is way more practical.

Well this will make Feature Registry a lot simpler and easier to follow as it does its steps.

Last issue to tackle, how do we make a way to allow for the user to move their displays around (no need to add the ability to toggle since that can be done by the feature itself). Remember how we need to store the location? Well we have 2 possibilities, we can use annotations or we can use a custom class that stores the data (the former will be easier to store cross instance though). Yeah, this kind of invalidates my draft PR. Anyway, so what we can do with this stored data is just load it like what was done in Wynntils, but with some UI Improvements since it feels a little clunky.

Thank you for reading this, I hope this can atleast show there are some other ways to handle Overlays

commented

Can we get enhancement label on this?