Space Battles with Shields (Star Trek like)
spellcaster

Since I was to play Star Trek: 25th anniversery, I played EGA Trek instead, which is my the 2nd best classic trek game for the PC, IMO.

Anyway, EGA Trek is basically a spiced up version of the many "trek" games available. You have your a grid of 8x8 quadrants. Each quadrant contains 8x8 sectors. Each sector contains either a ship, a star base or a star.
The goal is to kill all Klingons and survive.

The game features three types of energy:
1) Main Energy (used for phasers and warp)
2) Impulse Energy - used to move inside a quadrant
3) Shields - used to deflect energy blasts

And while playing the game, I started to think about the correlation between shields, hits and damage.

In the series, the enterprise could be hit by some blasts, which wouldn't do much besides draining some energy from the shields.
Stronger blasts did damage and drained more energy from the shields.

So, I was wondering how one could simulate this. My best idea was to say that a shield will block all attacks up to a certain percent of the current shield energy.
To make the discussion simple, let's say it'll block all attack with less energy than 50% of the current energy.

If we have 500 units of energy in the shields, a hit with up to 250 units of energy will not cause damage to the ship, but simply drain this energy from the shields.

If something stronger hits the shields, the shields will at first block a part of the attack. The remaining energy will be split upon damage and shields, but the energy drain from the shields is increased.

Example:

 Shield Energy: 500
 Attack: 300
 Shield overload modifier: 1.25.

 Amount of energy the shield can block totally: 50% of 500 = 250
 Remaining energy: 50
 Energy split between shields and damage: 25/25
 Energy drained from shields: 250 + 25*1.25 = 287.5
 Damage: 25

 New shield level: 500 - 287 = 212.5

Then I thought that this looks strange, since the shield drain to hit ratio never felt like 1:1 in the series. As long as the shields were holding, everything was fine, and they could take quite some hits.

So, I added a shield drain modifier.

 Shield Energy: 500
 Attack: 300
 shield drain modifier: 0.5
 Shield overload modifier: 1.25.

 Amount of energy the shield can block totally: 50% of 500 = 250
 Energy blocked: 250
 Energy drained: 250 * 0.5 = 125
 Remaining attack energy: 50 
 Energy split between shields and damage: 25/25
 Energy drained from shields: 125 + 25*1.25 = 137.5
 Damage: 25

 New shield level: 500 - 137.5 = 362.5

This feels better. Esp. if one also plays with the "efficiency factor", also the amount of energy the shields can block totally or if the main reactor can provide some energy each round to refill the shields.

Let's say the main reactor can provide 5% of the maximum energy each round to the 3 energy systems, we can a behavior that seems more or less ok.
Several hits in a small time frame will cause more damage than the same number of hits, with the same power distributed over a larer time period - which seems to be the way it works in the series.

That way one can also transfer "more power to the shields" without giving the energy a "battery feel".

Ok, why am I posting this?
Mainly because I never thought about possible ways to implement shields, and I'd like to hear other ideas on how one could handle it, comments on my ideas, etc.

Michael Jensen

It appears that you've put more thought into how shields should work than did the game designers for the existing commercial star trek games.

Planning on writing an EGA-Trek clone? Or just having fun?

spellcaster

Justt wondering. While writing the above, it occured to me, that it would allow you to some nice things with regards to equipment.
Let's say that the shield efficiency (how much energy it can block) is also variable.

So, you can give smaller, but newer ships an advantage by increasing the efficiency (how much of the current shield energy can be blocked) and the drain modifiers.
It would also allow one to add a "building" aspect into the game. More max energy? Better efficiency? Better main reactor, so ethe shield reload is higher?

Give each of these options a price - not only with regards to actual costs, but also size or weight and the player has something to tinker with when he upgrades his ship (star base, or ship "level up").

Quote:

Planning on writing an EGA-Trek clone? Or just having fun?

Not sure it needs a remake. The original EGA Trek is still fun :)
I was basically wondering how one could implement trek like shields so that sentences the "Shields are down to 50%" and "Emergency power to shields" actually would make sense in game ;)

Michael Jensen

