-
Notifications
You must be signed in to change notification settings - Fork 104
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
Reduce interface terminal TPS impact + break some backends + new gui #394
Conversation
a441b81
to
248ada6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Will try to reuse Packet logic and container. It mostly does not affect my implementation of LMTerm
src/main/java/appeng/core/features/registries/IfaceTermRegistry.java
Outdated
Show resolved
Hide resolved
src/main/java/appeng/core/sync/packets/PacketIfaceTermUpdate.java
Outdated
Show resolved
Hide resolved
src/main/java/appeng/core/sync/packets/PacketIfaceTermUpdate.java
Outdated
Show resolved
Hide resolved
src/main/java/appeng/client/gui/implementations/GuiInterfaceTerminal.java
Show resolved
Hide resolved
Does two things: * Deprecate old interface terminal support classes. * Refactors the interface terminal API into AEApi. * Changes the API to use only relevant operations. Relevant here means things we will actually use when the packet format is updated in the next few commits. This is a breaking change, but it won't be hard to fix.
The booting/nonbooting event is posted whenever the ME system starts its "boot" phase and when the "boot" phase is finished. This commit distinguishes the two phases. Some subscribers might need this information to determine whether to push an update or not. An example is written in this commit - part interface terminal is only curious about when the terminal boots back up, not when the network enters the booting state.
248ada6
to
f902a46
Compare
Warning: 2 uncommitted changes |
f902a46
to
7b1a916
Compare
What about realtime update in interface terminal from other interactions. Like other player put new pattern if interface or other path that valuable in my implementation for Level terminal state has been changed and we need to notify opened gui about this |
src/main/java/appeng/core/sync/packets/PacketIfaceTermUpdate.java
Outdated
Show resolved
Hide resolved
src/main/resources/assets/appliedenergistics2/textures/guis/newinterfaceterminal.png
Outdated
Show resolved
Hide resolved
7b1a916
to
c71a2e5
Compare
Adds a new packet specifically for updating the entries on the terminal. Reduces network traffic, potentially significantly, as it allows for incremental updates instead of sending a fresh list every time the entries on the list change (Note it WAS smart enough to not send a fresh list if only patterns changed). Deprecates appeng/core/sync/packets/PacketCompressedNBT Commit does not add functionality to handling on the client side yet.
The interface terminal is ripe for many optimizations. This commit seeks to fix the biggest issues: * Every tick, the interface terminal checks for any network changes. This has been improved to check only when the network has finished booting. * Every tick, the interface terminal iterates through all of its tracked inventories to check for changes. This is bad when the ME system has a nontrivial amount of tracked inventories, because it it tries to check whether items are different, and is expensive for NBT items such as patterns. This has been changed to send changes that have been marked dirty. This commit does not implement handling on the GUI side.
appeng/client/render: Render items using translations appeng/client/gui/AEBaseGui: Use custom renderSlot Squash of 2 commits: * Depth test should be allowed to be used when rendering slots to make it easier to support z-level translations rather than use a pass-based rendering system. * This commit disables those depth tests which allows tooltips to be drawn before the rest of the screen is drawn, which makes it way less messy to code as everything can be done in 1 pass. MC's native RenderItem disregards z-level when drawing item overlays, since it disables GL_DEPTH_TEST before drawing it. This commit adds a way for AE2 to draw slots with its own z-level methods.
src/main/java/appeng/container/implementations/ContainerInterfaceTerminal.java
Show resolved
Hide resolved
src/main/java/appeng/core/sync/packets/PacketIfaceTermUpdate.java
Outdated
Show resolved
Hide resolved
I will assign laiff so he will decide when to merge. I dont see too many open issues after the last round of fixes so I assume most of them are good. I would recommend another round of tests for each part of the terminal before merging. Fragile parts are the search components (each text box) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/main/java/appeng/client/gui/implementations/GuiInterfaceTerminal.java
Outdated
Show resolved
Hide resolved
src/main/java/appeng/core/sync/packets/PacketCompressedNBT.java
Outdated
Show resolved
Hide resolved
I typed "yellow" |
ok i'll check it |
I can't reproduce this behaviour. I tried to enter this in plain english in japan and greek. There are no problem with rendering. Can you clarify what exactly you do to get this strange rendering? And i think it can be splited out into separate |
Warning: 2 uncommitted changes |
f45a21f
to
f35c5af
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue I raised is
- Cannot be reproduced on Laiff's env
- Cannot be reproduced on my modpack instance
- Cannot be figured out how to fix on my end
So I'd approve this PR. Great work!
@Laiff Look carefully at Miozune's image. It's not the textbox rendering that's broken; it's the rendering order. Look at counts of items. These numbers are rendered behind items. Also word 'yellow' is correctly rendered (if you check width of characters), but every character have some rectangular overlay. |
Yes there are few problems fix zIndexes, mainly all of them related to DuraDisplay where Depth test completely disabled for overlays. I'll try to figure out solution but separately after discussing with caedis or someone else |
I really wished the star import refactor was done after this, because now there are merge conflicts...eh wasnt too bad, fixedThis is actually a subset of the features I want to implement.
Backend Changes
GUI Changes
Would like some brave testers to test this. Initial tests seemed fine, but there are probably a ton of corner cases that need to have bugs squashed.