PDA

View Full Version : Time delay on attacks



Mickey
08-19-2005, 03:22 AM
I'm trying to work out the logic on time-delays for attacks ("it takes 3.2 hours to get there") and I've hit a few stumbling blocks.

Here is the general logic the server will use when an "attack" command is issued:

- Make sure the attack is valid (you have enough troops, an enemy is in that city, etc).
- Calculate the time to get there.
- Note the current occupant of the city
- Start traveling
- At each update, check the status of the city and make sure the same occupant is still there.
- If the occupant is different (someone else took over the city), DO WHAT? Still attack? Turn around? We can't give this option to the user, as they might be away from their PC now.
- Upon arrival, check the status again. If that army is still in there, attack! If you are now the owner (a prior army took it over), then move in. If someone else has taken it over, DO WHAT? Attack or turn around?

I think I have the basic idea figured out, but I need for this to automatically handle things once you issue the attack command. Calculating the progress of the journey will take some work, but really shouldn't be a huge deal.

The big question - what happens if the city changes hands while your army is en-route?

araT
08-19-2005, 03:34 AM
I think it would probably be a waste of time and a confusion to the armies owner if they just returned home, i say attack no matter who's in there! and if theres noone there, invade!.. if its been nuked however, how do we deal with that? do they wait on the perimiter till the "radiation" has subsided - could be an unfair advantage there.. or many armies queing up & "waiting" so that theres all out war as the city is released again.. hmmm *ponders further*

T.

Mickey
08-19-2005, 03:47 AM
My initial thought was that if it has been nuked that I would send them home. However, that would possibly lead to a lot of people trying to estimate how long it will take their armies to get there at the right time, and then having mass chaos right after it became available again. Hmm.



*ponders further*
Please do. :)

freakybarry
08-19-2005, 08:12 AM
i'd say the army should still attack

but it would be very usefull for the armies to have a 'loss-retreat' point
e.g. if lost 50% of troops in fight then retreat to base.
or if army = ally then support/return to base

as for the nuke situation, i say send them back.
if people can work out the time lapse for clear ivade, good for them.
they'll have to deal with the possibility of arriving to find an army there - no difference to the original situation anyways.

Beezer
08-19-2005, 02:05 PM
I say don't turn them around. The attacker's intent was to take the city by force. It shouldn't matter who is in the city. There may be times where the army they attack is bigger than they expected (due to the city changing owners), but that's just how the game works. I would agree that once the ability to form alliances is put into the game, you could have the troops turn around and not attack an ally. But for now, if they were sent to attack, they should attack.

As far as the nuke option, if the city has been nuked, send them back. If someone can figure out the timing to arrive at the exact moment the city is contamination free, then more power to them. You could always have the attacking army proceed regardless and then lose 50-75% of the troops once they arrive and are killed by radiation poisoning. That would add a bit more risk to the game.

As the game develops, you could also allow users to purchase vehicles like planes, trucks, boats, etc. Then, depending on what type of transportation you use that would shorten or lengthen the amount of travel time it took for your troops to arrive. It could also be set to determine how many troops you could carry. Want to arrive fast in a plane?? You can only take 500 troops. Want to take your time getting there on a boat?? You can take 2000 troops.

Just a thought!

birq
08-19-2005, 02:07 PM
say don't turn them around. The attacker's intent was to take the city by force.

Why not just give the player the option? On the "Attack" page, just put a checkbox -- if it's checked, attack no matter who owns the city when you get there, if it's not, start heading home if the city changes hands.

rasqual
08-19-2005, 04:20 PM
My initial thought was that if it has been nuked that I would send them home. However, that would possibly lead to a lot of people trying to estimate how long it will take their armies to get there at the right time, and then having mass chaos right after it became available again. Hmm.



Hey, confusion is good. Out of chaos, order.

I look forward to the day when armies are converging on some location, and end up fighting entirely outside of cities. The pup tents move toward the cities, and someone moves half their troops in a feint to the North, while the remainder anticipate the . . .

