[WIP] freighttrain

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

Moderators: another_commander, winston

User avatar
Rorschachhamster
---- E L I T E ----
---- E L I T E ----
Posts: 274
Joined: Sun Aug 05, 2012 11:46 pm
Contact:

[WIP] freighttrain

Post by Rorschachhamster »

I made something... :D

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... :shock:))*, 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. :oops: Look:
Image
from far away...
Image
press release... 8)

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. :lol: 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.
Image
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... :roll:

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. :wink:

* Look at the number of the brackets. I learned the hard way...

User avatar
GGShinobi
---- E L I T E ----
---- E L I T E ----
Posts: 291
Joined: Tue Dec 25, 2012 7:20 pm

Re: [WIP] freighttrain

Post by GGShinobi »

I haven't tested it yet, but it looks cool! Good idea!! :D
忍 knowing that enough is enough, you'll always have enough.

Running Oolite 1.77 on Ubuntu Linux 12.04 LTS

User avatar
Shipbuilder
---- E L I T E ----
---- E L I T E ----
Posts: 877
Joined: Thu May 10, 2012 9:41 pm
Location: Derby

Re: [WIP] freighttrain

Post by Shipbuilder »

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. :wink:
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"

User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6310
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: [WIP] freighttrain

Post by Diziet Sma »

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. :wink:) 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! 8)
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

User avatar
Massively Locked
Above Average
Above Average
Posts: 28
Joined: Tue Nov 20, 2012 12:20 pm

Re: [WIP] freighttrain

Post by Massively Locked »

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.

User avatar
Rorschachhamster
---- E L I T E ----
---- E L I T E ----
Posts: 274
Joined: Sun Aug 05, 2012 11:46 pm
Contact:

Re: [WIP] freighttrain

Post by Rorschachhamster »

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. :wink:) 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! 8)
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:
Image(from the italian wikipedia...)
With rotating wagons ... only then would trailer be adequate, wouldn't it? :) :wink:

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... :roll: :)

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));
and it should read like this:

Code: Select all

this.ship.position = trailer6.subtract(this.ship.vectorForward.multiply(410));
I looked at that before and didn't see it... :?

User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Re: [WIP] freighttrain

Post by pagroove »

Ubercool. Looking forward to the final release. But it will be in my Ooniverse when it's ready. :D
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
http://aegidian.org/bb/viewtopic.php?f=4&t=13709

User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6310
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: [WIP] freighttrain

Post by Diziet Sma »

Rorschachhamster wrote:Image(from the italian wikipedia...)
With rotating wagons ... only then would trailer be adequate, wouldn't it? :) :wink:
Wagons would still be correct usage. (Unless you planned to call it Space Truckers) :)
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

dschofield
Mostly Harmless
Mostly Harmless
Posts: 2
Joined: Mon Dec 10, 2012 1:32 pm

Re: [WIP] freighttrain

Post by dschofield »

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.

User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 13805
Joined: Sat Jul 04, 2009 9:31 pm
Location: Corke's Drift
Contact:

Re: [WIP] freighttrain

Post by Cody »

Hi dschofield and welcome aboard.

Our apologies for taking so long to approve your first post - I'll blame the forum software.

User avatar
Rorschachhamster
---- E L I T E ----
---- E L I T E ----
Posts: 274
Joined: Sun Aug 05, 2012 11:46 pm
Contact:

Re: [WIP] freighttrain

Post by Rorschachhamster »

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.
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... :roll: THIS is the dark side, oviously... :wink:

User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2298
Joined: Fri Jul 14, 2006 12:29 pm
Location: Wales

Re: [WIP] freighttrain

Post by Griff »

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 :D

User avatar
GGShinobi
---- E L I T E ----
---- E L I T E ----
Posts: 291
Joined: Tue Dec 25, 2012 7:20 pm

Re: [WIP] freighttrain

Post by GGShinobi »

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 :D
LOL :lol: :lol: :lol: :lol:

I wanna have them, too! Hope the framerate issues will be resolved! :P
忍 knowing that enough is enough, you'll always have enough.

Running Oolite 1.77 on Ubuntu Linux 12.04 LTS

User avatar
Rorschachhamster
---- E L I T E ----
---- E L I T E ----
Posts: 274
Joined: Sun Aug 05, 2012 11:46 pm
Contact:

Re: [WIP] freighttrain

Post by Rorschachhamster »

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 :D
Did that a lot... for testing purposes only, of course. "Run, little train, run!" :twisted: 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.

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. :lol:

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? :oops: :roll:
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... :wink:

User avatar
Shipbuilder
---- E L I T E ----
---- E L I T E ----
Posts: 877
Joined: Thu May 10, 2012 9:41 pm
Location: Derby

Re: [WIP] freighttrain

Post by Shipbuilder »

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.
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"

Post Reply