guns, ships and space combat :)

Started by
26 comments, last by ferrous 8 years, 9 months ago

There are 5 types of ships: escort ships (corvette, frigate, destroyer) and capital ships (cruiser, battleship).

Each ship has guns: main guns (ex: 4x120mm), secondary guns (ex: 8x60mm) and PointDefence (ex: 12xPD) used for fighting tiny fighters and incoming missiles only. There is also armour (not necessarily one value) and shields.

How to make combat (hit/damage/etc calculations)?

I was thinking along the lines of "big ships are quite resistant/immune to small weapons" and "big weapons do not necessarily deal drasticly more damage - using too big a weapon against a poorly armoured target being the waste of firepower".

Stellar Monarch (4X, turn based, released): GDN forum topic - Twitter - Facebook - YouTube

Advertisement

A small ship carrying a neutron-quantum-collider bomb would easily rip the shields and armor of a large ship. That bomb would be considered a small weapon.

But I would assign a property to the weapon and give it a numerical range. But it wouldn't be small, medium, large.

Though I'm sure some other game has figured this out, it's a really good question.

Beginner in Game Development?  Read here. And read here.

 

Assume it's a laser and the only difference is the caliber :)

Stellar Monarch (4X, turn based, released): GDN forum topic - Twitter - Facebook - YouTube

I would assume caliber, distance, environment*, and frequency would be numbers to at then.

*For instance, shooting a laser in open space is different than shooting it in a gas cloud or magnetic field.

Beginner in Game Development?  Read here. And read here.

 

You have 4 lasers 120mm each and 8 lasers 60mm each, no special cases, no special rules, no special environment :) Just a standard space combat.

Stellar Monarch (4X, turn based, released): GDN forum topic - Twitter - Facebook - YouTube

Real time or turn based? I'm assuming turn-based based on previous posts. If you want to spread it out into to-hit and damage calculations as separate:

Factors you can use for 'to-hit':

Target Ship movement / Target Ship's 'piloting/evasion/dodging' skill / Target Ship's defensive equipment (Displacer fields, ECM, cloaking, etc) / Target Ship size

Atttacker Ship movement / Attacker 'gunnery' skill / Attacker offensive equipment (Targeting computer, ECCM, Precognition device)

Weapon type or weapon accuracy / weapon mount (fast turret, slow turret)

Range

Cover? -- in space? Not sure what your battlefields are going to look like, maybe asteroids should make it hard to hit, does an intervening ship count?

Anyway, I'd probably start it at some base chance to hit, maybe even 100% chance to hit normally, then adjust for all the factors, either in one giant multiplication, or perhaps spread it out, either:

baseChance * attackerSkill * factorX * factorY * factorZ etc...

or maybe

baseChance + baseAttackerModification * (all attacker modifications) + baseDefenderModifications * (all defender modifications)

For the latter equation, you could go with a 50% base chance, and the base attacker / defender mods could be 25% each (or you could go with numbers that don't add up to 100%, if you're fine with 125% chances to hit under some circumstances)

Damage

One alternative is to go with somewhat simulation based damage system. For your laser example, you could give each laser a penetration value,and each ship an armor value and an internal structure value. Say your laser penetrates 155mm of armor, and hits a ship with 100mm of armor, you could then say it penetrated by 55mm of armor, and the internal structure value of the ship is 0.001, so for every mm of armor, the laser travels an additional meter through the internal structure of the ship. From there you can either figure out the components that were hit, or you can calculate the area of the parallelogram / square generated by the laser, and turn that into hit points, etc. Note that for this example and lasers, overpenetration doesn't matter. (Which I think is fine for lasers)

The nice part about that, is say you have an armor piercing explosive shell or a missile, you could have it set to explode only after its penetration is reduced to 0. The explosion could then generate several rays with their own much smaller penetration values. If it explodes after passing all the way through, or before reaching internals, the explosion won't do much, however if it explodes while inside the ship, the rays should travel much farther and hit more components.

You may want to move the 'internal structure value' to the weapon itself, in case you want a weapon that's really good at punching through armor, but won't do huge internal damage. (or average between the weapon and the ship)

EDIT: An alternative to percentages to hit is to go the semi-sim route and just give accuracy cones to all weapons. The nice part about that is that any cover or friendly fire issues are handled within the system. The downside is that fighters might get screwed by this system.

If large ships cost more then you would want them to be worth it, a large ships has more armour and shields so it makes sense that small lasers will do less damage.
Instead of decreasing the firepower of the large lasers you can make it harder to hit small ships, if the a player then uses a large ship to attack a small one, there is more chance that the hit will miss and be wasted.
Like killing a airborne fly with with a 50 cal sniper.
It feels like the simplest way to do this.

You have 4 lasers 120mm each and 8 lasers 60mm each, no special cases, no special rules, no special environment smile.png Just a standard space combat.

I would give each caliber a ranged rating. And give shields and sections of armor their rating as well. Then it's simple armor -= caliber and shield -= caliber.

Beginner in Game Development?  Read here. And read here.

 

What are your escort ships 'escorting' against. Originally the various ship classes had additional reasons :

Cruisers could cruise long distances, cheaper but counter anything upto their own size. Patrolling against interference of the merchant marine (commercial grade ships)

The various smaller ships also can act like scouts (speed and maneuverbility to scout move and to avoid anything bigger than themselves) Though the smaller would lack range and be more localized.

Small ships are sufficiently armed to counter brigandage in local areas.

In main battle, small ships could carry weapons that could sink/cripple the biggest ships (torpedos and mines - torpedo boats, submarines --- and later airplanes) and intermediary ships were designed (torpedo boat DESTROYERS) to match speed and outgun those (and create a protective area around the capital ships ... doing escorting)

Capital ships take on capital ships in a slugging match (or shore bombardment, though for landing support numerous smaller rapid fire guns turned out better for much of that). Cruisers and smaller ships scouting for the capital ships. Before their final incarnation capital ships were much slower than most other classes.

Command and control was often from a cruise ship becaue of its ability to avoid combat and regionally move into place faster.

Of course there are all the support ships.

When planes came in and made gun platform capital ships largely obsolete, carriers came to exist as the new 'center' of the fleet. their planes could project destructive power much greater than gun range.

-----

So if you are simplifying your game mechanics (like no torpedoes or planes - just gunnery), you may not need some of those intermediary ship classes UNLESS they have a different useful role.

Frigates were mainly smaller cruisers, and armed commercial ships were usually sufficient of themselves or in a fleet convoy or escorted by 'cruisers' - or if really big convoy by capital ships (ships of the line).

Local patrol ships for anti-brigandage, with serious pirates countered with cruisers.

--------------------------------------------[size="1"]Ratings are Opinion, not Fact


"big weapons do not necessarily deal drasticly more damage - using too big a weapon against a poorly armoured target being the waste of firepower"

One typically factors accuracy into this.

Even if large and small weapons are both lasers (i.e. beam weapons with instantaneous travel time), and thus the beam itself is equally accurate, the larger weapon is presumably bulkier/heavier, and hence the turret it is mounted on takes longer to turn, thus tracking fast-moving targets less accurately.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

This topic is closed to new replies.

Advertisement