Code Monkey home page Code Monkey logo

Comments (2)

smilz0 avatar smilz0 commented on August 26, 2024

Thank you. I didn't know about the -1 interval. I will surely use it straight away as it makes more sense than my arbitrary 0.01 lol.
As of the performance improvements i need some time to test it but i'm sure it will work.
Btw i was thinking of implementing something similar to what you did but inside a dedicated think function of a dummy entity. Maybe doing it like i do in the bots main think function by splitting the work into several sub functions.
For example FuncI = 1 would refresh the common infected, FuncI = 2 to refresh the weapons, FuncI = 3 for the cleaning and so on.
Also, probably we can improve it even more by finding the weapon id ( Left4Utils.GetWeaponId(ent) ) directly in this weapons refresh function so to remove it from the bots think func. And maybe we could also check the distance between the common/weapon and the bots and only add them to the lists if whithin a certain range. Though i'm not sure it would make sense for the commons considering that the director already spawns them near the survivors.
Anyway i will try to come up with something and i will post it here so we can try to improve it together.

from left4bots.

4512369781 avatar 4512369781 commented on August 26, 2024

Initially, I used "logic_timer" instead of "thinkfunc" for looping, but the “OnTimer” output of "logic_timer" is based on I/O events, which will cause time inconsistency. I tested it for a while and was still not satisfied. Only a few days ago I found more detailed information on the TF2 wiki, and this problem was solved.

About check distance, I guess that would be possible for weapons bucause they don't move.
But the infected are always moving, and the distance still needs to be checked again when the bot needs to deal with them. And they get killed frequently, need updates list often, and the number of infected isn't too many, so I think it's better to let bot deal with them.

Now that the bots can think faster, I think it's time to complete the aiming function, when I finish it I'll open a new issue.

from left4bots.

Related Issues (20)

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.