Jump to content
  • Advertisement
Sign in to follow this  
Acharis

Degenerated combat :)

This topic is 1209 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Heh, I just made a combat, hundreds ships vs hundreds ships, each ship fire at another, completelly random (as long as the target has any HP), enemy ship. It's super degenerated, the side with significantly more ships *always* win with basicly *no* loses. I was shocked by the outcome.

 

The thing is, when you fire at random the stronger side will eventually kill all enemy ships, while the weaker side will have their fire spread so they damage most/all of the other side ships but with basicly not a single kills (each ship require a few hits to be killed). When I had a stack system with overwhelming forces you still obliterated the enemy but you suffered loses as well.

 

 

This made me quite appreciate the "fire until it's killed" approach.

Anyway, just a rant I felt like sharing, so if you have something to add post, I would like to rethink/discuss this whole thing (also, how it's solved in other games where you have auto tactical combat - like VGA Planets probably have it - never played it?)

 

 

Share this post


Link to post
Share on other sites
Advertisement

Do you have any component/systems damage modelled, or is it a straight up hit points simulation?

Share this post


Link to post
Share on other sites

Vga Planets 3.x was 1 v 1 combat

 

Each ship went out and fought in an order.  Later friendly codes could be used to stack the order so it just wasn't by ship number.  Damage was based on beam or torpedo tech level and hull mass to determine how much damage was done.

 

If your ship was in 100% condition you started with fully charged weapons, if not you had to charge them.  You would also lose weapons, something like max weapons being 10 and would lose one for every 10% damage taken before going into battle.

 

It was pretty well thought out system.  Which made ships fight till they won or got destroyed sequentially.

 

-

 

When you do random firing with no weapons charge the larger number of ships should always win without many losses if any. 

 

Easier way to deal with it would be add charging and weapons loss if the ship takes damage.  Perhaps (max weapons * current structural integrity %) so if a ship has 50% damage and a maximum of 10 weapons, then next time it fired it could only use 5 weapons.  That might get you a bit more variance. 

 

A specific charging time of 1 tick per damage would make heavier guns fire more slowly.  Damage 50 takes 50 ticks to recharge, damage 100 takes 100, etc.  Not sure how much detail you want to go into.

 

Those numbers can easily be adjust with tech types and levels if necessary.

 

This would lead to a better balance.  You should still expect a significantly larger force to eliminate the enemy without much loss if any.

Share this post


Link to post
Share on other sites

Yup, stack leaves you with only one damaged ship in the end, randomized leaves you with mostly scratched ships for the superior side.

 

For more realistic looking distributions, two solutions jump to mind. The first is to have a list of N currently targetted ships, which you select from randomly per attack. This very roughly simulates a tactic of 'fire until its killed' spread across a large battlefield. You'll have very roughly N damaged ships on the winning side at the end.

 

The other is to do a weighted random selection, where damaged increases the probability a ship is selected. This gives you a gread deal of control for how the distribution of damage should appear, and by tweaking the weighting algorithm you can achieve the distribution between damage, healthy and destroyed you want.

Share this post


Link to post
Share on other sites

I'd use percentages to weight things.
 
Here's an arbitrary starting point:
10% random target
20% the target the previous ship attacked
70% the last target this ship attacked
 

Target target = GetRandomAliveEnemy();
float rand = rand(0.0, 1.0);
if(rand < 0.20f)
{
     if(lastTargetOfAnyAlly != AlreadyDead)
     {    target = allyTarget;    }
}
else if(rand < 0.90f) //20.0 + 70.0
{
     if(myLastTarget != AlreadyDead)
     {    target = myLastTarget;    }
}
 
myLastTarget = target;
lastTargetOfAnyAlly = target;
 
Attack(target).With(FLASHY_BOMBS_AND_LASERS);

 
Add in random amounts of damage (0.75 to 1.25 of your normal damage), misses, criticals (exploding the ship dramatically), and random double-attacks, and you potentially might get a more interesting fight.
 
And, if needed, you can make your "random" less actually random, for increased enjoyment.

Edited by Servant of the Lord

Share this post


Link to post
Share on other sites

I'd also just consider stepping back, and abstracting the entire battle away.  Each side has the number of ships of each type tallied up (battleship, fighter, cruiser, carrier, destroyer), and the guns for each type tallied up (anti battleship, anti-cruiser, anti fighter), maybe add another multiplier for tech level of a given ship/weapon, then use those numbers to come up with a percentage chance of different outcomes (Total Victory, Decisive Victory, Minor victory, tie, minor loss, decisive loss, Total loss), with the outcome determining casualties for each side.  The total loss/win scenario should be fairly rare unless there is a pretty big imbalance between the sides.

Edited by ferrous

Share this post


Link to post
Share on other sites

Another possible factor to include would be fleetsize adjustments.  Large fleets can be unwildy/hard to coordinate thus lower effectiveness of fire (variously abstracted).  They can also (depending on your game mechanics) not be dense enough spatially for a large fleet to have targets within range for all the ships to fire simultaneously (when the smaller fleet could have more).

 

At various stepped sizes fleet firing inefficiency can go way up (maybe just as a counter to players simply lumping huge fleets as a simplistic strategy)

 

Different terrain factors might also effect fighting capabilities  (larger ships maneuver with greater difficulty vs smaller ships)   So fleet mix vs terrain  type adjustments to prevent simple overwhelming via numbers

 

 

Share this post


Link to post
Share on other sites

The fleets should also have a combat strategy set for them and not just blindly fight to death of the last ship.

If one side sees it would most likely loose it should try to disengage and run, to at least preserve as many ships as it possibly can.

Maybe let it choose to sacrifice a few ships to distract the enemy to make it more likely its other ships get away.

Maybe spice it up with allowing to set strategies for letting each ship type or groups that can be formed preferably attack ships vulnerable to their weapons or easily killed targets first or biggest threats first or ...

Edited by wintertime

Share this post


Link to post
Share on other sites

Do you have any component/systems damage modelled, or is it a straight up hit points simulation?

Simple hit & damage.

 


The other is to do a weighted random selection, where damaged increases the probability a ship is selected.
Did it, no noticeable difference. Althrough I did it a primitive way (70% to skip to another target if the current one is not damaged).

 

 

I'd also just consider stepping back, and abstracting the entire battle away.  Each side has the number of ships of each type tallied up (battleship, fighter, cruiser, carrier, destroyer), and the guns for each type tallied up (anti battleship, anti-cruiser, anti fighter), maybe add another multiplier for tech level of a given ship/weapon, then use those numbers to come up with a percentage chance of different outcomes (Total Victory, Decisive Victory, Minor victory, tie, minor loss, decisive loss, Total loss), with the outcome determining casualties for each side.  The total loss/win scenario should be fairly rare unless there is a pretty big imbalance between the sides.

Yeah, I'm thinking about it too (that's how it worked before I decided to go fancy and simulate every single ship). Definitely the old "stacks fire at each other and kill X enemy ships" worked quite fine.

 

 

