Optimization Suggestion: Merging Loot Entities for Performance & Cleanliness
Hello everyone,
I've been thinking about ways to optimize performance and improve visual clarity by reducing the number of loot entities displayed on the screen at any given time. The idea is simple: merge nearby loot drops at regular intervals to decrease lag and keep the screen clean.
Proposed Solution
-
Scheduled Optimization Check
- Implement an event that runs every 15 seconds to evaluate the number of loot entities currently on the screen.
-
Grouping Nearby Loot
- Gather entity data into an array, storing their locations and quantities (considering base materials already have multipliers for multi-kills).
- Define a reasonable threshold to determine how many entities should be merged.
-
Merging Process
- Replace multiple scattered loot entities with fewer, consolidated entities that represent the total combined loot.
- Assign a new entity at a central location within the group, summing up the values from the merged entities.
-
Visual Representation of Loot Value
- Use a color-coded system to indicate the quantity of stacked loot:
- ๐ข Green โ 100
- ๐ก Yellow โ 1,000
- ๐ด Red โ 10,000
- ๐ฃ Purple โ 100,000+
- And it goes on
- This way, players can quickly identify valuable loot without unnecessary clutter.
- Use a color-coded system to indicate the quantity of stacked loot:
-
Potential Expansion
- Consider adding an achievement for maintaining large loot stacks on screen, encouraging efficient resource gathering.
Inspiration & Final Thoughts
This system would function similarly to how Minecraft stacks identical dropped items, but with a more dynamic approach, adjusting the stack value instead of creating excessive entities.
Would love to hear your thoughts and possible refinements on this!
Thanks!
