[WIP] freighttrain
Moderators: winston, another_commander
- Rorschachhamster
- ---- E L I T E ----
- Posts: 274
- Joined: Sun Aug 05, 2012 11:46 pm
- Contact:
[WIP] freighttrain
I made something...
Freighttrain-not-even-alpha
Ok, after having no real idea about JavaScript and scripting in something newer than virtual basic and too much time at hand, I decided I want some freighttrains in my Ooniverse... so I looked at and took from quite a lot of scripts, mostly from Thargoid (YAH Mobile and Stellar Serpent, and the look-in-the-direction-of-the-target thing from TrackerCam (I still don't really know how Quaternions work... ))*, took a scripting sledgehammer, read a lot, and tried to get it to work. And it works. Mostly. As of now, I have a random number of trailers following a traction engine, wich is spawned near the a station at launch. Looks quite nifty, if I'm allowed to say so. Look:
from far away...
press release...
Launching twice will have funny results, I will have to script something that only one train is in a system at the same time. At least I know how to do that. ... Well, I know where to look. Thanks for the info on the wiki.
Ok, there's still a lot of work, and one thing in particular evades me (Quaternions), that is that the relative upwards orientation of the trailers should match the one from the traction engine.
It stays that way...
One rather hamfisted solution I considered would be to redesign the trailer to a design without UP, maybe even have it rotating... don't have the slightiest idea how and if that would interfere with the direction to the mother ship thing from TrackerCam...
Then theres AIs, but I think I can gather more than the rudimentary things I wrote/copied from looking at OXPs. It flees and cries for help if it is shot at. The released version will propably need a number of escorts.
Ideas/hints/comments how to do the script better and more stable (I had one trailer disconnected once, even though it worked later on flawless...) are more than welcome. Just take a peek and delete the OXP afterwards.
* Look at the number of the brackets. I learned the hard way...
Freighttrain-not-even-alpha
Ok, after having no real idea about JavaScript and scripting in something newer than virtual basic and too much time at hand, I decided I want some freighttrains in my Ooniverse... so I looked at and took from quite a lot of scripts, mostly from Thargoid (YAH Mobile and Stellar Serpent, and the look-in-the-direction-of-the-target thing from TrackerCam (I still don't really know how Quaternions work... ))*, took a scripting sledgehammer, read a lot, and tried to get it to work. And it works. Mostly. As of now, I have a random number of trailers following a traction engine, wich is spawned near the a station at launch. Looks quite nifty, if I'm allowed to say so. Look:
from far away...
press release...
Launching twice will have funny results, I will have to script something that only one train is in a system at the same time. At least I know how to do that. ... Well, I know where to look. Thanks for the info on the wiki.
Ok, there's still a lot of work, and one thing in particular evades me (Quaternions), that is that the relative upwards orientation of the trailers should match the one from the traction engine.
It stays that way...
One rather hamfisted solution I considered would be to redesign the trailer to a design without UP, maybe even have it rotating... don't have the slightiest idea how and if that would interfere with the direction to the mother ship thing from TrackerCam...
Then theres AIs, but I think I can gather more than the rudimentary things I wrote/copied from looking at OXPs. It flees and cries for help if it is shot at. The released version will propably need a number of escorts.
Ideas/hints/comments how to do the script better and more stable (I had one trailer disconnected once, even though it worked later on flawless...) are more than welcome. Just take a peek and delete the OXP afterwards.
* Look at the number of the brackets. I learned the hard way...
Re: [WIP] freighttrain
I haven't tested it yet, but it looks cool! Good idea!!
忍 knowing that enough is enough, you'll always have enough.
Running Oolite 1.77 on Ubuntu Linux 12.04 LTS
Running Oolite 1.77 on Ubuntu Linux 12.04 LTS
- Shipbuilder
- ---- E L I T E ----
- Posts: 877
- Joined: Thu May 10, 2012 9:41 pm
- Location: Derby
Re: [WIP] freighttrain
Great idea and I really do like the look of this ship.
Scripting is not really one of my strengths at the moment so I will leave the scripting comments to those with more knowledge but I just wanted to say how I like the style of your ships.
Scripting is not really one of my strengths at the moment so I will leave the scripting comments to those with more knowledge but I just wanted to say how I like the style of your ships.
The GalTech Industries Corporation - Building ships to populate the galaxies.
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
- Diziet Sma
- ---- E L I T E ----
- Posts: 6312
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: [WIP] freighttrain
That looks totally awesome! (apologies for using that much-abused term, but in this case it's deserved)
<pedantic_ex-railways_freightclerk_mode>
The only thing I'd suggest is that the engine should look distinctly different from the trailers (although if you want to go with the train theme, they really should be called wagons. ) By all means use a similar livery and style as the trailers, but a freight-engine should look like an engine.
</pedantic_ex-railways_freightclerk_mode>
This is so having a place in my Ooniverse!
<pedantic_ex-railways_freightclerk_mode>
The only thing I'd suggest is that the engine should look distinctly different from the trailers (although if you want to go with the train theme, they really should be called wagons. ) By all means use a similar livery and style as the trailers, but a freight-engine should look like an engine.
</pedantic_ex-railways_freightclerk_mode>
This is so having a place in my Ooniverse!
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
- Massively Locked
- Dangerous
- Posts: 84
- Joined: Tue Nov 20, 2012 12:20 pm
Re: [WIP] freighttrain
This is very cool! The only problem I had with it was that it killed my framerate (down to about 5). I would definitely like to see you continue developing this.
- Rorschachhamster
- ---- E L I T E ----
- Posts: 274
- Joined: Sun Aug 05, 2012 11:46 pm
- Contact:
Re: [WIP] freighttrain
Thanks! Speaking German myself, I wasn't sure if the term "wagon" would be right. And I already started a second model of an engine, if I can't get the orientation thingy right, I will go for something more like this:Diziet Sma wrote:That looks totally awesome! (apologies for using that much-abused term, but in this case it's deserved)
<pedantic_ex-railways_freightclerk_mode>
The only thing I'd suggest is that the engine should look distinctly different from the trailers (although if you want to go with the train theme, they really should be called wagons. ) By all means use a similar livery and style as the trailers, but a freight-engine should look like an engine.
</pedantic_ex-railways_freightclerk_mode>
This is so having a place in my Ooniverse!
(from the italian wikipedia...)
With rotating wagons ... only then would trailer be adequate, wouldn't it?
MAYBE I'll redo the one I have, too... and try to get them work alongside, so you could have both! On the other hand... this would be even worse for the framerate...
@ML: Yeah, I figured as much (but forgot to remark it), as it is quite cumbersome, graphicswise and in scripting, for slower machines. Maybe try turning the smooth off in the shipdata.plist, don't know wether that helps.
Still a long way to go...
EDIT: Oh, and I found out why trailers (or wagons?) after number 6 would be left behind and fixed it. In the trailer.js there is in line 106
Code: Select all
this.ship.position = trailer6.position.subtract(this.ship.vectorForward.multiply(410));
Code: Select all
this.ship.position = trailer6.subtract(this.ship.vectorForward.multiply(410));
- pagroove
- ---- E L I T E ----
- Posts: 3035
- Joined: Wed Feb 21, 2007 11:52 pm
- Location: On a famous planet
Re: [WIP] freighttrain
Ubercool. Looking forward to the final release. But it will be in my Ooniverse when it's ready.
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
- Diziet Sma
- ---- E L I T E ----
- Posts: 6312
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: [WIP] freighttrain
Wagons would still be correct usage. (Unless you planned to call it Space Truckers)Rorschachhamster wrote:(from the italian wikipedia...)
With rotating wagons ... only then would trailer be adequate, wouldn't it?
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
-
- Mostly Harmless
- Posts: 2
- Joined: Mon Dec 10, 2012 1:32 pm
Re: [WIP] freighttrain
I'm new to all this, but had been thinking about something on the same lines... Making your ship the "wagon" and doing missions to deliver a trailer (or trailers) to a destination.
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: [WIP] freighttrain
Hi dschofield and welcome aboard.
Our apologies for taking so long to approve your first post - I'll blame the forum software.
Our apologies for taking so long to approve your first post - I'll blame the forum software.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!
- Rorschachhamster
- ---- E L I T E ----
- Posts: 274
- Joined: Sun Aug 05, 2012 11:46 pm
- Contact:
Re: [WIP] freighttrain
I thought about doing, perhaps, if I find the time, some missions, too... something like that would be a possibility but probably not so easy to do... hm... maybe an equipment that allows you to catch lost wagons (@Diziet Sma: Yes, I renamed them! And I'm working, just for fun, on a new engine after having googled pictures of futuristic trains...). Or asteroids, or even abandoned ships... THIS is the dark side, oviously...dschofield wrote:I'm new to all this, but had been thinking about something on the same lines... Making your ship the "wagon" and doing missions to deliver a trailer (or trailers) to a destination.
- Griff
- Oolite 2 Art Director
- Posts: 2483
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
Re: [WIP] freighttrain
Woah, those look fantastic! Really amazing design- these are going to look amazing travelling through the system, they also look really explodable, dobt i could resist firing a missile or two at them just to see them all explode
Wiki homepage for my OXP: http://wiki.alioth.net/index.php/Griff_Industries
Re: [WIP] freighttrain
LOLGriff wrote:Woah, those look fantastic! Really amazing design- these are going to look amazing travelling through the system, they also look really explodable, dobt i could resist firing a missile or two at them just to see them all explode
I wanna have them, too! Hope the framerate issues will be resolved!
忍 knowing that enough is enough, you'll always have enough.
Running Oolite 1.77 on Ubuntu Linux 12.04 LTS
Running Oolite 1.77 on Ubuntu Linux 12.04 LTS
- Rorschachhamster
- ---- E L I T E ----
- Posts: 274
- Joined: Sun Aug 05, 2012 11:46 pm
- Contact:
Re: [WIP] freighttrain
Did that a lot... for testing purposes only, of course. "Run, little train, run!" But they are really robust, it takes one and a half turns with a military laser to blow one. Just like a train wagon is a lot more robust even than a truck... and try to not bumb into them. They have a greater density than normal ships.Griff wrote:Woah, those look fantastic! Really amazing design- these are going to look amazing travelling through the system, they also look really explodable, dobt i could resist firing a missile or two at them just to see them all explode
Didn't do a lot scripting, but they spawn randomly on the wp - station aegis route now - plan is to make the script to scan for stations (oxp and otherwise) and put them on a random route... so you don't see one everytime on the usual way into the system. And escorts, of course, wich is obviously a must. Last time, I saw one, it was just three lost wagons.
Framerate... I just realised, after having made a gorgous model with a lot of combined objects, I did my wings3d ships with all internal faces of combined objects intact. This means there are a lot of unnecessary faces, that you won't see at all... Does anybody now a quick way to delete them?
If not, I will probably have to do them all over again... And I really have to look into shaders and all that stuff... especially decals with logos from YAH would be cool...
- Shipbuilder
- ---- E L I T E ----
- Posts: 877
- Joined: Thu May 10, 2012 9:41 pm
- Location: Derby
Re: [WIP] freighttrain
You can define these hidden faces as holes.
To do this select the face or faces that you want to hide, right click and select hole.
Hope that this helps.
To do this select the face or faces that you want to hide, right click and select hole.
Hope that this helps.
The GalTech Industries Corporation - Building ships to populate the galaxies.
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"