Hmm, you're reminding me of Elite. Space RPGs are the best!

Evert

For my ideas (which I haven't tried to implement yet but seem sweet to me), I'll first briefly explain quantum tunneling.

Say we have a particle moving to the right with a kinetic energy E. It encounters a potential barrier of height V. Classically, it will cross the barrier if E>V, with its kinetic energy reduced to E-V. If E<V, it will hit the barrier and (probably) rebound. If you absorb the kinetic energy into the potential barrier to reduce it, then this will already work very nicely for shields.

I like the quantum idea better though: in this case, there is a finite probability that even for E<V, the particle tunnels through the barrier and for E>V it can still bounce back. There are two possibilities I can think of for shields here: either you calculate the probability of the particle penetrating the barrier and roll for that. If it penetrates, it penetrates and otherwise you absorb the energy into the barrier and lower it. My preferred method would be to do this in proportion though: if the probability amplitude for penetration is 10% and for reflection is 90%, then you absorb 90% of the energy in the shields and 10% goes to the ship (likely the hull).

Either way, hits will reduce the shield strength and chance of blocking and at the same time there is always a moderate chance of taking damage, so shields provide mostly statistical rather than absolute protection. Powerful hits instantly overload the shields and do damage to the ship. I think all of this is also reasonably consistent with the Star Trek way of shield operation.

Of course, the only way I ever implemented shields at all is by having them take the damage instead of the hull. This is easy, but I think the method I outlined above (distribute damage between the shields and the ship in proportion with the fractions depending on the strength of the shields and the energy of the projectile) will be both quasi-realistic and fun. The statistical distribution of full damage has the same result on average but has the disadvantage that even at full shields, your hull can take the full impact of a photon torpedo.

A J

from the tv show, i get the impression they dont take damage until sheilds are 0%. are you trying to create a meaningful overlap, were damage can occur when sheilds > 0 ?

maybe your ship could take specific damage to areas of the ship, when sheilds are less than 50%, like if the enemy targets your warp core/engines, it could damage them even when you have shields.. as that seems to happen on the show often, they loose engine power when they still have shields.

if your not sure how to do it, just make it random, and then blame Q.

Evert
Quote:

from the tv show, i get the impression they dont take damage until sheilds are 0%.

Actually, I think they do. Think of phrases like `shields are holding, minor damage only' or the combat sequence at the end of Star Trek VI, where the Enterprise takes quite a beating before Scotty's `Shields collapsing!'
The ships don't take full damage, but I get the impression that the shields become much less efficient at blocking fire as they take damage.

Michael Jensen
Quote:

your hull can take the full impact of a photon torpedo.

If I understand correctly, shields only block phasers, etc, shuttles can fly through them (taking damage, as seen in an ep of TNG, had something to do with one of the fed officers becomming a spy against the mockee or something) and also photon torpedos too (altho photons would see more enegery/light than physical mass, I think they can go through shields.)

Quote:

from the tv show, i get the impression they dont take damage until sheilds are 0%. are you trying to create a meaningful overlap, were damage can occur when sheilds > 0 ?

Not so. The shields almost never hit 0 in TNG, but they always take damage and the crew flys all over the bridge, and there's always repairs to be made, etc...

Not sure if the damage taken is from turbulance, or projectile damage tho...

Evert
Quote:

If I understand correctly, shields only block phasers, etc, shuttles can fly through them (taking damage, as seen in an ep of TNG, had something to do with one of the fed officers becomming a spy against the mockee or something)

Nope, shields block physical objects as well as particle beams. See for instance the TNG episode Relics, in which Geordi and Scotty use an old ship to jam open the portal of a Dyson sphere, or indeed the episode you mentioned (Preemptive Strike), in which Lieutenant Ro takes a Maquis figher craft through the Enterprise shields at a weak spot, but only because Picard order Worf to let them pass (ie, weaken the shields enough for the shuttle to pass through).
I'm sure there are more examples. More interesting, earlier episodes of the original Star Trek suggested that you cannot fire weapons from within the shields either: they had to drop shields to fire torpedoes and phasers or use the transporter (as they also need to do in TNG). The point about phasers and photon torpedoes not being able to get out while inside the shields was later forgotten or abandoned though...

Quote:

and also photon torpedos too (altho photons would see more enegery/light than physical mass, I think they can go through shields.)

A photon torpedo is very much a physical object. I'm not sure if you get to see one in Next Generation, but you get to see them in Star Trek III and Star Trek VI at least (Spock was buried in one). It's a warhead with a detonation payload of anti-matter. And they don't go through shields (see Star Trek Generations, for instance) although the energy released by a torpedo blast can overload the shields if it detonates too close (eg, The Nth Degree).

And no I'm going to do something else, because being able to quote those episodes from memory scares the hell out of me.

Michael Jensen

Interesting, how you mention that later on, Phasers/Torpedos can go out through your own shields, but not in through an enemies...

Quote:

being able to quote those episodes from memory scares the hell out of me.

As it should! :P

spellcaster

Well, they beam with raised shields as well if they need. But I don't think we should expand this to a discussion of logical flaws in a Scifi series.

back to my original topic: how would you handle such a protection? You don't have to look at it from the Star Trek or even scifi side, consider it to be a protective spell in a fantasy setting if you like.
Or an armor in a modern setting, it doesn't really matter :)

I just want to discuss the basic idea of it, and how one could implement such thing.

Michael Jensen

If it were fantasy armour spell, I would have armour as a specific amount, and if the damage taken was over a certain percent of the armour, a certain percent would get through and cause damage to your hp. This sounds like you can hit a certain level and be invincible, and in a lot of RPGs that's just how it is, however those levels are usually high enough that you can't take on a creature double your level, or with a stronger protective spell, or damage spell etc.

OICW

What about this:
Ship has two stats:
-Hull integrity (or hitpoints if you wish)
-Shields
Shields have also stat called "damage resistance". So when some blast hits the shields it does damege to the shields equal to its dmg statistic plus does damage to hull if dmg statistic is greater than "damage resistance"

Shileds -= weapon_dmg;
Hull -= weapon_dmg - dmg_resistance;

Torbjörn Josefsson

Evert: Yup, that's scary... we might have to send a man out to put you down - I'm the same, but with the series Friends ashamed :)

