Author Topic: Corkscrew missile revamp  (Read 4888 times)

0 Members and 1 Guest are viewing this topic.

Offline phreak

  • Gun Phreak
  • 211
  • -1
Corkscrew missile revamp
i recently made some properties of corkscrew missiles be defined in tables, before they were hardcoded in the game.  The new "$Corkscrew:" flag is optional after any EMP and Leech info that is defined.  If "$Corkscrew:" is not defined, it reverts to defaults assigned to the Tornado.  It goes as follows. It ignores this if the weapon does not define "corkscrew" in the flags.

Code: [Select]

$Corkscrew:
+Num Fired: 4       ;; Number fired in single-fire mode
+Radius: 1.25                   ;; radius of spiral
+Fire Delay: 30                 ;; fire delay in milliseconds between each individual missile
+Counter rotate: YES              ;; counter rotate alternate missiles
+Twist: 5                ;; rad/sec the missiles twist


The code is ready to be CVSed now
« Last Edit: November 11, 2002, 02:57:54 pm by 31 »
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Ask me about GORT!
    • Steam
    • User page on the FreeSpace Wiki
:nod::yes: Excellent!
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...

 

Offline Inquisitor

Will this break anything in the current game if we go ahead and committ it? Do we need to edit old files or something?
No signature.

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Ask me about GORT!
    • Steam
    • User page on the FreeSpace Wiki
Re: Corkscrew missile revamp
Quote
Originally posted by PhReAk
If "$Corkscrew:" is not defined, it reverts to defaults assigned to the Tornado.  
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...

 

Offline Inquisitor

Oops :)

Thank you :)

In that case phreak, committ away :)
No signature.

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
done
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline Rampage

  • Son Of Rampage
  • 211
  • Urogynaecologist
Radians Instead of Degrees
Just a [random] suggestion:  Perhaps you might want to change dAngle/dt from degrees to radians.  Because of the circular nature of the corkscrew, a circular measurement might be better than a triangular measurement.

Why? It just sounds better. ;)

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
i was just about to change the comment to read radians.
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline LAW ENFORCER

  • Turret Fiend
  • 210
    • http://www.armouredstar.com
Can anyone add acuracy code? SO the missiles fly about abit as if they wern't engineered very well? (unblanance in eninge thrust not gravity and wind:rolleyes: )
Conflict GRDLA:
Operation Return To Riker
www.ARMOUREDSTAR.com - the latest site is not finished yet!
[What we have here is the source to the Freespace ENGINE, not the Freespace GAME. By allowing the ENGINE to support all kinds of cool stuff, we're allowing the creation of all new GAMES] - TurboNed

 

Offline Inquisitor

If I can get Bob's CVS issues sorted out, I'll go ahead and tag/release 3.3.1 which will include this.
No signature.

 

Offline Rampage

  • Son Of Rampage
  • 211
  • Urogynaecologist
Quote
Originally posted by PhReAk
i was just about to change the comment to read radians.


Um... That will also require some changes in the code itself.  [Radians]=(Degrees)(PI)/(180)

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
the comment in the code read wrong, i set "+Twist:" to 25, it went around *much* faster than 25deg/sec
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline Scuddie

  • gb2/b/
  • 28
  • I will never leave.
Wha...  WHAT THE SAM HELL??  THAT'S MY PROJECT!!!... :( :( :(

Eh, nice job m8.  I had a considerably larger re-vamp to the swarm system itself planned, not just the corkscrew.  I aint surprised that someone else got to it first, considering I don't know C++ :D.  Anyway, what I did was make it so the missiles could do both swarming and corkscrewing, sorta like $swarm and Corkscrew flag together.  It was supposed to have stray distance for swarm, and a smoother version of swarm as well.  Hopefully it would do a random curve instead of a random angle.  It also would have had an inner radius and an outer radius for larger swarms of corkscrews.  That, and all the other common things you did.  I got a very small amount of progress done before it wouldn't compile, but oh well.  Maybe some of this stuff can go into your next build of it!

I really wish I knew C++, then I could have the glory :(.
/me plays his violin...
Bunny stole my signature :(.

Sorry boobies.

 

Offline Solatar

  • 211
Maybe we could have it so that a swarm could launch, but with no angles. Maybe four missile would launch at the same time, but out of different firing points.

 

Offline Scuddie

  • gb2/b/
  • 28
  • I will never leave.
Well, I found my plan file, here it is what I hoped it would be:
Code: [Select]
$salvo:
+SalvoType: 3 // 0=None (regular missiles); 1=Swarm; 2=Corkscrew; 3=Both
+Projectiles: 8 // How many are fired
+FireDelay: 150 // Delay in Milliseconds
+SWARM:
+MinDelay 100 // Minimum time before random course change
+MaxDelay: 200 // Maximum time before random course change
+MinAngle: 2 // Minimum angle for random direction
+MaxAngle: 15 // Maximum angle for random direction
+Independant: 0 // Allow missiles to stray (boolean)
+Curved: 0 // Use rads instead of deg (boolean)
+CORKSCREW:
+CounterRotate: 1 // Missiles will counter rotate
+Rotation: 10 // Degrees per second the missiles will twist
+Radius: 1.50 // Radius of the corkscrew
+OuterShell: 2.25 // 2/3 of missiles will be in this shell
// (projectiles must be a factor of 3), 0 for none
Mutate it, build upon it, do whatever to it.  Hell, call me an idiot for not knowing C++, just give me a 5% gross profit share :D.  I know it's possible some of these things can't be done, but can you try, phreak?
Bunny stole my signature :(.

Sorry boobies.

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
I think it can be done, but FS2 handles swarm and corkscrew missiles differently
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline Scuddie

  • gb2/b/
  • 28
  • I will never leave.
Yes they are handled differently, but they can be combined if each aspect stays on it's own side of the line.  The Tripod missile I once made had a corkscrew flag, and had $swarm: 3 on it, and it worked quite well:nod:.  I think in this case they might be a bit too conflicting in the properties because of the amount of customization, so perhaps it might be best to leave out type 3.  I'm no programmer, so I cant say.
Bunny stole my signature :(.

Sorry boobies.

 

Offline Scuddie

  • gb2/b/
  • 28
  • I will never leave.
Bump...

So, is anyone going to work on it, cause I cant.  Phreak, do you volunteer?
Bunny stole my signature :(.

Sorry boobies.

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
i've been busy with the OpenGL port recently.
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord