Author Topic: Unit rotation speed and idle unit circling  (Read 2047 times)

ZaggyDad

  • Guest
Unit rotation speed and idle unit circling
« on: 21 August 2010, 17:02:28 »
Limiting the speed at which a unit could turn around would make units in the air, and perhaps some on the ground, a little more realistic. If the limitation is implemented, it should have a setting to tell whether the unit should be moving at the moving skill's speed during the turn, or if it should just turn slowly on the spot (i.e. if the unit were a tank).

It would also be nice to be able to force a unit to have to keep moving no matter what it's doing at the time (though this might cause some issues with harvesting and healing...but I suppose that the unit could circle within range of the target of its current command, or something), somehow forcing it to circle (or, perhaps, the path could be programmed with something like Logo) around the point it is idling.

~Zaggy1024
« Last Edit: 21 August 2010, 17:09:08 by Zaggy1024 »

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Unit rotation speed and idle unit circling
« Reply #1 on: 22 August 2010, 03:02:52 »
This could be quite tricky, a rotate speed parameter could probably be introduced without too much pain, and forcing units to move to turn could possibly be done, but then it becomes possible to get units irretrievably stuck :(

As to enforcing units keep moving, not really possible... what do you/they do when they can't move because they are blocked?
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Mark

  • Guest
Re: Unit rotation speed and idle unit circling
« Reply #2 on: 23 August 2010, 03:00:30 »
Having units get stuck could be good, though, because if you have a block of ranged units and your enemy sends some troops to attack your back, you wouldn't want them all to be able to turn and reform to check the assault-they should die because of your own bad tactics.

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Unit rotation speed and idle unit circling
« Reply #3 on: 23 August 2010, 04:22:00 »
Having units get stuck could be good, though, because if you have a block of ranged units and your enemy sends some troops to attack your back, you wouldn't want them all to be able to turn and reform to check the assault-they should die because of your own bad tactics.
Having to worry constantly if the pathfinder is going to get your tank stunk in a crevice just sounds tedious and awful... and how many of us would chuck our computers out the window in frustration as a result? :P

Besides, what vehicle doesn't have a reverse?  If you get a car stuck somewhere, it's usually because you're driving in sugar sand or a mud bog, not because you pulled in at a weird angle from which you couldn't back out.

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: Unit rotation speed and idle unit circling
« Reply #4 on: 23 August 2010, 14:12:25 »
Besides, what vehicle doesn't have a reverse? 

https://www.youtube.com/watch?v=dJfSS0ZXYdo#t=5m49s

Sorry for the spam but I couldn't resist :O

I agree with Silnarm and John, adding some intentionally bad pathfinding isn't a good idea.
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

Mark

  • Guest
Re: Unit rotation speed and idle unit circling
« Reply #5 on: 24 August 2010, 02:15:21 »
Probably right.  I suppose a unit could move backward.  The pathfinder shouldn't make units get stuck.

ZaggyDad

  • Guest
Re: Unit rotation speed and idle unit circling
« Reply #6 on: 24 August 2010, 22:41:34 »
Hadn't thought of that issue. Though it may not be preferable, perhaps it could kill the unit if it is stopped by an object in its way. Although, I suppose, since it would be hard to make the pathfinder to find a route that wouldn't cause it to crash, perhaps this could wait till 0.3.0. Although it would still be useful for units like tanks to be able to have a limit to the turning speed while in one spot.

Mark

  • Guest
Re: Unit rotation speed and idle unit circling
« Reply #7 on: 25 August 2010, 00:16:24 »
Although it would still be useful for units like tanks to be able to have a limit to the turning speed while in one spot.
Actually, though it isn't done yet, there is a topic about turrets, and since a tank has a turret on top, it could just move the turret with that implemented.  That is, if GAE and Megaglest were somehow merged, which I am told is not going to happen, right?  (Though I do think tanks have blind spots of like 60 degrees in the back.)

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Unit rotation speed and idle unit circling
« Reply #8 on: 25 August 2010, 01:03:13 »
If somebody wanted to see how both things are done (turn radius as well as turrets), they could perhaps take a look at the code from the FOSS RTS Warzone 2100.  It's basically all about tanks.  I have no idea how (dis)similar their engine is to ours, though. :look:

ZaggyDad

  • Guest
Re: Unit rotation speed and idle unit circling
« Reply #9 on: 25 August 2010, 17:04:41 »
Actually, though it isn't done yet, there is a topic about turrets, and since a tank has a turret on top, it could just move the turret with that implemented.  That is, if GAE and Megaglest were somehow merged, which I am told is not going to happen, right?  (Though I do think tanks have blind spots of like 60 degrees in the back.)

I'm not talking about limiting rotation speed when attacking only, I'm talking about when it either starts moving, is going around a corner or attacking.

~Zaggy1024

Mark

  • Guest
Re: Unit rotation speed and idle unit circling
« Reply #10 on: 26 August 2010, 00:21:29 »
Yeah.  I guess I assumed the most profound implication of this would be during a battle, but it definitely could have other implications.

wyvern

  • Guest
Re: Unit rotation speed and idle unit circling
« Reply #11 on: 26 August 2010, 11:55:01 »
Although it would still be useful for units like tanks to be able to have a limit to the turning speed while in one spot.
Actually, though it isn't done yet, there is a topic about turrets, and since a tank has a turret on top, it could just move the turret with that implemented.  That is, if GAE and Megaglest were somehow merged, which I am told is not going to happen, right?  (Though I do think tanks have blind spots of like 60 degrees in the back.)
Tanks in modern time usually have a 360 turning turret, otherwise, its usually called an self propelled gun, however it would be nice to have separate turrets with limited degree for the WW1 mod, then the british tanks could cover their 90 degrees with each of their guns, since they usually had two in the front of the sponsons and two in the back of the sponsons.