Tobias Dammers

Shields block whatever objects the plot requires them to block, and the screenplay writer(s) will always find an excuse for something to penetrate the shield / damage the hull / wiggle around persons on the bridge, provided the plot and / or dramatic curve of the movie demands so.

Anyway, as far as damage goes, I prefer to have a minimum blow strength that is required for a single blow to cause any damage at all. Otherwise, my itsy-bitsy 0.5 mW laser gun can destroy a giant asteroid, provided I keep firing at it long enough.
Other than that, all I do is linear damage to the shields, and once they're down, linear damage to hull. Shields recharge, hull doesn't unless you repair it. Works for me.

FrankyR

Spell, I like the ideas you came up with for the shields; that's more thought that I've ever put into it (I'm also tempted to use that as a starting point for how I handle defense in an combat engine I'm designing). When it comes to shields / defense like that I like the idea of having different kinds of shields and attacks that can render each other useless. For example, a traditional shield may be bypassed by a certain kind of phase-shift weapon, or like in Master of Orion 2 teleporters can function through normal shields (useful for boarding an enemy ship) but they do not function through special 'Hard Shields'. MOO2 also divides ships' physical defence into 2 categories: armour and internal structure. Once through the shields weapons will either damage armour, internal strucure or both. The ship is destroyed when internal structure reaches zero and the lower it gets the more chance there is of some systems going offline. Most weapons do a majority of their damage to armour and a little bit to the internal structre until the armour is fully depleted, but some weapons will bypass armour completly and damage only internal structure.
There is also the possibility of including weapons that have no effect on the ship itself but could potentially kill the crew inside (like some sort of radiation attack); it would be interesting countering such a weapon with special shields or something like that.

Michael Jensen
Quote:

Shields recharge

Shields don't recharge, but their energy source does, energy can also be temporarily rerouted from other systems not as aparantly vital...

