Jump to content

[1.0.4] Maritime Pack - 0.1.4


Fengist

Recommended Posts

Sails

I have very, very rudimentary sails working. I am able to apply a 'wind' and make them push a boat. In the image above, you're seeing some funky lines. Those are showing the thrust transform for the sail so that I can visually make sure I have them pointed in the right direction (I don't in that image). So... yes... sails will be eventually forthcoming.

Here's my ideas on how they should work and you're free to comment or give me other ideas.

Wind should not be a constant. The only other mod with 'sails' that I know of uses solar power. As long as they face the sun, they push the boat at a constant speed. Wind should not work that way.

Nextly, wind should not always be from the same direction. If you look at wind patters on the earth you'll see near the equator they flow east to west (generally) and in the upper and lower latitudes they flow from west to east. There's also some 'bending' of the wind direction near land masses.

What I envision is a table of various latitudes and longitudes on every planet that has water. I'm ballparking that at 100 locations. Each location will have a wind speed and direction assigned to it. When you drop a boat with a sail in the water, it'll look through the list of locations for the 3 closest ones. It'll then (based on some serious trig) guesstimate the wind speed and direction at the location of the boat. And, there should be also other random forces at play, like gusts and doldrums (break out the oars).

I also envision this table to be dynamic so that you'll never know exactly what to expect from the wind. It'll change based on other nearby wind conditions and will save those changes. Once you start sailing, your wind environment will be unique to you.

Finally, the sails should be linked to the throttle. As you increase the throttle, the sails lower and you get more 'thrust'. As you decrease the throttle, the sails raise and your speed slows.

What I have accomplished toward this goal.

I have wind... matter of fact (I'll show this in a video eventually) I've sailed off Kerbin and right past Jool. Lots of wind.

I have wind directions and speeds applied to the sails. Currently it calculates a bearing to the closest 3 known spots via an averaging. Here's a PHP version of the math I'm using.

I have a very small table of lats and longs and it's calculating local conditions (get this, it calculates the distance to the wind lats and longs via the great circle calculation... ooomf, more math.)

I have a thrustTransform so that anyone can make their own sails and, via the thrustTransform, show KSP where to apply wind.

Heh.... You might want to talk to Silverfox. He's been working on Wind for KSP for quite some time now. I'm sure an exchange of ideas would be beneficial for both parties here.

http://forum.kerbalspaceprogram.com/threads/96031-0-90-Kerbal-Weather-Systems%21-Alpha-0-5-3-WIP%21-%28Jan-2%29/page39

I was also thinking about the issue with going below 1k meters here. I have a feeling that could be worked around using the same method Pizzaoverhead used in FreeIVA to make other pod IVA's visible (some depth mask trickery). It's all Greek to me, I'm no coder but it never hurts to put some ideas on the table.

Edited by ThatOneBritishGuy...
Link to comment
Share on other sites

That's really cool! About time someone has made a submarine mod for KSP again. I was wondering if I could trouble you to make a part to act as a launch bay for nuclear missiles perhaps? (FOR THE MOTHERLAND)

Ok, I realize a lot of people just stumble on this thread so ya, I'll have to keep repeating myself. No biggie.

Nuclear missiles? Ummm no. My focus with this part pack is on 'civilian' pursuits.

But just thinking about it....

I seriously doubt that you could reach orbit, but punching a couple of tubes into one of the parts I've already developed and making a 'door' that opens in order to launch perhaps... a satellite, wouldn't be that difficult. It may be only one 'hole' since the sub is only going to be about 10m in diameter side to side and about 9m from top to bottom. It would be rather short and I'd make NO guarantees as to whether it would stay put while moving, diving, etc. But I'll think about it. And before you ask, making something like a 20 tube launcher... no... just... no.

But, I do have a helo pad on the brain to include if that makes you feel any better.

Right now, I'm trying to work out the math to get it to automatically come up with a neutral buoyancy and level out the keel... it's ummm... not proving to be easy.

Link to comment
Share on other sites

Ok, I realize a lot of people just stumble on this thread so ya, I'll have to keep repeating myself. No biggie.

Nuclear missiles? Ummm no. My focus with this part pack is on 'civilian' pursuits.

But just thinking about it....

I seriously doubt that you could reach orbit, but punching a couple of tubes into one of the parts I've already developed and making a 'door' that opens in order to launch perhaps... a satellite, wouldn't be that difficult. It may be only one 'hole' since the sub is only going to be about 10m in diameter side to side and about 9m from top to bottom. It would be rather short and I'd make NO guarantees as to whether it would stay put while moving, diving, etc. But I'll think about it. And before you ask, making something like a 20 tube launcher... no... just... no.

But, I do have a helo pad on the brain to include if that makes you feel any better.

Right now, I'm trying to work out the math to get it to automatically come up with a neutral buoyancy and level out the keel... it's ummm... not proving to be easy.

Yeah something like that was actually what I was wanting, I love making small rockets like the airlaunched pegasus. A satalite launched from a submarine would be even cooler no matter how small it would be.

Link to comment
Share on other sites

Ok, I realize a lot of people just stumble on this thread so ya, I'll have to keep repeating myself. No biggie.

Nuclear missiles? Ummm no. My focus with this part pack is on 'civilian' pursuits.

But just thinking about it....

I seriously doubt that you could reach orbit, but punching a couple of tubes into one of the parts I've already developed and making a 'door' that opens in order to launch perhaps... a satellite, wouldn't be that difficult. It may be only one 'hole' since the sub is only going to be about 10m in diameter side to side and about 9m from top to bottom. It would be rather short and I'd make NO guarantees as to whether it would stay put while moving, diving, etc. But I'll think about it. And before you ask, making something like a 20 tube launcher... no... just... no.

But, I do have a helo pad on the brain to include if that makes you feel any better.

Right now, I'm trying to work out the math to get it to automatically come up with a neutral buoyancy and level out the keel... it's ummm... not proving to be easy.

To be honest I'm probably just going to fill the damn thing with potatoes and make an island very slowly out of potatoes. Why? You know what I'm going to say :D

Link to comment
Share on other sites

To be honest I'm probably just going to fill the damn thing with potatoes and make an island very slowly out of potatoes. Why? You know what I'm going to say :D

This potato only generates 1.1v of electricity, i 'literally' don't have the power to lie to you.

Link to comment
Share on other sites

Hey - love the mod! I'm trying to do a fully-modded sandbox for my game at the moment (beat the Interstellar variant), so I figured if I end up wanting to make some sea vessels, then I need a good mod for it (I've had enough making sea-planes using obscene amounts of radial air intakes!). However, I'm getting a crash on start-up when downloading the Maritime Pack via CKAN. Here is my crash.dmp: https://dl.dropboxusercontent.com/u/50345936/crash.dmp and here is my error.log: https://dl.dropboxusercontent.com/u/50345936/error.log

