Jump to content

ecat

Members
  • Posts

    301
  • Joined

  • Last visited

Everything posted by ecat

  1. Ooooo. That certainly looks like the one http://forum.kerbalspaceprogram.com/threads/38069-0-23-Davon-Throttle-Control-systems-mod-%28major-improvement-complete-overhaul%29 Congratulations, you win one Rotatron! I have it packaged ready to ship. Very fragile so thick and heavy packaging. Shipping will cost $18479. Edit: Annnnnnnd, just for good measure, here's a third thrust balancing mod http://forum.kerbalspaceprogram.com/threads/67270-Throttle-Controlled-Avionics-1-1-0-23 In general, if you have several engines around the CoM and some TWR to spare then I think these balancers are good idea. If you have a small number of engines or need to select only a small number of engines or have limited TWR etc, etc, then I think these are the situations where my CoM mod has an advantage.
  2. The only way I can change the angle is by using an Infernal Robotics Rotatron: put a CoM Cubic on the top half of the moving disk and somehow mount the engine to the bottom half of the moving disk. This will certainly change the angle as the CoM changes but I do not think the control will be fine enough ie it will sweep through too large an angle. Have a look at the engines from this pack http://forum.kerbalspaceprogram.com/threads/55985-0-22-01-Dec-Space-Shuttle-Engines-V0-8-Performance-and-smart-parts .Designed for shuttle use I believe they have a very large gimble range. Another thing to try if you have multiple engines is a thrust balancer. There are two such mods I'm aware of on the forum, sadly I can find only one... http://forum.kerbalspaceprogram.com/threads/28044-WIP-Plugin-KerbCom-Avionics-Analytical-engine-and-RCS-thrust-balancing I cannot say for certain if it works with 2.3. I'm offering a free, one previous owner, Rotatron to anyone who can point me at the other thrust balancing mod that used to be around here. Let me know how you get on. All my shuttle craft are either ugly or 'not really' shuttles so ideas are always welcome
  3. Just a little mod that fills a small niche, thank you for your kind words. The Mosquito is certainly fun and the video is linked in the OP. The idea behind the shuttle is to angle the engines so the thrust compensates for the imbalanced mass, are you asking for the engines to move along a plane or for their angle to change? If you can give me an example of what you are trying to achieve I'll certainly take a look.
  4. Still playing with Antimatter, a few points, sorry if they've been covered before: 1) I reiterate the problem of collecting AM when the collector and contaminant device are separated by docking ports. This may be a SQUAD/resource issue? 2) When I tell a contaminant device connected to one or more collectors to 'Stop Charging', something I can only do when it is empty, I expect it to remain in this state until I tell it start charging. I do not expect it to magically take control the situation and switch itself on. 3) Megajoules Power Management Display: When a containment device is 'Collecting' this display shows the power this device is consuming, it also shows this power added to the 'DC Electrical System' and so to the total Power Demand. ie an empty 3.5m containment device requiring 200kW ends up consuming 200kW as a storage tank + 200kW as part of the electrical system for a total of 400kW. Something that has been covered before: the VAB display. Please add a check box preventing it from appearing until requested. Also check out the MechJeb source for compact display modes and how to handle/prevent 'click through'. The latter especially could be copied directly from their code as iirc they freely copied it from someone else.
  5. Those are some mighty fine Archimedean screws you have there, stunning work.
  6. Heh. I was going for the promises of politicians: An infinitely renewable resource produced out of nothing therefore weighing nothing and requiring no storage, powerful enough to destroy entire countries yet cheap enough to be effectively worthless.
  7. I posted about the same problem yesterday so it's happened at least twice http://forum.kerbalspaceprogram.com/threads/43839-0-23-KSP-Interstellar-%28Thermal-Helper-Solar-Sail-Impactors-Fusion%29-Version-0-10-3?p=971495&viewfull=1#post971495
  8. There may be something up with gathering antimatter while not flying a craft and/or when the collectors and containment device are separated by docking ports. I'm using 10.3 but all(?) of the craft in question were originally created in 9.x something. All craft are in much the same 970km -ish Kerbin orbit. 1) A simple all in one craft, containment and 4 collectors. Antimatter increases when flying and when not flying the craft. 2) Bit of a beast with containment docked to two main arms which themselves dock to 12 collector arms each with 6 collectors. This behaves as expected when I'm flying the craft but gathers very little (ie, probably 0) antimatter when not the active vessel. 3) My pride and joy, containment docked to two main arms, the arms dock to a total of 9 collector arms (4 + 5), each collector arm has 12 collectors. This actually collects less antimatter per minute than 2) for some reason, it also collects antimatter only while it is the active vessel.
  9. Just a passing thought: Check out an oldish movie "The Man Who Fell To Earth" staring David Bowie for a glimpse of the treatment superior intelligences can expect - at least if they gain power and money.
  10. Interesting how all the replies appear to assume an AI would be driven by the same goals and ambitions as we humans which raises an interesting point: an AI willing to integrate into human society would have a much better chance of survival than one who wished to follow some totally different set of rules. Would we, are we even capable of, tolerating a second and totally separate dominant species? Would they want this, demand that, seek equality with a species that has and continues to make so many fundamental mistakes? I suspect a true intelligence would take either the survivalist route, doing whatever was necessary to integrate, or follow the idealist route, shunning the fallacies of engineered society no matter what the cost. Deciding survival is not the ultimate aim in life is just a change of perspective... Of course, if your entire mind can be saved away on a flash drive for later incorporation in a newer physical form survival takes on a whole new meaning. The emotions question deserves a quick mention. We humans place great stock in our emotions, a question I've not seen addressed is: why are they there? We are the product of evolution, emotions, and in the early days proto-emotions, must have granted some form of evolutionary advantage. Springing into existence without all those messy millions of years of natural selection I would be very surprised by an emotional AI, we find this a shocking thought yet we get through or daily lives without prehensile tails or countless other bits of evolutionary baggage. As for the prospect of an AI ever existing. If the human mind is really nothing more than the predictable firing of a sequence of neurons with a bit of random noise thrown in to spice things up then I certainly cannot see any reason some form of AI shouldn't one day exist. What was the question again? Humanities reaction? Mistrust, jealousy, fear and, for some, the desire to control, exploit and profit from. All the usual emotions in fact.
  11. There's not much to update at this time, unless someone reports a bug. With that said I have not tested with 0.23 yet, I'll go through that soon and if inspiration or bugs strike I'll see what I can do
  12. I'm not sure if threading the IO would would help much, it's worth trying but the OS may be threading in background? For my quick and very dirty test, I just chopped each texture in two and worked on the two halves in parallel... static int t1Height; static int t1Width; static int t1h; static int t1Index; static Color32[] newPixels; static Color32[] pixels; static Texture2D tTexture; static System.Object thisLock = new System.Object(); public static void ThreadCalcHelper1( ) { for (; t1h < t1Height; t1h++) { for (int w = 0; w < t1Width; w++) { Color32 c32 = GetPixel(pixels, tTexture, ((float)w) / t1Width, ((float)t1h) / t1Height, t1Width, t1Height); // lock (thisLock) newPixels[t1Index++] = c32; } } } public static void Resize(Texture2D texture, int width, int height, TextureFormat format, bool mipmaps) { //Color32[] pixels = texture.GetPixels32(); int origWidth = texture.width; int origHeight = texture.height; //Color32[] newPixels = new Color32[width * height]; int index = 0; tTexture = texture; //for (int h = 0; h < height; h++) //{ // for (int w = 0; w < width; w++) // { // newPixels[index++] = GetPixel(pixels, texture, ((float)w) / width, ((float)h) / height, width, height); // } //} t1Height = height; t1Width = width; t1h = (height / 2); t1Index = width * (t1h); Thread t1 = new Thread(new ThreadStart(ThreadCalcHelper1)); t1.Start(); for (int h = 0; h < (height / 2); h++) { for (int w = 0; w < width; w++) { Color32 c32 = GetPixel(pixels, texture, ((float)w) / width, ((float)h) / height, width, height); // lock (thisLock) newPixels[index++] = c32; } } while (t1.IsAlive) Thread.Sleep(0); texture.Resize(width, height, format, mipmaps); texture.SetPixels32(newPixels); texture.Apply(mipmaps); } Having two or more threads process each texture may be inefficient when processing small textures, other than that the workload is guaranteed to be more or less evenly split, so not a bad option and easy to implement. The biggest drawback, with caching in place it's of marginal benefit.
  13. I have a possible improvement for these extra slow files too, in fact it speeds up all of the initial file loads. By how much? It is system dependant but a simple implementation I'd guess would be good for a 30% improvement on compression time. Still, it is extra complication for something which the cache renders redundant on all subsequent loads and so may not be worth the effort. Thanks again rbray, it is wonderful to be able to play the game with all the mods and none of the crashing Boulder Co. I was there once on a short tour of the US. Of all the places I visited Boulder was the one that felt most like home. Beautiful countryside too
  14. Call that much faster???? I call it much, much, much faster Nice. And my Interstellar parts are now whiter than white again (or whatever colour they are supposed to be). Many thanks.
  15. Haha! See, you know what you are doing. I was just out to see how much time I could knock off the startup, while butchering as little of your code as possible . Either way, if my tests hold true, reducing the overhead by 80% has got to be worth the effort... I'd still like access rights confirmation on Linux/Mac and Win 'program files' directory.
  16. Cool. Here's some code you can play with static UInt32[] CRCTable = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d }; public static void Resize(GameDatabase.TextureInfo texture, int width, int height, TextureFormat format, bool mipmaps) { Texture2D tex = texture.texture; Color32[] pixels = tex.GetPixels32(); Color32[] newPixels = new Color32[width * height]; int index = 0; bool readFromCache = false; UInt32 origDataChkSum = 0; // // ecat // MD5 may be faster but the builtin accepts byte[] so the pixels array would need an additional conversion pass // foreach (Color32 pixel in pixels) { origDataChkSum = CRCTable[(origDataChkSum ^ (pixel.r)) & 0xff] ^ (origDataChkSum >> 8); origDataChkSum = CRCTable[(origDataChkSum ^ (pixel.g)) & 0xff] ^ (origDataChkSum >> 8); origDataChkSum = CRCTable[(origDataChkSum ^ (pixel.) & 0xff] ^ (origDataChkSum >> 8); origDataChkSum = CRCTable[(origDataChkSum ^ (pixel.a)) & 0xff] ^ (origDataChkSum >> 8); } // // ecat // for now you MUST MANUALLY CREATE the Cache dir // String fileName = texture.name.Replace('/', '+'); String pathStart = (KSPUtil.ApplicationRootPath + "GameData/BoulderCo/Cache/").Replace('\\', '/'); // UnityEngine.Debug.Log("ecat name " + fileName); // UnityEngine.Debug.Log("ecat path " + pathStart); // // ecat, load the texture from cache if available and has a matching checksum // if (File.Exists(pathStart + fileName)) { try { using (FileStream fs = new FileStream(pathStart + fileName, FileMode.Open, FileAccess.Read)) { using (BinaryReader br = new BinaryReader(fs)) { index = 0; UInt32 storedChkSum = br.ReadUInt32(); // UnityEngine.Debug.Log("ecat Cache O S " + origDataChkSum.ToString() + " " + storedChkSum.ToString()); if (storedChkSum == origDataChkSum) { for (int h = 0; h < height; h++) { for (int w = 0; w < width; w++) { Color32 c32; c32.r = br.ReadByte(); c32.g = br.ReadByte(); c32.b = br.ReadByte(); c32.a = br.ReadByte(); newPixels[index++] = c32; } } readFromCache = true; } // else // UnityEngine.Debug.Log("ecat Cache Missmatch"); // this may happen when a file is 'OUT OF DATE', whatever that may mean } } } catch { readFromCache = false; // in case of error force a rebuild } } if (!readFromCache) { if (texture.isNormalMap) { ConvertToUnityNormalMap(pixels); } int origWidth = tex.width; int origHeight = tex.height; for (int h = 0; h < height; h++) { for (int w = 0; w < width; w++) { newPixels[index++] = GetPixel(pixels, tex, ((float)w) / width, ((float)h) / height, width, height); } } // // ecat, save the texture to file // using (FileStream fs = new FileStream(pathStart + fileName, FileMode.Create)) // force create of new file { using (BinaryWriter bw = new BinaryWriter(fs)) { index = 0; bw.Write(origDataChkSum); // save checksum of origonal data so we can detect updated textures for (int h = 0; h < height; h++) { for (int w = 0; w < width; w++) { Color32 c32 = newPixels[index++]; bw.Write(c32.r); bw.Write(c32.g); bw.Write(c32.; bw.Write(c32.a); } } } } } tex.Resize(width, height, format, mipmaps); tex.SetPixels32(newPixels); tex.Apply(mipmaps); }
  17. Humm. I can think of reasons for loading all files from all directories under GameData, I can also think of reasons for being more selective. If you say all files under GameData are loaded I'll take you at your word but after a few quick tests I can find no trace of my 390MB of cache data when I run KSP. I'm using GameData/BoulderCo/Cache as my cache directory, no other sub directories, the file names have no extension, eg 'KWRocketry+Parts+Engines+3mTitanI+KW3mengineTitan1F1Emiss8bit' 'Squad+Parts+Aero+advancedCanard+model000' The data in the files would look like garbage to any self respecting image file loader, they contain a 32bit CRC (used to detected changes in the original unprocessed texture file) and a binary dump of the relevant newPixels[] array. I like to keep things simple, especially when I have no idea what I'm doing
  18. If all you are doing is loading files, which is mostly what Squad do, then adding a cache just means the files are loaded from a different location - no big saving. This mod does a lot of processing on some of the texture data. How much? If I comment out the data processing 'GetPixel' routine my load time goes from 2:30 all the way down to 1:15! That is a lot of time which can be saved, if it works on other systems.
  19. Excellent stuff, tyvm While I was waiting for the warp fix I did a little poking around. My test system was taking 2:30 to load: A small change to the way you do some of your calculations reduced this to 2:25 - lol. Splitting the GetPixel calls across two threads reduced the load time to around 2:08 - not bad I guess. Adding a simple cache mechanism (GameData/BoulderCo/Cache) reduced second and subsequent load times to 1:27 - now we are talking But I don't know if writing to the KSP data directories is generally 'a good idea' or if it will work on linux/Mac or even a standard ProgramFiles/Steam install. The changes are trivial but let me know if you'd like the code, it may save you some development time.
  20. By the end of my life many friends and most of the family I've grown up with will be lost or dead anyway. Better to spend life in pursuit of a worthy goal than worrying about sentimental nonsense. The vast majority of human beings I could ever have interacted with are already dead, many have been for centuries - this does not weigh heavy on my shoulders. Can you give me any guarantee that I will not be forgotten about, accidentally destroyed or rendered incapable/inconsequential if I choose to remain on earth? Is this the moral question you mentioned in the OP? On first read I did pause for thought but considering the vast majority alive today spend most of their lives following orders from governments, teachers, employers and that the vast majority alive today did not consent to this prior to birth... I see little in the way of a dilemma.
  21. ^^ This ^^ http://forum.kerbalspaceprogram.com/threads/28428-Orion-aka-Ol-Boom-boom (don't know if this works in 0.23) iirc the risk assessments at the time showed the project to be not quite harmless but not outside the bounds of reason. And once in orbit you have the capability for something approaching space flight instead of our current 'tin can bobbling along the gravity lines with scarcely enough fuel for the next manoeuvre' technology.
  22. 10 is indeed a rubbish number. I always thought it interesting that in English we count all the way to 12 before changing up the base: 12 is 'twelve', 13 is 'thirteen' is 3 + 10. It's as if the basic divisors were built into the language at a very early age. The French language implies a similar system at work but I don't know if they ever took advantage of it in practice. All the way to the divisible 16 which is 'seize' before switching to 17 which is 'dix-sept' which is of course 7 + 10. Anyway, units are only really useful for communicating ideas and have of course no effect on the quantity being measured. An example I feel we can all relate too: Using cubits to measure the dead body on the kitchen table does not make it any easier to dispose of.
  23. We have a winner The same also applies to 120 (or 12 * 10), 180 and 360 all vs the metric 'good for calculators and computers but a bit rubbish for pencil and paper' multipliers of 10,100,1000. Also, many practical examples of imperial based dimensions use fractional notation as opposed to our friend the decimal point... With a little practice, mental arithmetic using fractions is much more simple and far less prone to error than all the new, fangled decimal stuff. Where imperial falls down are the arbitrary looking associations eg inches to feet to yards to miles (furlongs any one?), even then, 3 feet to yard sounds odd but that makes 36 inches and the magical divisors apply once more.
  24. IIRC my worst case launches were about 1 hour real time to orbit, this certainly gives you an incentive to get it right
  25. heh. I went through a phase Loved the jet noise, loved the efficiency, hated the lag! I've just checked out the second craft in my previous post. 1992 parts! But only 850t which considering the payload is 11 jumbos + engines, almost 400t of that reaches orbit, yes, I love the efficiency
×
×
  • Create New...