Jump to content

0.90 Kerbal Weather Systems! Alpha 0.5.3 WIP! (Jan 2)


silverfox8124

Recommended Posts

I'm glad that you like it.

Vessel vessel = FlightGlobals.ActiveVessel;

Vector3 Up = vessel.upAxis.normalized;

This gives me the normal vector to the planetary surface i suppose. But how do i know which direction is north or east?

Regarding the other tips: thanks, yeah i might do that.

Regarding licensing: Oh well, your are right of course. GPL conflicts with All Rights Reserved. I did not intend that. Next version will be MIT license so you can reintegrate it if you want to. I have been stripping the last bits of your code. The result would be free of your rights. AFAIK you can only copyright specific implementations, not ideas.

Edit: New version is up.

Edited by DaMichel
Link to comment
Share on other sites

@DaMichel, here is the north and east:

Vector3 East = Vector3.Cross(vessel.mainBody.angularVelocity, Up).normalized;

Vector3 North = Vector3.Cross(East, vessel.upAxis).normalized;

Also, I'm quite sure you can't copy paste code, then delete it, then rewrite it to avoid copyright... So yeah... Also, because you did copy paste a giant portion of my code, it's not really your Intellectual Property, you just took an old version of mine and polished it, which is like taking art, recolouring it, and claiming it's now your own...

As for your "mod" which is really just an extension of mine, and tbh, I think when my mod gets going, what you have now should definitely be integrated into a building of sorts. Perhaps we could look at something from KerbTown, make our own facility model, and then just go from there, eh?

~SilverFox8124

- - - Updated - - -

@DaMichel, I don't know how much testing you've done with the wind, but in meteorology, a wind blowing North, is Southerly wind. The winds you have when I click North, I'm expecting it to go north, not be Northerly ;p. Also, if you're going to stick with the +- windspeed stuff, Please, oh please put in a Wind Zero button, or implement a "Remember" button, so that it "remembers" the current wind speed, then you can zero the windspeed out, then change direction of whatever, then click a button to bring it back to the "remembered" setting.

Again, despite how it may seem I am with the whole CR and Licensing stuff, I'm the only one of my kind doing this, and so far it's taken me 4-5 months to get where I am, I'm quite protective of it, and not only the countless hours I spent coding and testing, but the countless hours upon hours of research I put into it just to make sure I was giving you guys the most accurate weather I could give. *That's* what I'm protective about.

~SilverFox8124

Link to comment
Share on other sites

Also, I'm quite sure you can't copy paste code, then delete it, then rewrite it to avoid copyright... So yeah... Also, because you did copy paste a giant portion of my code, it's not really your Intellectual Property, you just took an old version of mine and polished it, which is like taking art, recolouring it, and claiming it's now your own...

You are right, my bad. Consider my code as contribution then. I will fix the license shortly.

As for your "mod" which is really just an extension of mine, and tbh, I think when my mod gets going, what you have now should definitely be integrated into a building of sorts. Perhaps we could look at something from KerbTown, make our own facility model, and then just go from there, eh?

Well, you can do with it whatever you want. And it is a significant extension. Can't argue about that either.

@DaMichel, I don't know how much testing you've done with the wind, but in meteorology, a wind blowing North, is Southerly wind. The winds you have when I click North, I'm expecting it to go north, not be Northerly ;p. Also, if you're going to stick with the +- windspeed stuff, Please, oh please put in a Wind Zero button, or implement a "Remember" button, so that it "remembers" the current wind speed, then you can zero the windspeed out, then change direction of whatever, then click a button to bring it back to the "remembered" setting.

I was thinking of the direction which the wind is reported in.

Again, despite how it may seem I am with the whole CR and Licensing stuff, I'm the only one of my kind doing this, and so far it's taken me 4-5 months to get where I am, I'm quite protective of it, and not only the countless hours I spent coding and testing, but the countless hours upon hours of research I put into it just to make sure I was giving you guys the most accurate weather I could give. *That's* what I'm protective about.

I'm sorry, i didn't mean to be disrespectful. I just want to have the freedom to do whatever i want to with the bits of code that i wrote and will write. So this project is finished. It has achieved the goal to get some specific wind going. If i ever get the urge to extend or change it, i'm just going to rewrite it without ever looking at the present code. That should be fine. Or it won't because chances are that it will look exactly like what i have now ... but at least i will have a clean conscience then :D

Edited by DaMichel
Link to comment
Share on other sites

@DaMichel, You are fine to look at my code for examples and help, but copy-pasting and claiming it is yours was my main worry.

However, when weather people say Northerly wind, it's wind going from North to South, it's always opposite of what you think, and when I click North on your GUI, I expect it to blow Southerly, unless stated somewhere that the wind comes from that location, I, as a general user, assume I want wind to blow north.

From what I see on the news, they don't say the -ly at the end, so I assume it is conveying to the viewer that the wind is blowing in that direction, unless they say "coming from the north east" in which case, it is North Easterly.

In the context of making a wind tunnel, perhaps we could look into Kerbtown, make our own model and spawn the ship in the place for testing and go from there?

