Giter VIP home page Giter VIP logo

Comments (8)

MMaster avatar MMaster commented on August 13, 2024

Great effort although I'm not sure if making turrets super accurate is good for game play.

from spaceengineers.

sjsoft2015 avatar sjsoft2015 commented on August 13, 2024

MMaster, aim must be very precise. But various guns should have a different level of scatter and damage. Let's look at the lasers. They are very accurate, but it should do less damage (requires a lot of energy). Again beam plasma is flying for a while and if you do not change the trajectory of it is you will necessarily get (you need to dodge).
IMHO

from spaceengineers.

NivvyDaSkrl avatar NivvyDaSkrl commented on August 13, 2024

I tend to agree with sjsoft. My intent is to provide the best underlying algorithm for the purpose; actual accuracy on the game-play side can be tuned separately. But the methods in question are named along the lines of "GetPredictedTargetPosition()," not "GetApproximateTargetPosition()". I want to provide the best data possible; what the game actually does with it is up to those responsible for tuning game balance.

from spaceengineers.

zrisher avatar zrisher commented on August 13, 2024

I was disappointed to see this doesn't focus on decreasing turret CPU drag, but these are nice additions anyway. : ) Just please make sure the eventual solution doesn't slow them down even further, and if you could include some optimizations to turn them off when no one is near that would be superb.

The Autopilot mod has some features for better turret management, this might be a good reference for you:
https://github.com/Rynchodon/Autopilot/tree/master/TurretControl/Scripts

from spaceengineers.

NivvyDaSkrl avatar NivvyDaSkrl commented on August 13, 2024

For the accuracy algorithm, I removed some vector mathematics and put more in. It should balance out.

For the target selection algorithm, I add a few vector mathematics expressions whenever there's a meteor or missile in the target radius.

That said, the number of turrets required to realistically protect an area has been reduced. Immensely. The starter platform in Easy 1 is pretty well protected on Armageddon difficulty with only four gatling turrets. And the missile turret even hits a meteor every now and then. :3

from spaceengineers.

zrisher avatar zrisher commented on August 13, 2024

I'm sure the devs would appreciate performance profiles with your final PR, and I would be really curious to see them too. It's pretty simple with the built-in utility:

VRage.Profiler.MyProfiler profiler = new VRage.Profiler.MyProfiler(47, false);

profiler.Stopwatch.Start();
    for (int i = 0; i < 100000; i++) {
        ... some expensive logic from existing turret tracking ...
    }
profiler.Stopwatch.Stop();
log("Old method: " + profiler.Stopwatch.ElapsedMilliseconds + " ms.");

profiler.Stopwatch.Reset();

profiler.Stopwatch.Start();
    for (int i = 0; i < 100000; i++) {
        ... the analogous part of your logic ...
    }
profiler.Stopwatch.Stop();
log("New method: " + profiler.Stopwatch.ElapsedMilliseconds + " ms.");

from spaceengineers.

NivvyDaSkrl avatar NivvyDaSkrl commented on August 13, 2024

Hmm. I just made the pull request. The changes aren't extensive. I'll try to figure out the profiling stuff; not familiar with it.

from spaceengineers.

zrisher avatar zrisher commented on August 13, 2024

PR #65

from spaceengineers.

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.