Any clues as to the cause? I'll try it with no mods installed and see where the incompatibility is and I'll let you know.

Link to comment
Share on other sites

Hey - love the mod! I'm trying to do a fully-modded sandbox for my game at the moment (beat the Interstellar variant), so I figured if I end up wanting to make some sea vessels, then I need a good mod for it (I've had enough making sea-planes using obscene amounts of radial air intakes!). However, I'm getting a crash on start-up when downloading the Maritime Pack via CKAN. Here is my crash.dmp: https://dl.dropboxusercontent.com/u/50345936/crash.dmp and here is my error.log: https://dl.dropboxusercontent.com/u/50345936/error.log

Any clues as to the cause? I'll try it with no mods installed and see where the incompatibility is and I'll let you know.

Well, there's 2 things I can tell you and neither will probably help.

1. I've never 'uploaded' to CKAN or created a .cfg file. CKAN grabbed Maritime Pack off of Kerbalstuff.

2. The current version contains only parts, no .dll files. I know from experience that a part can crash KSP but it's usually a Kraken crash (stars, no planets) due to a bad value in the .cfg.

If it's crashing while downloading then (and I know every software company, programmer and their brother will do this) I'm gonna point the finger at either CKAN or KSP.

Now, what I suspect the problem is, is this:

92% memory in use.

0 MB physical memory [595 MB free].

0 MB paging file [4 MB free].

One too many mods. Maritime pack isn't that small at the moment. And most, if not all, of the graphics in the pack you're downloading are .dds files. Which means, they're compressed until loaded into memory, where they expand. So, whatever size you see the files in the directory as being... they get larger in ram.

Just a guess though. Without the actual KSP log file it's harder to tell.

- - - Updated - - -

That sub looks VERY cool, I am very excited for it

Thanks. This is without a doubt going to be one of the most complex creations I've put out. The bridge alone has 4 animations on it. Then, there's underwater camera code (which will be turned on and off via the bridge), code to help control all those animations and sync them with the throttle, sub control code to shut down intakes if you submerge and the throttle if you try to fly this thing... and then there's the code I've been working on for 3 days now... a 'computer controlled' neutral buoyancy system and an automatic keel leveling system and of course (every sub needs this) an emergency ballast blow.

But it's progressing. If you're interested in another submerged screenshot from a different angle, I posted one here earlier today.

