An idea for corpses

An idea for corpses

Various things about Spring that do not fit in any of the other forums listed below, including forum rules.

Moderator: Moderators

Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

An idea for corpses

Post by Warlord Zsinj »

Well, currently Spring works whereby when a unit dies, the explosion obscures the spot for a moment, and the unit model is removed/disintegrated and is replaced by the wreckage model.

What I suggest is that Spring form the wreckage out of the original unit model. So when a unit dies, Spring tints its textures grey/black and it collapses in a heap in whatever position it died.

This offers a number of advantages over the previous system:
1) The biggest and coolest advantage is that there is none of this shifty swapping model business. Instead of having a big explosion and swapping the model, there is an explosion, and the unit (whatever isn't blown off the chassis) literally falls over and becomes wreckage. So when a unit is 'just' killed (ie: say a Krogoth is felled by a peewee), you will visually see it falling over. Also, in units that are blown into the air, you can simply activate the corpse, so when it lands it lands as a corpse.
2) Unit makers no longer have to bother modelling and texturing a corpse model, as Spring does it for them. This removes a lot of trouble from unit making ends.

A couple of tacked on suggestions to be considered:
You can either let Spring think of the wreckage as a hunk of metal, in the same way current wreckage is, or you can still leave it as a unit capable of movement, so that when it is shunted to the side, bits of it will slide, and as it is pummelled away, buts will fly off. It also means that heavy units can push wreckage out of the way (a big gameplay bonus), and that big explosions will send wreckage flying into the air, along with units.

Also, a number of scripting functions should allow unit makers to specially animate the "death throws" of their unit; being the time between the unit dies, and when it becomes a wreckage. That way units can have special death animations (such as an ATAT dying). They should also be allowed to change the tints that are thrown over the original textures, so that mods don't have to have greyed human infantry, etc.

Is the idea feasible? Is it too hard to do, or will it eat too much CPU?
Sean Mirrsen
Posts: 578
Joined: 19 Aug 2004, 17:38

Post by Sean Mirrsen »

Well, it's theoretically possible to have the unit 'die' after its animation in the Killed() script completes, so it'll only be a task for the modder to make an animation matching the corpse, or a corpse matching the animation.
As for dead units remaining units, that'll really eat too much CPU power. Corpses are affected by explosions, anyways. Or so I think... hmm... gotta test...
Instead, units could be made disabled, like aircraft, unable to move, just sit there and burn for a while, then explode and 'corpsify'.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

I don't think an engine can automatically create satisfactory wreckage of any units. There would be all kind of problems with non-conventionnal units.

Allowing pause in the Killed() script so modders can script death animation sound better to me.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

One of the biggest points of the whole thing was to remove effort, not create it. The point was to remove the need for making wreckage, because they would be made by the engine, while looking much better in the process.

I just thought, watching Spring in action the other day, that the Corpses were a redundant idea brought over from TA, which weren't necessary in modern RTS gaming.
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Post by Dragon45 »

The same effect of less work for the modeler could be achived by formulating a seperate auto-corpse generator program. Admittedly, this woudl be very complex, but in the end, computing corpse data in real time (as you seem to be doing) would be far more inefficient.
User avatar
WeaZ
Posts: 79
Joined: 22 Apr 2005, 01:30

Post by WeaZ »

I dont like this idea either just thought I would suggest it...
In other games units die then sit there for a sec and then sink into the ground...
this way if they did all die the same way when they sunk to the ground it wouldnt look redundant....
but I dont like this cause noobs dont understand reclaiming and reclaiming can make or break u in big battles...
so this idea is dumb I think
User avatar
Zoombie
Posts: 6149
Joined: 15 Mar 2005, 07:08

Post by Zoombie »

mmmm Ragdoll physics! Deformable modles. Pewee's getting shot in half, with their upper torso landing behind them then their legs standing, with a red hot and smoking cut point.

<snaps out of imigination>

This idea is akin to some thing i have thought of a while ago, but i think that it would be rather difficult to pull of effectivly. However if we can make it work then suddenly corpses will look less bad, exspecialy when they are first created. I have already griped about that.
CaptainExo
Posts: 57
Joined: 01 May 2005, 03:18

Post by CaptainExo »

If it's possible, for K-Bots, have them break into their bits, collapse and darken. The entire mess would be treated as one wreck, but it'd look neat, as you could never tell which way the parts would land.

Here's a list;

K-Bots; break apart into base segments (arms, legs) defined by model, collapse, darken, max radius on collapse to prevent unit bits everywhere

Tanks; turret flies off/explodes (is destroyed) and body is made into a predefined beaten up corpse

Hovers; Have them sink into the ground a bit and darken, like the bots. Lose turrets if they have any.

Aircraft; very slim chance an aircraft might crashland when all it's HP are gone, instead of just exploding, making a little crater trail and wreckage. Predefined corpse. If it hits a unit or building on the way down, it explodes for variable damage depending on it's size

