Railgun.oxp v 1.3 now available

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: another_commander, winston

User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: Railgun.oxp now available

Post by JensAyton »

*ninjad bit redacted*

Actual projectile weapon physics would involve, at minimum, treating the projectile’s movement between frames as a line segment and using that for collision detection purposes. This approach is no good for general collision detection, though, as it treats the projectile as a point (or disc, if you model it as a cylinder instead of a line segment).

I did point this out the last time someone proposed a projectile cannon.
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8501
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Re: Railgun.oxp now available

Post by DaddyHoggy »

Would it be possible to make the projectiles much longer than they actually are, but only texture the front, centre, rear portion of the the projectile (so it looks like bursts of 3) - would collision detection then occur if some portion of the whole projectile, invisible bits included, intercepted the target?

I really don't know how the collision detection works fully, other than following the discussion in this thread, so I could be talking tosh and therefore apologise in advance if this turns out to be the case. (or even if invisible polygons are allowed to exist)
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Commander Wilmot
Deadly
Deadly
Posts: 206
Joined: Thu Mar 17, 2011 10:12 pm
Location: Somewhere in galaxy 1, flying my Diamondback

Re: Railgun.oxp now available

Post by Commander Wilmot »

Thanks for making this. I'm always impressed with the programming that goes on here in making oxps, admittedly my knowledge of programming is limited to that you use magical things called functions that you insert variables into and that there are certain formats you have to use so the computer understands it, like grammar in human languages. By the way is there a problem with the website? My computer can't find it.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Railgun.oxp now available

Post by Commander McLane »

DaddyHoggy wrote:
Would it be possible to make the projectiles much longer than they actually are, but only texture the front, centre, rear portion of the the projectile (so it looks like bursts of 3) - would collision detection then occur if some portion of the whole projectile, invisible bits included, intercepted the target?
It would probably be easier to place two identical subentities in front of and behind the projectile. And of course their density would have to be adjusted, because being longer (= more mass) would make them more deadly.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Railgun.oxp now available

Post by Commander McLane »

Commander Wilmot wrote:
Thanks for making this. I'm always impressed with the programming that goes on here in making oxps, admittedly my knowledge of programming is limited to that you use magical things called functions that you insert variables into and that there are certain formats you have to use so the computer understands it, like grammar in human languages. By the way is there a problem with the website? My computer can't find it.
Thanks for liking it! :D

The Wiki was down for some time yesterday, but it's working now. Clicking on one of the links in the first post should bring you there.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Railgun.oxp now available

Post by Commander McLane »

Eric Walch wrote:
Commander McLane wrote:
Spartan wrote:
Is ship speed added to ammo speed? I once fired while injecting only to hit myself.
No, the ship speed is not added. Therefore firing the weapon while on fuel injectors may be a bad idea. To be honest, it never crossed my mind that somebody would want to. Firing while on full speed (without injectors) should be fine, though.
Is would be no real problem to use "3000 + player.ship.speed" instead of just "3000". It makes the bullets more deadly when shooting at injector speed. (As long as they yount fly through undetected :roll: )
The problem lies of course in the parenthesis. Higher speed makes the fly-though effect increasingly likely. In my initial tests I started with a speed of 5000 (which is about the same as 3000 + Cobra III injector speed), and hardly was able to hit anything. I had to reduce it to 3000 as a result. Therefore adding the ship's speed is not a good solution.
User avatar
Cmdr Wyvern
---- E L I T E ----
---- E L I T E ----
Posts: 1649
Joined: Tue Apr 11, 2006 1:47 am
Location: Somewhere in the great starry void

Re: Railgun.oxp now available

Post by Cmdr Wyvern »

A couple of creds worth on the collision detection issue -

You know how missiles explode in proximity to the target? :idea: You could have the railgun projectiles detonate in proximity to your target - dealing small explosion damages within a very small radius, of course - similar to a missile warhead, though that would make them HE shells instead of slugs.

I may play around with that idea myself.

BTW, the wiki page provides a link only to version 1.0.
Running Oolite buttery smooth & rock stable w/ tons of eyecandy oxps on:
ASUS Prime X370-A
Ryzen 5 1500X
16GB DDR4 3200MHZ
128GB NVMe M.2 SSD (Boot drive)
1TB Hybrid HDD (For software and games)
EVGA GTX-1070 SC
1080P Samsung large screen monitor
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8501
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Re: Railgun.oxp now available

Post by DaddyHoggy »

But it can only detect proximity on a per frame basis - so as Eric showed earlier if travelling a 3000m/s at 60fps the projectile moves 50m between frames - so how big a bang should it have to have any impact/effect at this maximum range? It stops being a dumb lump of metal at this point...
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Cmdr Wyvern
---- E L I T E ----
---- E L I T E ----
Posts: 1649
Joined: Tue Apr 11, 2006 1:47 am
Location: Somewhere in the great starry void

Re: Railgun.oxp now available

Post by Cmdr Wyvern »

DaddyHoggy wrote:
But it can only detect proximity on a per frame basis - so as Eric showed earlier if travelling a 3000m/s at 60fps the projectile moves 50m between frames - so how big a bang should it have to have any impact/effect at this maximum range? It stops being a dumb lump of metal at this point...
hmm...
Slow the slugs down?
The cons of that would be that the weapon would be more effective against big, slow or stationary targets. Not a problem if you use it to finish off freshly abandoned ships, or as an alternate mining tool.
Running Oolite buttery smooth & rock stable w/ tons of eyecandy oxps on:
ASUS Prime X370-A
Ryzen 5 1500X
16GB DDR4 3200MHZ
128GB NVMe M.2 SSD (Boot drive)
1TB Hybrid HDD (For software and games)
EVGA GTX-1070 SC
1080P Samsung large screen monitor
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Railgun.oxp now available

Post by Commander McLane »

Cmdr Wyvern wrote:
You know how missiles explode in proximity to the target? :idea: You could have the railgun projectiles detonate in proximity to your target - dealing small explosion damages within a very small radius, of course - similar to a missile warhead, though that would make them HE shells instead of slugs.
Which is why I don't want to do it. They are intended to cause damage entirely through collision.
Cmdr Wyvern wrote:
BTW, the wiki page provides a link only to version 1.0.
Version 1.1 is still in the workings. has been uploaded right now.

Changes:
- small scripting clean-ups
- inactive Thargons now count as kills
- new method of spawning the projectiles; they no longer create witchspace exit rings
- projectiles are now buyable immediately after the last one was fired
- reaction to attack while cloaked now also simulated
- made the railguns more expensive
Ganelon
---- E L I T E ----
---- E L I T E ----
Posts: 534
Joined: Fri Jul 02, 2010 11:45 am
Location: Around Rabiarce or Lasoce

Re: Railgun.oxp v 1.1 now available

Post by Ganelon »

One also has to remember that the railgun *is* a projectile weapon. Projectile weapons don't have the pinpoint accuracy of a laser. A physical hunk of metal is being mechanically loaded. It may have had some inconsistencies in it's manufacture in the first place, or might not load perfectly straight or may have gotten marred by the mechanism. The rails themselves are also subject to wear, they may warp a bit from heat (temporarily or permanently). So to expect it to do perfect shots every single time maybe simply isn't reasonable.

Clamp any firearm into a vise and shoot a dozen shots at a target and there will be some differences. It will give a pattern, or cluster of shots rather than all neatly going through the same exact hole. Make the projectiles move at a much higher rate of speed and at targets at distances that are typically over a km, and it stands to reason that some shots may miss, even if your aim is good.

Not being perfect on every shot does not keep the railgun from being an effective and useful weapon. It hits often enough to make it well worth packing, especially for Naval reserve work or bounty hunting and etc.

Another idea for Commander McLane: Being as it is partially a mechanical device, maybe there should be some chance of it jamming. Ideally that would be more likely when doing many shots in a short space of time, due to heat on the rails, but even a small flat percentage chance of one percent or less would reflect the possibility well enough for gameplay. A jam might result in just a delay of several seconds while the jammed round was being ejected or it might be something that could only be fixed in repair dock.

