Macross missiles progress

Macross missiles progress

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Macross missiles progress

Post by KDR_11k »

I'm trying to make a tag that makes missiles launch along the piece they're fired from but I can't get the direction of the piece in a way that will make the shot come out right. Anyone know what function and what conversions are necessary for that?
Last edited by KDR_11k on 23 Jun 2007, 12:04, edited 1 time in total.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Okay, I just took the code from COBInstance for the emit-sfx stuff.
Image
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

I've added a COB call to "ShotX" before a weapon calls QueryWeapon to deterimne the position of the next projectile, this should allow switching the firepoint of a burst weapon more easily.

This is also necessary since I now added a projectiles tag that defines the number of shots that will be spawned each time the weapon shoots (whether a shot out of a burst or normal). As you can't forcefire guided missiles you should use this tag for synchronous launches, especially when you have e.g. 2x3 tubes where a set is always fired synchronously but there's a delay between the sets firing.

Projectiles can be set to 0 as well to prevent the wepaon from spawning any shots at all when it fires, useful for dummy weapons.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Image
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Post by SwiftSpear »

Best illustration ever.
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post by Guessmyname »

"Eat the carrots! They're good for you!"

Letting you see in the dark by light of their explosions
User avatar
Tim Blokdijk
Posts: 1242
Joined: 29 May 2005, 11:18

Post by Tim Blokdijk »

Great stuff!
You should give the smoke another colour or replace it with flowers or something.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

I've made missiles and starbursts obey smoketrail=0 now. You can use WeaponType=MissileLauncher; to mark something as a missile despite smoketrail=0.

Current patch that includes all changes I did to my version, i.e. the AimFromWeapon stuff (which BTW did mess up lightning graphics before I changed this and now makes the MeleeWeapon aim, too), fixedLauncher and some tweaks to the missile and starburst projectiles like making SBs obey the startvelocity and weaponacceleration tags.

BTW, those carrots are starburst (vlaunch) missiles.
Last edited by KDR_11k on 23 Jun 2007, 14:52, edited 2 times in total.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

carrot gun = win. great pic.
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post by Guessmyname »

So with this and vlaunch / guided stuff, would this behaviour be correct:

Guided: Shoots out at the angle, and turns using turnrate to target
V-launch: Acts like ordinary v-launch, just not necessarily vertical
User avatar
Zpock
Posts: 1218
Joined: 16 Sep 2004, 23:20

Post by Zpock »

Ohh great stuff. Are you going to make a tag for smoketrail texture so we can have different ones as well?
User avatar
Tim Blokdijk
Posts: 1242
Joined: 29 May 2005, 11:18

Post by Tim Blokdijk »

You should send any patches to Tobi as he leads development. (as you know)
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Guessmyname wrote:So with this and vlaunch / guided stuff, would this behaviour be correct:

Guided: Shoots out at the angle, and turns using turnrate to target
V-launch: Acts like ordinary v-launch, just not necessarily vertical
Yep. I find that vlaunch is better since they fly straight for a moment so you can see the launch vector much clearer.

I'll submit the patch when I think I'm done with the changes and sure it's done right.

BTW, obviously these weapons can't guess if firendlies are in the way so you should make them collidefriendly=0 and fire them in a direction that doesn't interfere much with other units. They'll also have difficulties with terrain so you should really be careful with the trajectories you choose. Best launch them roughly forward or upward.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Now all we need is the ability to take smoke trails and repalce them with a CEG or particle system.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Yeah but that'll get complicated.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Just make it spawn a CEG at the location of the projectile at regular intervals
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Yeah but I don't know how to deal with CEGs :P.
User avatar
Zpock
Posts: 1218
Joined: 16 Sep 2004, 23:20

Post by Zpock »

To get it right, it would be nice if CEGs (custom explosion generator) could be attached to follow a point on a unit or projectile, especially for this. At the moment they can only be spawned and then stick to where they where made. This would be useful for engine exhaust effects on units/missile/projectiles alike, but would need a lot of code work.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

K, current diff.

http://spring.unknown-files.net/file/30 ... es_I_made/

I'd appreciate some testing (usable build here), I've tested all changed code at least once but more testing is always useful.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Woo macross missiles! Does it respond to x, y and z rotation?
Post Reply

Return to “Engine”