~SilverFox8124

Link to comment
Share on other sites

Dear silverfox8124, would you put this file https://github.com/wased89/Kerbal-Weather-Systems/blob/master/KerbalWeatherSystems.cs under a permissive license, please?

This would be very awesome of you. The thing is, since you hold all the rights, you could just pull the plug by revoking any permission you gave me (?). I don't want that, obviously. Also when you stop playing the game, nobody can develop it further nor maintain it. This is obvious, but i'd like my stuff not to be forever lost when i disappear. In this case i mean the work that i did to extend and polish your original. :)

However, when weather people say Northerly wind, it's wind going from North to South, it's always opposite of what you think, and when I click North on your GUI, I expect it to blow Southerly, unless stated somewhere that the wind comes from that location, I, as a general user, assume I want wind to blow north.

From what I see on the news, they don't say the -ly at the end, so I assume it is conveying to the viewer that the wind is blowing in that direction, unless they say "coming from the north east" in which case, it is North Easterly.

It is confusing. I agree and it should be made more clear. I'm thinking a little arrow would do the trick.

About the wind tunnel idea: We? Err, to be frank, i have no plans for such an endeavor. Not devaluing your ideas. Your project is really cool.

Edited by DaMichel
Link to comment
Share on other sites

@DaMichel, Sorry, but I'm not changing the license on my project, Once you go from higher restrictive to lesser, there's no going back without repercussions. As I said before, I don't mind you using my code as reference, but copy-pasting and claiming as your own is something that doesn't go well with me.

On the note of no one developing it when/if I quit, yes, unless I change license before I quit, then I'll release a version under the new licensing and people can maintain it if they so please.

On the "We" note, you seemed interested enough on the wind aspect that you wanted to control the wind for testing purposes, so I thought you'd be interested in a wind tunnel kind of project, which is why I brought it up. Anyways, your mod extension could use a txtfield for wind speed, take a look at the Headmaster class under the storms section for the gui, you'll find a way of doing it there, also note how I empty the string on Awake(), without it, the textfield would fail for me.

With best regards,

~SilverFox8124

Link to comment
Share on other sites

Excuse me! I have given you credit from the very beginning and clearly stated that i based my work upon yours. Had i not been this honest then you could not even tell right now whether i started with your code or not.

To be honest again, i still believe that, by transforming your incomplete template into an actual functional mod, i created an original work which deserves to be protected under my terms. But i give you the benefit of doubt. Also i don't want to look like a thief.

Really this one file, which you are so protective of, is not much more than common boilerplate code. The nontrivial parts have been replaced. That would be a) the determination of the wind vector which was incorrect. B) The gui, which was in a state of being worked on, was replaced with something different. I do admit though that your code gave me a head start. You also benefited from the work of other people very obviously (EVE clouds). Of course this was published under a permissive license.

I changed the license statement according to your request. Are we cool that i still have permission to distribute my version? Proper credits will be given. Never intended anything else.

Link to comment
Share on other sites

@DaMichel, I am only stating my worry in such a situation, No matter how .... my work may have been, Im protective over it. I also cant change the license for a specific file.. on the note of EVE code, I talked with rbray before copying his code and I received explicit permission to do so. All I ask for is proper recognition. Your mod extension is kind of on a line of being able to have it's own thread, but not at the same time. That much will be up to you.

On note of you distributing, yes, as long as proper recognition is given and that line of license code is added into your license, then yeah we're cool.

There's still a bit more to add however, and I've been debating making my mod stock compatible, if I do, I'll send some code your way so that you too may benefit from it.

On another note, did you get the north east code in yet? And have you made an arrow for direction? If you ever need a visual way of debugging, I have a line renderer in my headmaster.cs in which you can use, it's quite helpful tbh.

~SilverFox8124

Edited by silverfox8124
Link to comment
Share on other sites

Vector3 East = Vector3.Cross(vessel.mainBody.angularVelocity, Up).normalized;

Vector3 North = Vector3.Cross(East, vessel.upAxis).normalized;

Note that that would give wrong results for any PF or Kopernicus planets that spin retrograde.

Link to comment
Share on other sites

I'm wondering, if I were to import my textures from EVE, as well as the config (using Better Atmospheres), should that work as I intend? I'm interested in trying this out, but I've already got EVE installed, so I'd probably have to remove it first as far as I can tell... thanks.

Link to comment
Share on other sites

@NO2, yes, you should uninstall EVE before installing my mod, otherwise there would be two cloud layers in one layer, or more layers than necessary, and that will poop on your computer's performance.

I figured as much. Is your system set-up to handle any EVE config for the cloud layers, or just the one specific one? If I were to remove the clouds from my EVE config and put them into your cloudLayers.cfg (same syntax and all), would it work? I have a few changes and custom textures that I'd like to keep if possible (well, the textures are easy, just overwrite the file).

Also I assume I could technically leave EVE installed for auroras/atmosphere effects if the above works, since EVE wouldn't be adding any cloud layers anymore. :P

Link to comment
Share on other sites