Though I didn't mention it and I had the hud turned off, this is actually a test of the neutral buoyancy and the keel levelling. What you don't see is that the sub was in a slow horizontal decent (I just put on some extra ballast, there's no forward motion) until I reached about 10m from the bottom where I hit the button to automate neutral buoyancy. I'm happy to say it worked and worked really well. The other thing you don't see is that the automatic keel leveling had been keeping the vessel mostly level through that 'freefall' descent. The keel leveling though... Well, let's just say you better a. get it close to being level manually first and b. be patient. This sub pitches up and down like a pendulum and calculating the perfect balance takes some time.

Edited by Fengist
Link to comment
Share on other sites

Here's a cutting edge polar research vessel to give you some civilian design cues.

Cammell Laird in Birkenhead 'to build' polar research ship - http://www.bbc.co.uk/news/uk-england-merseyside-34504399

Nice looking boat. Extremely difficult to replicate as modular. I have however seen someone construct their own submersible launch crane (the u-shaped bar in the back).

- - - Updated - - -

Oh, and I noticed you ignored my post about using depth masks to try to remedy the issue with going under 1000 meters. I assume this means you don't have any plans to try and find a workaround? I'm just looking for a bit of confirmation here :)

I didn't ignore it, I've been contemplating. One of the big issues this sub will have is with the camera. While underwater and active, it'll pass right through terrain. Nobody I know of who's made an underwater camera has solved this. Nextly, there will already be one mask to handle the depth down to 1,000m. Dice uses two... a second one appears at 600m and is a sphere. Neither of these 'masks' prevent the camera from zooming out beyond them.

For now, my plan is to simply limit the depth of the sub to 1,000m. But, there will be a cfg file for this new .dll and in it, you can override that setting. The reason is, all stock planets have a visual bottom to the oceans at 1,000 even though the physical depth may be much deeper. Other mod generated planets may not have that fake bottom. For now, keeping the boat from going further down that 1,000 is going to be the easiest solution.

Link to comment
Share on other sites

I'm going to have to retract a previous 'possibility', namely launch tubes for the sub. After I'd created the part it dawned on me why it won't work. Stock physics.

For now, every part for the sub will be rather unique in that it will employ Firespitter's buoyancy. This also means that the unwater drag can be set for each part. Any part that isn't 'sub certified' in this manner will both, create a massive amount of buoyancy and a massive amount of drag. Basically, any part that isn't designed for the sub will have a huge effect on it's performance. Small parts, like lights, won't affect it much. Adding in a rocket... will be like tying a sea anchor to it.

So, for now, launch tubes are out but... I'm hanging onto the part. Once I get this next release out, one of the things I'm going to dig into is buoyancy. So far, none of the mods that tackle buoyancy that have been released are designed specifically for boats. They're designed for aircraft floats and crash landings. With any luck, I'm going to change that.

Link to comment
Share on other sites

What happens to visuals at depth in IVA?

I suspect the Free IVA mod, some decent optional RPM internals and some kind of sonar would make for quite the Das Boot experience.

You are probably correct. I have yet to work up the courage to attempt an IVA on this beast yet. As far as Free IVA or RPM... don't get your hopes up. But as for Sonar... hummmm..... That would take a lot of work.

Link to comment
Share on other sites

The IVA route is a way of sidestepping the camera issues. Maybe there's a way of making it the default view when you dive? Besides, at depth it'll be so dark you'll not see much anyway.

What's the major headache with IVAs, that makes them so hard to do? Would the cupola IVA suffice? My thinking is to produce something functional rather than pretty. If it's harder to do than fixing the camera issues, then nevermind.

Link to comment
Share on other sites

The IVA route is a way of sidestepping the camera issues. Maybe there's a way of making it the default view when you dive? Besides, at depth it'll be so dark you'll not see much anyway.

What's the major headache with IVAs, that makes them so hard to do? Would the cupola IVA suffice? My thinking is to produce something functional rather than pretty. If it's harder to do than fixing the camera issues, then nevermind.

There's a lot of work, fiddling, swearing and cursing associated with making IVA's, especially when your new to it. Thats why a lot of new modders either don't attempt cockpits, or use the stock IVA's as placeholders.

Link to comment
Share on other sites

The IVA route is a way of sidestepping the camera issues. Maybe there's a way of making it the default view when you dive? Besides, at depth it'll be so dark you'll not see much anyway.

What's the major headache with IVAs, that makes them so hard to do? Would the cupola IVA suffice? My thinking is to produce something functional rather than pretty. If it's harder to do than fixing the camera issues, then nevermind.