Seperate Thought: One thing I wondered about in startrek was that they were out gunned all the time, with a shuttle bay full of shuttles, why didn't they ever use the shuttles to battle? (or even try supe up the shuttles to battle?) (1 big ship) < (1 big ship + 15 tiny ships) ...

spellcaster
Quote:

Shields don't recharge, but their energy source does

We aren't talking only star trek anymore, but possible shields in general ;)

Quote:

with a shuttle bay full of shuttles, why didn't they ever use the shuttles to battle? (or even try supe up the shuttles to battle?

I guess because they are shuttles, not fighters. Shuttles don't have the speed, or the turning radius to be a threat to a larger ship. Their shields can't take much damage, and normally they only have less powerfull phasers.

On the other hand, even those phasers might make a difference, so the shuttle would be attacked immediatly - so flying such a shuttle is more or less suicide - esp. during the launch of the shuttle.

But we have seen smaller fighter is several of the battle sequences, and some ships actually are actually equiped with these small, well armed and very fast ships.

Evert
Quote:

Seperate Thought: One thing I wondered about in startrek was that they were out gunned all the time, with a shuttle bay full of shuttles, why didn't they ever use the shuttles to battle?

They need to drop shields to launch the shuttle, which implies a scenario along the lines of

launch shuttle
drop shields
enemy photon torpedo
BOOM
;)

Besides, I think the amount of shuttles isn't that large. I think the Enterprise is supposed to carry ten; Voyager is supposed to carry two (so that they managed to loose about twenty over the run of the series can in my opinion only be explained by assuming that they reserved replicator power so they could build a big one right into the shuttlebay so all they had to do was say `Computer, one shuttlecraft!').

Tobias Dammers

...in which case it wouldn't make sense to carry more than a few of them...

spellcaster

Small note: whether or not the shields need to be lowered depends on the plot and speed of the shuttle ;)

Tobias Dammers

The former, mainly.
The acceptable speed of the shuttle, in turn, also depends on the plot.

Evert

As does the conversion between warp factor/lightyear per day or even full impulse/lightyear per day (sic!).
In fact, that can even change in the course of an episode (Star Trek Generations, Enterprise: Broken Bow).

Tobias Dammers

Hail the Almighty Plot! We must obey The Plot! In Plot we trust!

Michael Jensen
Quote:

We aren't talking only star trek anymore, but possible shields in general

I still don't think shields should ever "recharge" but the shield's power source can... of course to simply things, most implimentations (in games) have the power source as an unknown embedded in the actual shield technology, and the shields do appear to just "recharge" -- ex: protoss in starcraft...

edit: I want a dylithium crystal!

spellcaster
Quote:

I still don't think shields should ever "recharge" but the shield's power source can..

Magic Shield
Creates a magical shield that grants damage reduction. If the remaining damage is > 0, the damage is split between the shield and the protected person / item.
The shield is active for up to 10 minutes per caster level (the shield will be dispelled as soon as the shield's HP drop to or below 0. The shield cannot be healed by other means as it's regeneration ability).
The shield has a total HP of (H * caster level), damage reduction R * caster level and regenerates (N * caster level) hit points per round.

As you can see, it's the shield than regenerates.

And here's a tech example:
Phase Shield
The phase offsets the natural phase of the person encased by it. This gives them a reflection bonus of RB to armor class. Damage is reduced by up 80% based on the effective strength of the shield.
Damage averted by the shield causes a decrease in the shields efficiency. The shield will stabilize gradually over time after each attack, gaining 5% of the maximum possible effective strength each round.

Here, the damage that can be averted by the shield isn't a function of the energy, but of the "balance" of the shield.
I know it's not perfectly worded, but I guess the intention is pretty clear ;)

orz

I think the precise formulas for that stuff may need to be designed for gameplay purposes. Most space-flight-sim games have fairly-quickly recharging shields that block all damage while they're up, and a hull that's only damaged when the shields are at zero, ala Wing Commander. This seemed pretty obnoxious from a gameplay perspective, because it means that long dogfights have the potential to last forever, as any brief opening doesn't produce lasting effects.