You get the idea. When an actual battle plays out over time, players will be micromanaging the situation. Realistic.

Air forces will become coveted!

elk-tamer
08-20-2005, 04:56 PM
How about only allowing the "attack" command when an army is in range of a city?
Then we'd have to move armies to the point of attack, but we could also change paths on the way, choose a different target, etc.

rasqual
08-20-2005, 05:58 PM
Elf-tamer has the right idea, I think.

In reality, the order to "attack" is, as Mickey at first suggested above, an order to "start moving." The dilemma about what happens if a city changes while you're enroute is no dillemna at all if we just consider that armies are mobile. Let's say an army has to be "within striking distance" to formally "attack." What you have before that, then, is a transport order, and its execution. This order costs geos and takes time.

An army's position at any time should be just that -- it's position. So if you rescind the order to transport armies to somewhere, no big deal. They ARE somewhere, and you simply have to issue new orders for their transport.

So your armies are in your home base, then you order 'em somewhere. It doesn't need to be to "attack" -- in fact, I think that's a terrible flaw in the notion that it's an "attack" order that moves them. Why not "threaten with my presence?" That's "gunboat diplomacy," and it should definitely be part of the game!

Dude, you're looking at the Risk thing of having armies in proximity before attack -- "striking distance," let's say. Everntually, with different kind of elements in armies, there will be different kinds of "striking distances".

Armies are wherevere they are.

I think ownership of cities should expand beyond the boundaries of those cities. The number of troops/armies in a city should determine the radius of the domination (not the height of the extrusion -- this is about geographic reach, not just graphical represenation of information!). To attack, an opposing force needs to be within striking distance of that perimeter. That perimeter would be the extrusions in Earth, too.

Furthermore, armies would have to be recruited -- not purchased. Yes, it costs money to recruit them, but that's the metaphor. Armies are domestically raised, not hired as mercenaries from space. So you recruit troops from cities, and their willingness to enlist depends on how much money you invest in that city's economic well-being. Once you have recruits, they go to basic training at your home base (thus, home bases should probably be near cities). In fact, home base size would be a lot like cities -- the more armies you have, the more space it takes up.

Basic training would require the commitment of a number of seasoned troops proportionate to the number of recruits in training. You can't have 2000 recruits and no one to train them.

Recruits cost money to train, of course, just as seasoned veterans cost money to billet at the home base, cost money to deploy, cost money to send into battle, and cost money to occupy. How long do recruits train? I don't know -- but it sure can't be a case of "OK you're consctipted why because I want to attack Hong Kong so here we go into battle the moment I bought you off the street to fight yeeeeeeehaaaaaaw!" No, that won't work. You can't just conscript these folks, then drop 'em from space to attack. ;-)

I think this will be easier to code than it would seem if I offered more complex suggestions. Something like that. ;-)

Oh -- and if armies from different countries were approaching a city, they could end up fighting each other. And armies could do battle in open country -- no need to damage cities by conducting warfare only in the city. It's a pretty poor defender who doesn't go out to meet the foe when he has the strength to defeat him, but waits for the rogue to come into town and mess things up. ;-)

elk-tamer
08-20-2005, 10:48 PM
Mickey, are you planning to make the "travelling" entry on the army page a hyper-link to a GE placemark which shows the location and size of the army?

Likewise, it would be nice to see who is on the way to attack.

(Great work, BTW)

rasqual
08-20-2005, 10:52 PM
Agreed. Pup tents.

LOL

Hey Mickey, can we have a sort on the City column for the armies, too? It'd help if we want to see all the travelling ones together. And hey -- I have a feeling this will be getting more columns as time passes -- how about one for "time at location" which, for travelling armies, would be time in transit/slash/time remaining -- somethin' like that.

elk-tamer
08-20-2005, 10:59 PM
Ignore my last post; I just saw the pup tents.