Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: diamondgeezer on April 19, 2003, 11:54:09 pm

Title: Really big guns
Post by: diamondgeezer on April 19, 2003, 11:54:09 pm
Has anyone worked out whether the engine could support a convincing railgun effect?

----------------
Diamond Geezer hasn't recieved a bill for his broadband in nearly a year
Title: Really big guns
Post by: Visionism on April 20, 2003, 12:24:13 am
Ohyah... Gunship from Elite Force. That would put a nice dent in your Orion. :cool: Still... I'm generally not in favor of importing things from other SF 'universes' although the railgun is a real-life proposition I know. Would be interesting to see a capship tumble like a dragon hit by a morningstar...hehe
Title: Really big guns
Post by: Liberator on April 20, 2003, 02:21:26 am
Who ever said "Speed kills" wasn't far wrong.

*pulls out "The Official IIRC Physics Book*

Consider, a railgun, so dubbed because it accelerates a mass or slug down a set of rails magnetically, discharges it's projectile linearally at realitavistic velocities, I.E. near lightspeed.

As an object approaches the speed of light, more and more energy is needed to accelerate it further. To reach the speed of light an infinite amount of energy would be required.

Therefore it is impossible to reach light speed under conventional conditions, but this is an SF game[/i] so we'll set that aside for the moment.

The reason more energy is requires is because the mass becomes more massive the closer you get to light speed.  This cannot be set aside as this is where the weapon gets it overwhelming destructive power.

If you discharge a kilogram projectile though a railgun at a large percentage of the speed of light, say 55%, the apparent weight of the projectile is in the many millions of tons.  There is little conventional armor or sheilding could do to stop such a projectile.  If the target is an Orion destroyer, for example, the actual slug would go straight through like a dose of salt and keep going until it ran out of momentum, probably many thousands of lightyears unless it is acted on by some outside force.

Once you account for the energy involved accelerating the slug and the resources expended in constructing such a massive structure.  You could have built enough capital ships with enough firepower to destroy the Orion many times over.

The railgun is an impressive, if not terribly practical, weapon.

The technology applied on a slightly less ambitious scale lead to the Gauss gun, which is more like a traditional firearm.  It has be theorized that a Gauss weapon could be made man portable thus giving the infantryman significant firepower on the battlefield.

*puts away The Official IIRC Physics Book*

But having said that, that's just what we need *another* all-powerful weapon that the GTVA can waste time, money, and resources on in the hopes that they, a measly 45 year old federation can stand against a race that has stood basically unchallenged for at least 8000 years.
Title: Really big guns
Post by: Shrike on April 20, 2003, 02:29:50 am
Quote
Originally posted by Liberator
Er, c-fractional?  :wtf:

The fastest railguns tested AFAIK were Russian ones, which tossed a slug at about 36 km/s.  Very fast indeed, but not relativistic.

And a railgun effect would actually be reasonably similar to that of a normal chemical gun.  All these people who keep wanting swirly trails for railguns are perpetrating a grave crime against originality. :p
Title: Really big guns
Post by: Liberator on April 20, 2003, 02:37:31 am
That's a Gauss gun.

A Railgun that everybody is familiar is really big. :drevil: Like I described.