It seems like you're only considering shields that absorb some or all damage. The Star Control serious used a variety of shields that had a variety of effects:

Yehat Terminators's Shield: (from SC1)
Summary: short-term invulnerability
Blocks all damage from normal damage sources, but can only be activated for brief periods, and uses the same pool of energy that you need to shoot. Also, certain rare damage sources can ignore this shield, including collisions with planets.

Utwig Juggernaught's Shield: (from SC2)
Summary: damage to energy conversion
Similar to the Yehat's shield, except for a few key differences. An Utwig regenerates energy whenever it would otherwise recieve damage while shielding, and this is the ONLY way it can regenerate energy. However, it does not require energy to shoot its guns. An Utwig, unlike a Yehat, cannot fire while it's shields are active. Thus, if an Utwig shields without getting hit, and runs out of energy doing so, it is permanently out of energy and can not shield ever again, though it can still use its gun and engine just fine. Again, certain rare damage sources can ignore this shield, including collisions with planets.

Lk Sanctorum's Shield: (from SC3)
Summary: disable collisions
Collisions are disabled for this ship while its shields are active. It can maintain its shields for a fair while. It's shields draw power from the same power pool as its gun. Damage sources that don't require active collisions can ignore this effect (such as a cloud of poison/acid or a boarding space maring that has already hit the ship, but deals damage gradually over time).

Ploxis Plunderer's Shield: (from SC3)
Summary: reflect and "brainwash" enemy projectiles
A bubble appears around the ship when the shield is active. Any enemy projectiles that hit this bubble bounce off without dealing damage. Furthermore, projectiles that bounce off now belong to the Ploxis and can hurt whoever fired them or another enemy. Homing missiles even home in on the ship that fired them. The Ploxis' shields draw power from the same power pool as its missile launcher. Laser weapons are not reflected, though their damage is blocked. I don't remember what (if anything) can bypass this shield.

Other shield-like effects in various SC games include generating mini-spaceships to fly between you and the enemy to physically block their fire, healing ones regular health rapidly, an aimable shield that blocks all damage from a direction of your choice, a shield that turns on automatically if you get hit and have enough energy and costs a lot of energy to turn on but stays on relatively cheaply until you manually turn it off, several means of teleporting your ship out of harms way, a teleporter that teleports hostile projectiles away from you, guardians that orbit your ship and shoot down incoming projectiles, etc.

For the game I'm currently working on (in which customizing your ship is important), my intention is to have several types of shields that vary primarily in terms of
1. Directionality: omnidirectional or forwards-only
2. Effect: reduce damage or deflect projectiles
3. When: always on, or only for brief bursts, or some in-between
4. Stength: how much damage they can prevent, or amount of deflection
6. Regen: how quickly / if / under what circumstances they recover after taking damage
7. Specialization: which types of damage/projectiles they can effect to what degree

Michael Jensen
Quote:

As you can see, it's the shield than regenerates.