Ships; lose turrets and sink below the waves, as per usual, with predefined, beaten up corpse model
User avatar
[K.B.] Napalm Cobra
Posts: 1222
Joined: 16 Aug 2004, 06:15

Post by [K.B.] Napalm Cobra »

Couldn't we just match up vertex's on models and corpses then just have them move into position when they die?
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

They are rarely linked. People will often use the original model and then distort it and remove things to make it more "wreckage like".

What I suggest is that Spring does the above for you. It just removes bits of the unit (which it already does), makes the unit fall over/collapse, and then forgets that it is a unit, and thinks of it as a feature.
User avatar
Cheery
Posts: 129
Joined: 09 May 2005, 10:30

Post by Cheery »

Wreckages are cool.

Why wouldn't you make simple physics for making the after-death effects. after it does it's work, the unit bodies are destroyed and replaced with wreck meshes.

This way, it wouldn't cost too much CPU and not broadband at all (except if somebody is using somekind of super killing machine like korg).

that way, defining the joints and bodies for pewee for example, could make it break into parts completely or partly when it's hit.

It would look rather nice indeed.

Because bodies doesn't need to collide, with each other, you could do this all with verlet springs and some modifying.

Verlet equtation:
new_pos = 2*current_pos - old_pos + acceleration*acceleration

Verlet spring:
new_pos = right_pos;

There are also time corrected verlet version available somewhere!

Somebody think about it. :wink:

If you are going to model the death with verlet, remember to build support points so that they are able to die into standing position.
Sean Mirrsen
Posts: 578
Joined: 19 Aug 2004, 17:38

Post by Sean Mirrsen »

There are several reasons to corpses being necessary, the first and most important being that they are less detailed and aren't counted as units. I'd say that reducing modding effort by automating certain processes is a very bad idea, basically because it removes the possibility of any cool hacks people might think of.
For example, let's take the said PeeWee. It probably won't be able to detect what exactly kind of weapon has hit it. However, using the already existing script commands, you can make it do funny things, like take a few steps and fall, or fall back and twitch a little, then explode, or something more dramatic. You would just need to use more complicated techniques to see what amount of damage the unit received, than the severity variable of the killed script. Also, remember that the Killed script has the power to select the corpse model that the unit leaves.
This is all, of course, leading to more work for the modder, but who said that good things are done easy?
mongus
Posts: 1463
Joined: 15 Apr 2005, 18:52

Post by mongus »

The wreckage generator is a great idea.
Just not ment to run on game, but as an aid for modder.
This program can analize and generate lots of different wreckages (to fit situation), and the results be added to the unit/mod...
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

Yeah, if you really really feel like coding an automatic wreckage generator, make it available as tool for modder to create wreck ready to bundle with their unit, but don't ever include it in the Spring engine. Just imagine what it would do to a mod like SWTA or AATA that use infantry! And as a modder I have enough trouble with Spring reinterpreting my script in an odd way because it thought it can create smooth walk better than me, I don't want to have to fight spring to get the wreck I want as well.

However, something that could be nice would be to allow the killed script to select from different wreckage, not just different degree of destruction of the same wrecakge thread.
User avatar
Zoombie
Posts: 6149
Joined: 15 Mar 2005, 07:08

Post by Zoombie »

But it would be cool to blow arm's off of AK's, and cut Pewee's in half. Also who here thinks that lasers sould be continue's? Like beam's rather then pulses?
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

Well, it seems I've been voted down on this. So be it.

I still think that there should be some sort of automatic animation that the engine uses for when units die, so that when they are hit they stagger back and fall, then explode, or they sit there disabled for a few seconds, then blow up, etc.
You get the feeling that there probably shouldn't be wreckage when there is a huge explosion, and parts go flying everywhere (like when you kill a Krogoth), but there always is one, which I thought is a bit discontinuous.
Sure, modders should be able to put in their own death animations, but I'd like Spring to generate some automatic ones too.
User avatar
Zoombie
Posts: 6149
Joined: 15 Mar 2005, 07:08

Post by Zoombie »

Oh and some of the death animations should be darkly funny. Like it LOOK'S like the unit survived, but it is killed a few seconds later. I├óÔé¼Ôäóve always liked those, and yet I still don├óÔé¼Ôäót know why!
mongus
Posts: 1463
Joined: 15 Apr 2005, 18:52

Post by mongus »

Mongus wrote:When a kbot dies... it instantly transforms into another shape... almost blinking into another shape... maybe it can malfunction and explode (still in original shape) first?.. (this seems to happen when they left a carcass)
8)
i agree on the idea too.

About, the wreckage generator.. i just saw there existed something like that for TA. It generated explotions though.
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

Post by bobthedinosaur »

sean, ive been won dering about delaying kill scripts for death animations for along time, could you possibly write up an example script for say a kbot following over with this delay idea? i mean with out actual model or real animations, if its not too hard?
ive wanted to impliment faling over mech like units for a long time :twisted:
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

Then we can have a real Silly Tipping Over Rocket Man!

:wink:
Post Reply

Return to “General Discussion”