Why can't Tanks go backwards? - Page 2

Why can't Tanks go backwards?

Requests for features in the spring code.

Moderator: Moderators

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Why can't Tanks go backwards?

Post by knorke »

perhaps units would only move backwards if the next waypoint is near their back? This way you can get stuck vehicles out from in between buildings but for longer distances they will drive normal.
edit: wops, I think thats what Tobi meant. well it seems c&c generals does it this way...
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Why can't Tanks go backwards?

Post by KDR_11k »

knorke wrote:perhaps units would only move backwards if the next waypoint is near their back? This way you can get stuck vehicles out from in between buildings but for longer distances they will drive normal.
edit: wops, I think thats what Tobi meant. well it seems c&c generals does it this way...
There's no distance limit with your approach, a tank that's facing south when ordered to the north edge of the map will always drive backwards and at every waypoint decide its back is closer to the next waypoint so it'll keep driving backwards.
Jasper1984
Posts: 196
Joined: 25 Jan 2008, 20:04

Re: Why can't Tanks go backwards?

Post by Jasper1984 »

What do you do in a car if you want to turn really fast?

Go backwards and stear right. Stop, go forwards and stear left. That is what i spoke before does.

I think what knorke is talking about is detecting if the next waypoint is close enough that it is not worth bothering to turn around. (Of course, if there are more waypoints after, being in the right direction/having speed at that point might be useful.)
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Why can't Tanks go backwards?

Post by knorke »

with "waypoint" i meant the ones set by the player with clicking or shift-clicking, not something calculated by the spring pathfinder. maybe "destination" is a better word?

Image
For long distance travels tanks would still turn on the spot and then drive off as they currently do.
For more complex reverse maneuvers you could click behind the unit so it keeps moving backwards and doesnt slow down to turn: for example you want to micro a unit out of danger or run down infantry (I think in S44 this works?)

If some slow-turning unit (battleships, large tanks etc) is to move only a few meters backward, reverse is faster than turning 180°. Of course if the unit is suppossed to move across half the map then it should turn: in that case the timeloss is not that important anyway.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Why can't Tanks go backwards?

Post by KDR_11k »

Of course for some units (like ships) reverse doesn't make any sense.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Why can't Tanks go backwards?

Post by lurker »

Yes it does? Spaceships no, but water ships maneuverable enough to turn nearly in place should also be able to point those screws backwards.
User avatar
Peet
Malcontent
Posts: 4383
Joined: 27 Feb 2006, 22:04

Re: Why can't Tanks go backwards?

Post by Peet »

Voith-Schneider propulsion! I've said it before and I'll say it again :P
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: Why can't Tanks go backwards?

Post by yuritch »

Most any kind of ship using screw propulsion can reverse. Even old XIX century steamers could do that. Voith-Schneider allows turns in place and generally good maneuverability, but it isn't required for simple reversing.
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Re: Why can't Tanks go backwards?

Post by Pressure Line »

even then, V-S cannot make a battleship turn in place. Its a maneuverability AID, not a magic wand.
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: Why can't Tanks go backwards?

Post by REVENGE »

Pressure Line wrote:even then, V-S cannot make a battleship turn in place. Its a maneuverability AID, not a magic wand.
Realism does not have a place in Spring. :twisted:
User avatar
momfreeek
Posts: 625
Joined: 29 Apr 2008, 16:50

Re: Why can't Tanks go backwards?

Post by momfreeek »

KDR_11k wrote:
momfreeek wrote:Shouldn't reverse be a seperate command? Leave it to the player to decide when he wants his troops to use reverse.
If it's completely manual you can just as well gadget it, either use COB to turn the visual unit 180° (while also turning the unit 180° so it looks the same but internally faces the other way) or use movectrl.
Surely it makes more sense to include manual reversing in the engine (its simple and unambiguous) and then gadgets/widgets can automate it (seeing as ideal behaviour is dependant on a lot of things).
Caradhras
Posts: 381
Joined: 31 Jul 2006, 21:49

Re: Why can't Tanks go backwards?

Post by Caradhras »

Is it possible like knorke proposed? How easy is the integration?

I think Panzers is a good example as well, even though the game is very different.

E: http://www.voithturbo.de/545950.htm :D
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Re: Why can't Tanks go backwards?

Post by rattle »

KDR_11k wrote:
momfreeek wrote:Shouldn't reverse be a seperate command? Leave it to the player to decide when he wants his troops to use reverse.
If it's completely manual you can just as well gadget it, either use COB to turn the visual unit 180° (while also turning the unit 180° so it looks the same but internally faces the other way) or use movectrl.
Didn't you have a unit in GINTA which walks backwards? I'm pretty sure your lolinfantry did.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Why can't Tanks go backwards?

Post by KDR_11k »

rattle wrote:
KDR_11k wrote:
momfreeek wrote:Shouldn't reverse be a seperate command? Leave it to the player to decide when he wants his troops to use reverse.
If it's completely manual you can just as well gadget it, either use COB to turn the visual unit 180° (while also turning the unit 180° so it looks the same but internally faces the other way) or use movectrl.
Didn't you have a unit in GINTA which walks backwards? I'm pretty sure your lolinfantry did.
That was just to get a 360° weapon arc without having exorcist-style torso turns.
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Re: Why can't Tanks go backwards?

Post by Pressure Line »

IOW it was a fancy animation script.
SpikedHelmet
MC: Legacy & Spring 1944 Developer
Posts: 1948
Joined: 21 Sep 2004, 08:25

Re: Why can't Tanks go backwards?

Post by SpikedHelmet »

I like knorke's idea of reversing only when moving small distances; longer distances will turn the tank around.

A combination would be similar to Supcom; if told to go backwards a wheeled unit will reverse in a circle then drive forwards.. err, like a normal car.

Speaking of which it DOESN'T make sense for wheeled vehicles to turn on the spot.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Why can't Tanks go backwards?

Post by jK »

btw lua has read access to the pathfinding waypoints (+heightmap +cob to start the move animation)
dinocool
Posts: 20
Joined: 18 Oct 2008, 10:28

Re: Why can't Tanks go backwards?

Post by dinocool »

here's an idea that would be fairly easy to implement.

if (time taken to turn) > (time taken to move to location backwards)
move backwards
else
turn, move forwards

this is a 4d algorithm that should be fairly easy

time taken to turn can be based off the respective variable

time taken to move is the speed x sum of pathfinding point length to the clicked spot(pathfinding points)

this method will ensure that the unit will get to the position as fast as possible

other things to take into calculation would be the desired angle the unit will rest in

EDIT: also on another point, an inbuilt arc limit for units such as kbots should be built in where they change animations to say, a side walk animation
Post Reply

Return to “Feature Requests”