Giter Site home page Giter Site logo

tree-count-plugin's People

Contributors

grantapher avatar infinitay avatar

Watchers

 avatar

Forkers

grantapher

tree-count-plugin's Issues

Improper tracking during rising roots event

Since we rely on chopping animations, it'll count players as chopping a tree when they are chopping the roots. However, it'll increment the choppers count on the nearest tree instead which is incorrect behavior

Felling axes not counted

Loving this plugin to maximize the Forestry bonus I get, but it seems it does not currently track felling axes interacting with the trees. Any news on when this might get fixed?

Slight micro-stutters

As the title suggests, during the rising roots minigame you can tell there are slight microstutters if you look out for them. It happens when lots of players begin to change to the next glowing root. It's not unplayable and it doesn't make you freeze, but it will drop a few frames for <= 1 second.

IntelliJ Profiler reports that most of the processing occurs in the overlay

Pending Changes

New TreeGameObject

The profiler showed that there was a lot of time being spent by calling Tree#findForestryTree within the overlay. This was because we wanted to make sure the tree was able to have a hidden boost from group woodcutting, and if so then render it's overlay. However, it seems that the underlying #get call to the hashmap was resource intensive. Which I don't understand why because it's a map and even an ImmutableMap uses hashing. Additionally, the key is an integer so there's no deep comparison to be checked.

I then did what I initially wanted to do back when I was writing the plugin. I created an object that would have a reference to both the GameObject tree and the Tree tree (type of tree). That way I could just reference the Tree (type of tree) and fetch whether or not it is a forestry tree without any lookups. This seemed to have a big performance increase.

After a 30 second profiling with 2 samples, these are the results sometime before refactoring to use TreeGameObject
image
In this image it says 30% but I specifically remember a test right before this where it was 20%. This image is from a profiling that last contained the results for the plugin before the refactor.

After a 2 minute 15 second profiling with 1 sample, these are the results after refactoring to use TreeGameObject
image

Refactoring Tree to use HashMap instead of ImmutableMap

I read briefly that ImmutableMap could pose a slight performance decrease when compared to a HashMap. I tried to test it for myself and although game conditions are not 100% reproducible, I didn't seem to have similar results. In my case, ImmutableMap held better results. Again, because the conditions can't be reproduced, it could have been the case that during ImmutableMap's testing there was one or no rising root events, but during HashMap's testing there could have been two. It all depends, but nonetheless, I will share the results.

After a 10 minute profiling and 3 samples, these are the results for ImmutableMap:
image

After a 10 minute profiling and 4 samples, these are the results for HashMap:
image

Incorrect overlay when chopping nearby tree

Incorrect
image

Correct
image
In the image below, it's correct because the tree above is despawned
image
In the image below, it's correct because the player's orientation is more to the south and the south tree
image
image

Incorrect
image

Correct
image
image

Plan for tree despawn feature?

I was thinking of making a plugin which adds a despawn timer on the tree (eg: how long it has left before it falls). But the UI for your plugin and mine would probably be mutually exclusive since both are trying to overlay stuff on a tree. So I wanted to see if we could combine somehow. Since your plugin already has a decent user-base, it would probably make sense to expand yours than for me to try to duplicate your functionality and expand on it and then have to compete with you.

Would you be interested in the tree-count plugin both counting ticks until it falls and number of people chopping? We could probably justify both features under the same name. ๐Ÿ˜„

Ability to change color of text

Number can sometimes be hard to see especially on red colored trees like maples, I'd like it if we could change color of the number

Increment/Decrement Issues (Not related to animations)

There are logic issues that are causing incorrect in/decrements such as when walking back into range of the tree and the choppers. This causes unexpected behavior whenever either a chopper leaves the area and returns, logs in or out, or if the player themselves does any of the following.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.