Another possible factor to include would be fleetsize adjustments.  Large fleets can be unwildy/hard to coordinate thus lower effectiveness of fire (variously abstracted).  They can also (depending on your game mechanics) not be dense enough spatially for a large fleet to have targets within range for all the ships to fire simultaneously (when the smaller fleet could have more).

 

At various stepped sizes fleet firing inefficiency can go way up (maybe just as a counter to players simply lumping huge fleets as a simplistic strategy)

 

Different terrain factors might also effect fighting capabilities  (larger ships maneuver with greater difficulty vs smaller ships)   So fleet mix vs terrain  type adjustments to prevent simple overwhelming via numbers

Yes... Even if not for this, I will need some sort of mechanic to punish for having "too many" ships. Inefficieny in targetting, coordination, maneuvering, friendly fire, etc are quite logical here. Ideas how exactly these could work?

Share this post


Link to post
Share on other sites


wodinoneeye, on 25 Jul 2015 - 03:25 AM, said:

Another possible factor to include would be fleetsize adjustments. Large fleets can be unwildy/hard to coordinate thus lower effectiveness of fire (variously abstracted). They can also (depending on your game mechanics) not be dense enough spatially for a large fleet to have targets within range for all the ships to fire simultaneously (when the smaller fleet could have more).



At various stepped sizes fleet firing inefficiency can go way up (maybe just as a counter to players simply lumping huge fleets as a simplistic strategy)



Different terrain factors might also effect fighting capabilities (larger ships maneuver with greater difficulty vs smaller ships) So fleet mix vs terrain type adjustments to prevent simple overwhelming via numbers

Yes... Even if not for this, I will need some sort of mechanic to punish for having "too many" ships. Inefficieny in targetting, coordination, maneuvering, friendly fire, etc are quite logical here. Ideas how exactly these could work?

 

Not sure how big your fleets get, but...

 

Have you ever considered limiting the battlefield to say 100 vs 100?  So if you have a stack of 500 ships vs 3000 ships, you put 100 from each side into the battle and play it out, when one side loses x% of their ships say 50% you refill the battlefield stacks and repeat until they are out of ships and one side has won the battle.

 

The 3000 ships will still win but fighting several smaller battles will mean they will lose more than just a few ships.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!