Right, I didn't say that didn't exist, I even gave an example of such shields (I'll cite it again, Protoss from Starcraft have these kind of shields) -- I just feel that they are wrong.

OICW
Quote:

I guess because they are shuttles, not fighters. Shuttles don't have the speed, or the turning radius to be a threat to a larger ship. Their shields can't take much damage, and normally they only have less powerfull phasers.

Technical note: in real freespace an Enterprise class ship and Spaceshuttle would have the same maneuvorability. You don't have there any friction. Also normal gun or better mass driver would be a superior weapon.

Evert
Quote:

Technical note: in real freespace an Enterprise class ship and Spaceshuttle would have the same maneuvorability. You don't have there any friction.

No fraction is irrelevant, it's still less maneuverable. A starship has a larger mass and therefor a greater inertia.

spellcaster
Quote:

n Enterprise class ship and Spaceshuttle would have the same maneuvorability. You don't have there any friction

They have less energy. You need energy if you want to change the movement of a body.
Oh, there is no "Enterprise class". The original Enterprise is constitution class. The refit is of constitution-refit-class.
You can see that in Star Trek VI: The Undiscovered Country, Scotty is looking at some blueprints labeled Constitution Class (Refit).

Ariesnl

you could also distract the shield energy from the weapons energy and than see how much energy comes through the shield

like this:

shield energy=100 u

1st shot is 60 u

so shields are down to 40 u

second shot penetrates with 60-40=20 u
and shield will be completely down

got the idea ?

Michael Jensen

Right, that was what someone originally pointed out, the problem with that, they said, is in the game play. -- something about long drawn out battles because it left too short of a gap of when you could hit them and deal damage...

I like a lot of the original ideas where some damage penetrates no matter what... it would also be cool if you could manually choose to reroute power from another system etc...

Of course thats easier said than implimented (since if you're playing with shields your ship is sitting dead in a dog fight, non-moving targets are easy to hit!) you could make it more rpg like and have engineers that get hired, and helms men also, and the better they are, the more they cost, and the better your ship manuevers when they pilot it/engineers make smarter decisions, etc...

Or it just hit me while typing, a player could define a list of actions to be taken under certain circumstances: ex1: shields get low -> reroute power from life support to shields; ex2: hotkey1 pressed, reroute power from shields to life support...

spellcaster
Quote:

shield energy=100 u

1st shot is 60 u

so shields are down to 40 u

second shot penetrates with 60-40=20 u
and shield will be completely down

Yep, that was the basic idea. From there I added the damage to the ship even if the shield are holding, so that you can have the exploding consoles and damage reports (as seen on TV) even while the shields are still "up".

But anyway, if you want this bevahiour, you could get it easily by tweaking the variables I used. The damage to the shield = damage from weapon is more or less a specific case of the general equation given.

OICW

I was giving an example, but I still thing that there's no matter how the ship weights, if you have same engine you can move at same speed with Enterprice or Shuttle.

Evert
Quote:

if you have same engine you can move at same speed with Enterprice or Shuttle.

You can attain the same speed (eventually) but not in the same time. You certainly will not have the same acceleration, and therefor maneuverability.
Recall Newton's second law, F = m a. Now we two ships with the same engin, giving the same force F. These ships have different mass, so the acceleration a = F/m is proportinally smaller for the larger ship.

OICW

Yeah you're right I forgot about it.

Ariesnl
Quote:

Right, that was what someone originally pointed out, the problem with that, they said, is in the game play. -- something about long drawn out battles because it left too short of a gap of when you could hit them and deal damage...

I like a lot of the original ideas where some damage penetrates no matter what... it would also be cool if you could manually choose to reroute power from another system etc...

Of course thats easier said than implimented (since if you're playing with shields your ship is sitting dead in a dog fight, non-moving targets are easy to hit!) you could make it more rpg like and have engineers that get hired, and helms men also, and the better they are, the more they cost, and the better your ship manuevers when they pilot it/engineers make smarter decisions, etc...

Or it just hit me while typing, a player could define a list of actions to be taken under certain circumstances: ex1: shields get low -> reroute power from life support to shields; ex2: hotkey1 pressed, reroute power from shields to life support...

hum I love long battles ;D
but offcourse the damage also depends on the distance (with phasers) and the shields cost energy and if the shield emitters themself are damaged the shields will be less powerfull..
by the way I made it possible to aim at specific targets on an enemy ship ( If your sensors and computer are ok that is .. ;))

Michael Jensen

It would be neat to have arcade style combat like you describe. (Aiming to knock out certain things) of course you'd need a pilot, and someone to choose a target (and I don't mean simple aiming turning a turret left and right, I mean actually choosing a target on the enemy ship and going for it -- I suppose an auto lock with a "next target/prev target would do..." and it could all be done two handedly -- fly & op the computer, aim, use tractor beams, etc...

maybe with a mouse... who knows... that'd be cool -- oh and like someone said -- with zelda like away missions ;-)

Ariesnl

That's already in it you can Target_their_warpcore like in the series ;D
and they'll and the energy output of that WILL decrease resulting in longer load times for phaser/shield energy etc..

hum a lot of people tell me to put in away team missions.. would be nice but 'm still thinking about how exactly

Thread #525578. Printed from Allegro.cc