And swirlies are cool.  I had a mod for Q3A that added a really cool 3-d swirl to the er...railgun, you could control the color separately and everything.  Unfortunately, one of my previous hard drive formats ate it.  :(

Oh and why am I an "Evaluated Term"?
Title: Really big guns
Post by: diamondgeezer on April 20, 2003, 03:45:47 am
So, has anyone worked out whether the engine could support a convincing railgun effect?

----------
Diamond Geezer has excellent eyesight
Title: Really big guns
Post by: karajorma on April 20, 2003, 03:47:10 am
Quote
Originally posted by Liberator
That's a Gauss gun.

A Railgun that everybody is familiar is really big. :drevil: Like I described.


I don`t think it is actually. A railgun doesn`t have to fire at relativistic speeds. It's just that they do in Sci-fi. In RL the definition seems to be any gun that magnetically accelerates a slug down a set of rails.

Anyway it's all a bit of a gray area cause people keep misusing the words and using Gauss gun, railgun and mass driver for the same weapon.
Title: Really big guns
Post by: Stryke 9 on April 20, 2003, 04:27:43 am
Er... no. Railguns can fire projectiles at speeds considerably faster than gauss guns, and all told they provide a bit more punch for the power requirement, but they're nowhere near relativistic. Think of it this way: People have build railguns. Hundreds, if not thousands, of technically-minded kids and physics classes. However, you'll notice a shocking absence of both stories about an entire residential block being blown up when a doped pellet traveling at 1/15c hit a wall and started a small nuclear reaction, and cautionary tales of entire classes being sterilized by the hard radiation of said pellet smashing apart air molecules that happened to get in the way.

Relativistic speeds are no joke, and if all you needed to take a sizeable chunk out of the planet would be a simple railgun the size of a semi and a decent power plant, have no doubt that somebody would have done so by now.

I think you were confused by the way the acceleration in railguns works. The EM force ramps up the barrel at roughly the speed of light, yes, but due to inertia, friction, et al. the object being thrown kinda lags and is pulled along behind it, and never even comes close to that speed. I suppose if you had a slug with a mass of 0, you could throw it at just about C, but then that wouldn't be much fun, would it? No kaboom, no nothin'.


But, ah, railguns are lame. They cook themselves after one shot, and for a single-use weapon they're pretty expensive and pretty puny. Stick to gauss guns- now THERE'S some cool ****.

Ever read The Moon is a Harsh Mistress? MDW-licious!


As to the topic of this thread: Yeah. Make an oblong "laser" bolt, give it a really high speed. If you want a particle trail, treat it like a missile. This spirally crap isn't even fantasy, it's just some stupid thing someone decided would make their gun look cooler.
Title: Really big guns
Post by: Peter on April 20, 2003, 04:44:07 am
Quote
Originally posted by Stryke 9
But, ah, railguns are lame. They cook themselves after one shot, and for a single-use weapon they're pretty expensive and pretty puny. Stick to gauss guns- now THERE'S some cool ****.


Its science fiction who cares if in real life they would burn out after one shot, Its like pointing out the GTW-66 Maxim dosen't run out of ammo. Freespace does NOT use accurate physics anyway so why should anyone be limited by reality?

And if you wanted to you could get a spiral effect with one of the options "Corkscrew"
Title: Really big guns
Post by: diamondgeezer on April 20, 2003, 04:54:06 am
Quote
Originally posted by Stryke 9
This spirally crap isn't even fantasy, it's just some stupid thing someone decided would make their gun look cooler.

That's the one. It is cool, isn't it? Could a qualified coder tell me whether it's doable, please?

--------------
Diamond Geezer is not a nuclear superpower
Title: Really big guns
Post by: Peter on April 20, 2003, 05:15:36 am
Quote
Originally posted by diamondgeezer

That's the one. It is cool, isn't it? Could a qualified coder tell me whether it's doable, please


I am not a coder but open the weapons table copy a missile like the hornet put the speed through the roof increace the mass and make the tail longer put the model as the laser and make it unguided, oh yeah and put up the damage. And that would be your railgun, Happy now?

P.S. Ask me if you can't do it
Title: Really big guns
Post by: IceFire on April 20, 2003, 09:11:16 am
I did a pretty good railgun (with swirl) effect for TBP.  The latest verson has a new effect which is better than the previous one.  Its not perfect...but its just a really fast "laser" with killer subsystem damage and limited other damage.
Title: Really big guns
Post by: Peter on April 20, 2003, 09:46:50 am
Can anyone improve on this:

; ----------------------------------------------------------------------------------
$Name: @Railgun
+Title: XSTR("GTR-1Railgun", 3325)
+Description:
XSTR(
"Prototype
Electromagnetic Acceleration Cannon
", 3326)
$end_multi_text
+Tech Title: XSTR("GTR-1 Railgun", 3327)
+Tech Anim: Tech_GTM-4_Hornet
+Tech Description:
XSTR(
"If you want a decent description WRITE ONE!!!.", 3328)
$end_multi_text
$Model File:                           none
; The following fields (preceded by @) are only required for laser
; rendering, which requires that "Model File:" be none.
; These are the same values that used to be hard-coded:
@Laser Bitmap:                        newglo9
@Laser Glow:                        2_laserglow03
@Laser Color:                        0, 0, 250
@Laser Color2:                        0, 0, 250
@Laser Length:                        10.0
@Laser Head Radius:                   0.90
@Laser Tail Radius:                   0.90
$Mass: 10000.0
$Velocity: 400.0
$Fire Wait: 8.0
$Damage: 1200.0 ;; damage applied when within inner radius
$Blast Force: 0.2
$Inner Radius: 10.0 ;; radius at which damage is full (0 for impact only)
$Outer Radius: 20.0 ;; max radius for attenuated damage (0 for impact only)
$Shockwave Speed: 0 ;; velocity of shockwave. 0 for none.
$Armor Factor: 8.0
$Shield Factor: 1.0
$Subsystem Factor: 0.3
$Lifetime: 30.0
$Energy Consumed: 0.0 ;; Energy used when fired
$Cargo Size: 1.0 ;; Amount of space taken up in weapon cargo
$Homing: YES
    ;; the following indented fields are only required when $Homing is YES
    +Type: ASPECT ;; Legal: HEAT, ASPECT
    +Turn Time: 1.15
    +Min Lock Time: 3.0 ;; Minimum lock time (in seconds)
    +Lock Pixels/Sec: 60 ;; Pixels moved per sec while locking
    +Catch-up Pixels/Sec: 100 ;; Pixels moved per sec while catching up
    +Catch-up Penalty: 30 ;; Extra pixels to move after catching up
$Swarm: 1
$LaunchSnd: 78 ;; The sound it makes when fired
$ImpactSnd: 88 ;; The sound it makes when it hits something
$FlyBySnd: -1
$Rearm Rate: 1.0 ;; number of missiles/sec that are rearmed
$Flags: ("in tech database" "player allowed" "Corkscrew" ) ;;
$Trail: ;; Trail cannot be set if Exhaust is set
    +Start Width: 0.25 ;; Width of trail nearest missile
    +End Width: 0.25 ;; Width of trail before it "evaporates"
    +Start Alpha: 1.0
    +End Alpha: 0.0
    +Max Life: 1.0 ;; how many seconds before trail disappears
    +Bitmap: missiletrail03 ;; Bitmap used to draw trail
$Icon: iconHornet
$Anim: hornet
$Impact Explosion: ExpMissileHit1
$Impact Explosion Radius: 5.0
Title: Really big guns
Post by: IceFire on April 20, 2003, 09:57:30 am
How about putting that into a code bracket (except with square brackets [ ] ) so that the formating is preserved.
Title: Really big guns
Post by: Peter on April 20, 2003, 10:47:31 am
Quote
Originally posted by IceFire
How about putting that into a code bracket (except with square brackets [ ] ) so that the formating is preserved.


If I had the slightest idea what you meant I would but I don't, feel free to enlighten me.

And on the subject which was "really big guns" does this have to be a railgun? I spent ages a year or so ago making weapons for a campaign I never finished, Some of them might be useful
Title: Really big guns
Post by: diamondgeezer on April 20, 2003, 09:13:50 pm
:sigh:

Look, I want a railgun. It has to be a railgun because the ship I'm making has railguns. It's not something that's up for debate.

Now, Peter mate, I'm well aware of the joys of the corkscrew flag, but what I was looking for is the effect we see in Quake or Tiberian Sun - a very short lived energy beam surrounded by a spiral of particles which fade away over a few seconds. I know Stryke doesn't approve, but as he said it look cool, and many gamers will recognise the effect as a railgun... thus, I'm going to ask again - will the engine support this effect?

------------
Diamond Geezer's PC has an AMD XP 1.53 processor
Title: Really big guns
Post by: NecroBob on April 20, 2003, 10:49:58 pm
mmmm, I think a neat weapon would be similar to that big blue energy thingus that the convenant ships flung in Halo, the really annoying ones that couldn't hit anything.  those were cool...
gonna putter with it after I tweak my planet, make my dyson sphere and get off my lazy ass :D

[EDIT] Or just a REALLLY wide\thick\massive planet killer laser thingie.  
the starwars laser was cheap, how is a beam of energy as thick as your arm gonna blow up a planet???

Bob
I enjoy laziness.  the time it affords me is invaluable.
Title: Really big guns
Post by: Goober5000 on April 20, 2003, 10:54:54 pm
Quote
Originally posted by diamondgeezer
a very short lived energy beam surrounded by a spiral of particles which fade away over a few seconds...will the engine support this effect?


je pense que oui
Title: Really big guns
Post by: diamondgeezer on April 21, 2003, 01:39:53 am
You think *something* yes... I'm going to take that to mean such an effect could be made. OK, the next thing is to ask for it - would a coder please try and make this effect if they have some spare time? Ta muchly.

--------------
Diamond Geezer doesn't understand vegetarians
Title: Really big guns
Post by: Goober5000 on April 21, 2003, 02:40:38 am
Quote
Originally posted by diamondgeezer
You think *something* yes...


literally, "I think that yes" --> French for "I believe so"

Quote
if they have some spare time?


Aye, there's the rub.
Title: Really big guns
Post by: Turnsky on April 21, 2003, 02:54:01 am
well, the actual concept of making a hypervelocity projectile is pretty sound, the delivery system, however is still up to conjecture...

hypervelocity works kinda like this, imagine if you will a bullet, say around .50 cal, now, accellerate that sucker up to a fair few meters a second(delivery is a moot point could be rail,gauss, or just the orbit of a planet over time) now imagine that hits something, say for the sake of a general reference... the ISS, at that speed, it would do a helluva lot of damage to the fragile surface of the station as well as everything else beneath..

i've seen a doco showing a hypervelocity projectile the size of a pinhead blasting apart a small satellite..

sf or not, the basic concept is pretty sound, now to figure out an effective delivery system..
Title: Really big guns
Post by: J.F.K. on April 21, 2003, 05:26:18 am
Quote
Originally posted by Shrike
And a railgun effect would actually be reasonably similar to that of a normal chemical gun.  All these people who keep wanting swirly trails for railguns are perpetrating a grave crime against originality. :p


You can blame that on Q3A. ;)
Title: Really big guns
Post by: Hellbender on April 21, 2003, 06:47:23 am
Think I first saw the spirally effect in a Schwartzenegger film, Eraser? The explaination I think at the time was the effect of the projectile interacting with water molecules in the air to produce a similar effect to a high g contrail from an aircraft during harsh manouvers.
Title: Really big guns
Post by: diamondgeezer on April 21, 2003, 09:27:33 am
Well, I've sat politely through twenty-odd posts arguing about what a railgun would look like in real life - now I think it's time for a coder to tell me whether or not my request for the spiral effect thingy will be added to the To Do list, so that we can all let the thread die.

-------------
Diamond Geezer flat refuses to watch Farscape
Title: Really big guns
Post by: IceFire on April 21, 2003, 09:30:43 am
Quote
Originally posted by Peter


If I had the slightest idea what you meant I would but I don't, feel free to enlighten me.

And on the subject which was "really big guns" does this have to be a railgun? I spent ages a year or so ago making weapons for a campaign I never finished, Some of them might be useful

Exactly what I said...preserve the formatting from the table by putting it in a code bracket.  Very simple.  Here's an example from TBP.

Code: [Select]
;40mm pulse cannon, available for Aurora and Zephyr

$Name:                          40mm Pulse
+Title:                         XSTR("EA 40mm Pulse Cannon", -1)
+Description:
XSTR(
"Plasma Discharge Cannon
Level 2 Damage
Standard Issue", -1)
$end_multi_text
+Tech Title:                    XSTR("EA 40mm Pulse Cannon", -1)
+Tech Anim:                     Tech_Subach_HL-7
+Tech Description:
XSTR(
"Description goes here.", -1)
$end_multi_text

$Model File:                  none
@Laser Bitmap:                ea40mm
@Laser Glow:                  generic_g1
@Laser Color:                 30, 255, 255
@Laser Color2:                120, 255, 255
@Laser Length:                5.0
@Laser Head Radius:           0.75
@Laser Tail Radius:           0.80
$Mass:                        0.5
$Velocity:                    600
$Fire Wait:                   0.34
$Damage:                      56
$Armor Factor:                1.0
$Shield Factor:               1.0
$Subsystem Factor:            1.2
$Lifetime:                    2.0
$Energy Consumed:             3.1
$Cargo Size:                  0.0
$Homing:                      NO
$LaunchSnd:                   76
$ImpactSnd:                   85
+Weapon Range:                1100
$Flags:                       ( "in tech database" "player allowed" "stream" )
$Icon:                        iconSD4
$Anim:                        SD4
$Impact Explosion:              none


NONE of the formatting is lost...all of the tabs I have setup are preserved.  If you still don't get it, look up the vBulletin code's on how to do formatting.  It just makes it easier to pass the table data around and easier to look at so that the tabs and spaces are preserved when I copy it back into my tables so I can manipulate it.  It saves us all some time.
Title: Really big guns
Post by: diamondgeezer on April 21, 2003, 09:50:32 am
Where's that little head bash smiley when you need it?

---------------
Diamond Geezer grows bonsai trees
Title: Really big guns
Post by: Goober5000 on April 21, 2003, 10:59:34 am
Quote
Originally posted by diamondgeezer
Well, I've sat politely through twenty-odd posts arguing about what a railgun would look like in real life - now I think it's time for a coder to tell me whether or not my request for the spiral effect thingy will be added to the To Do list, so that we can all let the thread die.


Quote
Originally posted by diamondgeezer
Where's that little head bash smiley when you need it?


:lol:

Methinks it's certainly possible, but a long way due to being implemented, due to exams and code request backlog.  Ask Phreak; I think he was the one who did the corkscrew missile.  Combine Phreak's corkscrew effect with the beam stuff and a little particle noise, and you've got your effect.
Title: Really big guns
Post by: diamondgeezer on April 21, 2003, 11:03:39 am
Well this is it - we have beams, and we have spiraly things. We just need someone to combine them with a few nice and simple parameters, such as seperate lifetimes for the beam and spiral, etc. I'll go poke Phreak with a Bic biro until he does it :nod:

-------------
Diamond Geezer avoids singing in public
Title: Really big guns
Post by: TrashMan on April 21, 2003, 11:12:07 am
You know...I read a bit about high-tech weapons that the military is working on..
Some of them are VERY interesting (got pics too), but allmost all of them have MASSIVE energy requirements..:D