A thought on the mention of depleted uranium as a material for ammo. It's a nice idea in terms of density and fragmentation, but if I recall correctly, the electrical conductivity of uranium is considerably lower than that of say, aluminum. For a railgun to function, the projectile has to conduct electricity. So while uranium might seem a better notion because it is more dense, it might not work as well so far as weapon efficiency. Something like aluminum would also be fairly plentiful if one considers mining in space as a significant source of metals in the game. Aluminum takes little to refine from ore other than electricity, which could be considered already plentiful in the game.
Sleep? Who needs sleep? Got game. No need sleep.
User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6881
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Re: Railgun.oxp v 1.1 now available

Post by Disembodied »

Ganelon wrote:
A thought on the mention of depleted uranium as a material for ammo. It's a nice idea in terms of density and fragmentation, but if I recall correctly, the electrical conductivity of uranium is considerably lower than that of say, aluminum. For a railgun to function, the projectile has to conduct electricity. So while uranium might seem a better notion because it is more dense, it might not work as well so far as weapon efficiency. Something like aluminum would also be fairly plentiful if one considers mining in space as a significant source of metals in the game. Aluminum takes little to refine from ore other than electricity, which could be considered already plentiful in the game.
You could just put a slug of depleted uranium into an iron jacket. There could even be a device that can manufacture new ammo from a combination of minerals and radioactives.
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8501
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Re: Railgun.oxp v 1.1 now available

Post by DaddyHoggy »

A DU round with a Steel jacket would have easily be moved by the impetus induced by a rail gun (I built a linear accelerator when I was doing my physics degree - it was quite impressive/surprising how much oomph you could give relatively small amounts of conductive material...)
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Railgun.oxp v 1.1 now available

Post by Commander McLane »

Ganelon wrote:
Another idea for Commander McLane: Being as it is partially a mechanical device, maybe there should be some chance of it jamming. Ideally that would be more likely when doing many shots in a short space of time, due to heat on the rails, but even a small flat percentage chance of one percent or less would reflect the possibility well enough for gameplay. A jam might result in just a delay of several seconds while the jammed round was being ejected or it might be something that could only be fixed in repair dock.
This may be worth exploring further. I am a little reluctant, however, because jamming is nothing we know from other weapons in Oolite. It would be a new concept. But then again, the whole weapon is a new concept in the first place.

It was also mentioned that a railgun would be a maintenance-extensive weapon. The rails would have to be replaced regularly. I haven't yet looked into this from the scripting-side, but it's on the 'possible ways to go for future development'-list.
Ganelon
---- E L I T E ----
---- E L I T E ----
Posts: 534
Joined: Fri Jul 02, 2010 11:45 am
Location: Around Rabiarce or Lasoce

Re: Railgun.oxp v 1.1 now available

Post by Ganelon »

I've never personally played with actual railguns on an experimental level, just simpler items like coilguns. So I respectively withdraw the objection, in deference to voices of greater experience/knowledge on the matter.

So far as the jamming possibility, I was thinking of it mostly from a potential player drama perspective.

I have to say that there have been quite a few really good OXPs that have come out recently, but your railgun is definitely one of my favourites.

I had a friend visit last night and I was showing off an Oolite setup with Ramirez's Squadron Leader and your railgun (and a lot of eye candy OXPs). One of the first things he noticed was "Hey! Since when does Oolite have guns?" He asked if he could try it for a minute, so I explained the basics of the railgun and the squadron leader controls. About an hour later, after flying several "missions", he finally came up for air. From his comments, he found both OXPs to be "wild" additions to Oolite, but your railgun seemed to interest him the most. He usually plays VegaStrike, which is similar in some ways to Oolite, but (among other differences) has a rather large array of weapons to choose from.

The ability to switch between the laser and the railgun while in a fight really does add a dimension to dogfighting in Oolite. I like it quite a lot. It may be a new idea, but it certainly feels to me like it fits well.
Sleep? Who needs sleep? Got game. No need sleep.
Post Reply