101/102 pathing

101/102 pathing

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14603
Joined: 17 Nov 2005, 02:43

101/102 pathing

Post by Forboding Angel » 20 Mar 2016, 00:09

It is really, really, really bad. I'm not sure what is going on with it, but units now have this little wiggle thing they do that is not at all attractive and it really screws with aiming.

Example videos:
https://youtu.be/5-JF8vWtWLM
https://youtu.be/JB1X6HcTZwg

These weren't specifically made the show the pathing issues, but they do a decent job of highlighting what is wrong.

It's pretty easy to say that evo has the most pathing friendly unis of any game in spring. Pretty much instant turnrates and acceleration and nice speed. In 96 pathing was sometimes screwy, but it was 99.8% just fine. In 102, it's quite bad and noticeable.
0 x

User avatar
jamerlan
Balanced Annihilation Developer
Posts: 683
Joined: 20 Oct 2009, 13:04

Re: 101/102 pathing

Post by jamerlan » 20 Mar 2016, 03:59

Nice videos!
Probably it's better to change visibility to "unlisted" because your players can watch them and it can be scary for them ;-)
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14603
Joined: 17 Nov 2005, 02:43

Re: 101/102 pathing

Post by Forboding Angel » 20 Mar 2016, 05:51

My channel is for me. You're thinking of the evo channel which is located at http://www.youtube.com/evolutionrtsgame
0 x

Kloot
Spring Developer
Posts: 1865
Joined: 08 Oct 2006, 16:58

Re: 101/102 pathing

Post by Kloot » 20 Mar 2016, 14:12

Code: Select all

if (gadgetHandler:IsSyncedCode()) then
  function gadget:UnitCreated(unitID, unitDefID, _, _)
    local ud = UnitDefs[unitDefID]
    local md = ud.moveDef
    if (md.id ~= nil) then -- all non-flying units
      Spring.MoveCtrl.SetGroundMoveTypeData(unitID, "turnAccel", ud.turnRate)
    end
  end
end
Last edited by Kloot on 19 Oct 2018, 20:28, edited 2 times in total.
0 x

Google_Frog
Moderator
Posts: 2440
Joined: 12 Oct 2007, 09:24

Re: 101/102 pathing

Post by Google_Frog » 20 Mar 2016, 14:35

Isn't that a very high setting for turnAccel? Intuitively high acceleration would make it easier to follow a path, not harder.
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14603
Joined: 17 Nov 2005, 02:43

Re: 101/102 pathing

Post by Forboding Angel » 21 Mar 2016, 04:06

That fixes it pretty much perfectly. On super fast units the wiggle just a tiny bit but tbh it' not enough to really notice and certainly not enough to complain about.

I was really concerned about this. Thank you Kloot, you took a load off my mind.

Could you explain to me why I works though? I looked up the pretty sparse docu on it, but I still can't understand why it works.

Code: Select all

SetGroundMoveTypeData(unitID, "maxWantedSpeed", v)
What is "v"? Velocity? is the 2nd argument calculated vs the 3rd or something? I don't know how this works, so I just want to have a general idea of what it does so that later on when I'm looking at that little block of code I'm not trying to figure out why it is there.
0 x

Post Reply

Return to “Engine”