Well, here's the issues. IVA's are a pain in the ... nozzle. First reason being, they're inside out. Take for example the cargo bridge. I had to basically disassemble half of the cargo bridge and then, make the outside faces the inside faces. And that doesn't always work. Then, I had to reconstruct the back wall.. so now I'm working on the inside of a model which means I'm zoomed all the way in and trying to spin around. Next, you have to create the structure, the control panel, place the chairs, etc. and, if you don't already have them, each one is a completely separate part. You have to create them. Like the little voice pipe stuck to the ceiling. That is a separate part I had to create. The chairs... had to be created. The wheel, the radio, the radar, the sonar... all parts that had to be made and textured. Then, you have to place a 'transform' wherever the chair is to indicate that's where the Kerbal sits. Then, you have to go through KSP's part tools and start placing all the fun stuff, like switches that do nothing, buttons you can't push, the throttle, the compass, etc. And since your end user will be seeing this stuff close up, it has to be placed pretty accurately. Then, you have to create all the little things that make it look right, like the wheel, the radar, the notes to klean the head... etc. I just whipped out a basic part for the sub in about 15 minutes. That includes putting it in Unity, setting up the meshes and writing the .cfg file. An IVA... hours... and hours. I think it took me over 6 to create the one for the cargo bridge. And even then... I had another mess getting it positioned correctly. You'd think it would face in the same direction as the part... no.

Let me show you.

BridgeUnity.jpg

It took me over an hour just to get the bridge rotated right. Consider this. Every single time I want to test a part I have to exit out of the SPH, hit f-12 and reload the database. I make one change to the .cfg, and I have to do that again. If I'm writing a plugin, I have to go the long route and every single time I change it, I have to close out KSP and completely restart it.

And now, for the really fun part... when I ran the update the last time Unity came out with a patch, it completely wiped all of the KSP props (compass, switches, buttons, etc.) from the Unity save file. The bridge I have saved now only has the props I created (the chairs, the wheel, the notes, etc.)

I hope this gives you and idea as to why I have the huge aversion to IVA's. Plus, they're painful. I have a very old Oak desk. My forehead does not dent it in the least.

As for the sub IVA... I'm going to test it with a placeholder first, but I'm betting you won't see anything but black and blue. The bottom of the ocean, the really important thing you don't wanna hit because it's REALLY hard... is under the boat. Not something you can see. The only place a sub IVA will be of use... on the surface and then you might as well go IVA. You notice reals subs don't have windows.

Edited by Fengist
Link to comment
Share on other sites

I had a thought about launch tubes. Obviously underwater launches are impossible, but what about surfaced launches? Maybe have something like cargo bay masking code? After surfacing, you can then launch whatever you've got loaded, then back into the depths

Link to comment
Share on other sites

I had a thought about launch tubes. Obviously underwater launches are impossible, but what about surfaced launches? Maybe have something like cargo bay masking code? After surfacing, you can then launch whatever you've got loaded, then back into the depths

Already tried cargo bays, doesn't work stock. The problem isn't launching or where you launch. It's about being below the surface period. Any stock part attached to the sub when the sub is below the surface adds massive drag and massive buoyancy. Even in a cargo bay. The only way to get it to work is the way Dice did it. Completely kill stock buoyancy for everything... everything sinks. The only thing that floats are parts with his partmodule on them. I'm not quite ready to do that yet.

Link to comment
Share on other sites

So...everything about making IVAs is painful. I'm convinced :)

As far as windows are concerned, and considering the unapologetically civilian theme, I was thinking of science submersibles with bubble windows, used in combination with lights, hence my suggestion to use the cupola IVA. As Fengist says, there's a million other things his time could more productively be spent on.

Concerning drag, I'm guessing water doesn't work the same way as new aero, so stowing things in a cargo bay won't help reduce its drag underwater?

Link to comment
Share on other sites

So...everything about making IVAs is painful. I'm convinced :)

As far as windows are concerned, and considering the unapologetically civilian theme, I was thinking of science submersibles with bubble windows, used in combination with lights, hence my suggestion to use the cupola IVA. As Fengist says, there's a million other things his time could more productively be spent on.

Concerning drag, I'm guessing water doesn't work the same way as new aero, so stowing things in a cargo bay won't help reduce its drag underwater?

I attempted to add the Mk1 inline to the bridge. Unfortunately, it's just not going to line up right due to size differences. The cockpit ended up buried inside the bridge. I'd like to make an IVA for the sub... but like most of my plans, I have other things waiting in line.

Well, there will be an antenna on the bridge and I'd like to add science. But, again, Squad has kinda left the aquatic realm in the dark. I don't think there's more than 2 biomes anywhere around the ocean. But, there will be something akin to science. Once I get sails working, the sub, and those launch tubes, will have a rather unique purpose. I hope.. and this is a ways off so don't get your hopes up... to create something akin to the sonobuoy. A floating deployable buoy that will check the local wind conditions. I'm also considering how to add ocean currents so that boats and subs would have to fight those as well and this buoy may also track those.

One of the big, BIG problems early circumnavigators had rounding the tip of South American through the cape or the straights was that both the wind AND the current were coming from the west. Made a passage into the Pacific most challenging.

And since I'm already here. I completed a successful test of the helo pad and radial engine mounts. But, found some bugs in my code. But, this is a step closer.

SubHeloPadTest.jpg

This should give you a size comparison.

Edited by Fengist
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...