|
From: Nathan C. <n_...@ho...> - 2006-11-26 22:09:46
|
No need to be so apologetic. =3D) Angular movement is still wonky. I'll have another go at that tonight = sometime. There were two major problems in the linear versions that I = think also could have translated to the angular versions, since I = translated the derivation straight across. The distance p was supposed = to be the distance from the current position to the midpoint, which I = treated wrongly at first, and the lack of the special case examining = velocity when the position was between p and the goal produced some = erroneous behavior. I tried to use the same logic for the fixes applied = to the linear code in the angular code but it didn't seem to work as = expected before my last commit. One optimization I can think of off the top of my head is to = pre-calculate acceleration available in every direction, updated when = engines are added, removed, or stop working for whatever reason. One thing I will need is a way to thrust at less than 100% of engine = power in a given direction. This is necessary to use during the timestep = when p is less than a full thrust away. I was going to write it but if = you want to go ahead. Something that takes a simple 0-1 percentage = should do the trick. Do you want to work on higher-level nav behavior? For instance, when a = ship enters the MIN_DIST from its target it shouldn't stop decelerating = if it wants to actually stop at that target, and we need a way to switch = off from NAV_GOTO to NAV_STAY when the ship is comfortable with its = position. Another thing is that if a ship is traversing several points = it may not want to slow down and try to stop at each point. It may want = to slow down somewhat according to a provided constant, or depending on = where it thinks its next goal point is relative to the current point. = There's definitely a lot of work to do at that level in tickAI and navXX = functions. ----- Original Message -----=20 From: TIMOTHY K HAMILTON=20 To: eig...@li...=20 Sent: Sunday, November 26, 2006 9:39 AM Subject: [Eighthfleet-development] Algorithm Apologies and Thoughts Alright, so it would seem that my contribution to navigation = algorithms is to break them, sorry about that. =20 Your method for lineral acceleration is very obviously superior to = mine, the movement once it reaches the target point is much smoother and = oscilates less. Angular movement still acts a little funny though, as = it doesn't start decelerating until it's completely passed the target = angle, instead of approx. halfway there. I'm not going to touch that, = however. What I will do is try to optimize things a little better. I'll keep = my hands out of the angular velocity code, but I think I can streamline = the linear velocity stuff. One way I think to keep from doing a lot of = re-calculating is just to pre-calculate as much of the information as = possible during initialization of the ship. One of the most obvious = values for this, I think, are the various availableThrusts, which only = need to be re-computed whenever an engine is added or destroyed. =20 Again, I'll be a lot more careful about touching navigation, and just = focus on what I promised about tactical behavior instead. =20 Sorry I broke your code. -Tim -------------------------------------------------------------------------= ----- = -------------------------------------------------------------------------= Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to = share your opinions on IT & business topics through brief surveys - and earn cash = http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV -------------------------------------------------------------------------= ----- _______________________________________________ Eighthfleet-development mailing list Eig...@li... https://lists.sourceforge.net/lists/listinfo/eighthfleet-development |