I also cant change the license for a specific file.. on the note of EVE code, I talked with rbray before copying his code and I received explicit permission to do so. All I ask for is proper recognition. Your mod extension is kind of on a line of being able to have it's own thread, but not at the same time. That much will be up to you.

Why do you think you cannot change the license for a specific file? I mean you put it under "All rights reserved". My interpretation of it is that you can do anything you want to. What is the legal state of my code right now anyway? Could be that i violated your copyright. Now it is very much different from your code. So whose property is it? If it was all yours - that would not be cool.

Easiest solution would be to just give me permission to put the code *which i have now* under the MIT license. Let me add an extra clause that credit shall be given to you. I'm quite liberal with giving credit. See my other mods. Don't worry.

I'm going to make a release thread this evening, i guess.

There's still a bit more to add however, and I've been debating making my mod stock compatible, if I do, I'll send some code your way so that you too may benefit from it.

On another note, did you get the north east code in yet? And have you made an arrow for direction? If you ever need a visual way of debugging, I have a line renderer in my headmaster.cs in which you can use, it's quite helpful tbh.

I don't really take requests. But yeah. If you have something interesting, just make a pull request.

Yes, i changed the code and managed to add a direction arrow using unicode symbols :) There are also a couple of more fixes.

Edited by DaMichel
Link to comment
Share on other sites

@NO2, I'm not sure about the custom textures, as long as they have the same file name and are in the same place as my own, it should work. Try it out and give it a see, I haven't experimented with custom textures and such just yet.

@DaMichel, It's fine by me if you release the code, as I've stated before, I am concerned about giving credit where credit is due (And I'm not saying you don't do it, I'm just re-iterating my concerns on the topic in general) As long as you link to this thread and have that license line I supplied you in with it, I'm all cool with it, and would be glad to help you if you have any more requests in regards to how about I went things, or how a certain aspect of my code makes sense, or how else it could be utilized. I'm quite glad to help when I can. And yes, you have my permission to put your code under MIT and add a clause that gives credit where credit is due.

Also, on a more general note. What kind of Memory space do you all have for KSP (windows 32 bit, Linux whatever), as I'm looking into making my code better and the such and sometimes the mod can take a few hundred MBs of RAM. If you all are tight on RAM space, then are you guys able to sacrifice CPU usage to make up for it? This is the kind of balancing I need to do the entire time to make sure that it's as optimal as can be for you all.

Sorry for the delay in releases, this update is going to be tricky to get right, and is already quite massive tbh.

~SilverFox8124

Link to comment
Share on other sites

And yes, you have my permission to put your code under MIT and add a clause that gives credit where credit is due.

Perfect. Thank you so much.

I'm using the 32 bit version, btw. 64 bit KSP didn't work properly in 0.25 and it is supposed have become even more unstable. CPU time is scarce. I usually don't have too much part mods at the same time so memory consumption is not so much of an issue. Hundreds of MBs is a lot though.

I suggest to offload the calculations into an extra thread. Weather simulation is perfect for that because there is virtually no interaction with the rest of the game. Tiny exception is that you need to get the wind speed at the craft location. It could run on an otherwise unused core. Synchronize the data only every few frames.

Edited by DaMichel
Link to comment
Share on other sites

@DaMichel, yes, multi-threading has gone through my head, and will eventually be thing I will do, in some form. I also found out that my grids aren't using much memory at all, but it is the textures that are using more memory than I'd like, with kerbin's being ~28MB each layer... So I will do some tweaking on that, and there should be less RAM usage by my mod. But going through and doing a bit of optimizing on my cells has brought down the memory usage a bit, which always helps.

EDIT: I have tuned down the resolution on Kerbin's cloud maps, this has freed up ~300MB of RAM, expect performance updates to come!

Edited by silverfox8124
Link to comment
Share on other sites

I LOVE the idea of this. :D

I can't really tell from what it says on the tin, though - can you tell it to just randomly generate random weather over time? Also - does this have an impact on worlds with atmospheres other than Kerbin?

Edited by Doctor Axel
Link to comment
Share on other sites

@Doctor Axel, No, Whimsical weather is NOT something I want to do. Weather should be predictable, follow patterns, laws and rules, you should be able to track it with accuracy and knowledge and experience. On the topic of weather on other planets, it won't be as accurate on say Duna than it is on Kerbin, mainly because we don't know as much about the climate of Mars as we do Earth. Some of the same concepts are still hanging around, but the atmosphere is highly different in it's molecular composition, and it makes it extremely hard for me to work with, given some of my formulas use the mass of dry air in moles.

*Choo choo* Hype train, there WILL be dust storms on Duna, in time I can promise you that that is one of my end goals of this, is to have dust storms like they do on Mars. Laythe will be quite interesting to do, but I'm still working on ways of making my code better and TOTALLY NOT THROWING NaN AT ME ALL THE TIME ARGH.

~SilverFox8124

Link to comment
Share on other sites

Dev Update!: After two days of bug tracking, darklight and I have found a way so that you guys don't have to worry about FAR versioning with the next upcoming release of KWS. If you want to use the previous FAR, then so be it, and newer versions of FAR that come out shouldn't require me to make an update.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...