Jump to content

SalehRam

Members
  • Posts

    175
  • Joined

  • Last visited

Everything posted by SalehRam

  1. Referencing this post in GD I have managed to make this little class in C#, which will get an SFS file and turn it into nodes and subnodes, while maintaining an index for each node to allow modification and changes to its values... I thought I share the work with the community and get your feedback on this, I'm by no means a developer, but I take this as a hobby and interest, so I might (almost certainly) off the track for how devs do stuff, but at least it works... This is my first serious attempt with C# as well... Github link: https://github.com/salehram/SFSReaderClass/
  2. https://github.com/salehram/SFSReaderClass That's my mess... Might look awkward the way I did this, but I was just going through with my thoughts... The idea is you will get 2 references, one is visualized in the node tree, the other one is a sort of dictionary for the whole file. When an item from the tree is selected, there is an index for it, that index then will be matched from the other reference which also contain the line number of each line of the SFS file, that way, direct search and modifications are possible. a complete file rewrite can be done... There are few things that I need to complete yet, but this is about 90% of the work, and that is my whole POC project about this... I did it because it was fun - and to break the wall with C# Edit: I took the approach of looping through the file and looking for nodes start and ends rather than regex because I built all of this on the assumption that I know nothing about the format of the file and what standard if follows. I know that node titles are capitalized, and I know the main node titles (GAME, PARAMETERS, CAREER, VESSEL, etc...), but that was not enough for me... it is not like having a full documented standard like JSON, YAML or others... so I approached this as a completely unknown format and dealt with it based on that PS: Can I ask for this to be moved to the development forum now that it has a content relevant to there?
  3. About 6.5mb, it has about 313,000 lines as well I will include it in the github repository once I upload it
  4. Got something going... Will get it on Github once I get home, it is C# though (I thought why not get out of the box anyways and do something new all together). Basically, I take the file, read it line by line, index the nodes, and their sub-nodes. Using 5-d array, a treenode object to build the structure. I thought about using dataset, xml file, dictionaries, but the thing is, I could think about it easily done with a 5-d array like: [original line number in sfs file, tab spaces (/t), property name, property value, the index of the property in treenode] The brackets "{,}" are going to be ignored, and the node headers are not going to be included in the array as well. I'm now at the point of building the treenode structure, and once that is done, everything is done. Once that is completed, searching, through the array will be possible and I believe I can do anything with the content that I will get at the end. As for the memory usage, so far it goes up to 30mb, implementing the array will bump it another 60 or 90 mb, so I am talking about a total of 150mb
  5. First, I would go through the steps to do this from scratch is because 1. I enjoy it, 2. I tend to go to the "do it yourself" approach when I really and badly need a thing and not find it, at one point, I really needed to work with SFS files quickly and easily, and while I appreciate the tools that are available out there, my own criteria was still not satisfied... So, the idea I will work on is: Read the SFS file line by line, map every line in the file, then manipulate the whole file and convert it into something compatible with standard markdown formats (be it JSON, XML or whatever, though JSON for me seems easier). and link every line of the new file to the matching line of the original file When I finish working with the file, I simply merge the values of file with the original one based on the map and links I created earlier in the process... Because of the nature of this, I will need to use a tool (programming language) that I feel very comfortable with, and that is VB.NET as I know others, but I have been with VB/VB.NET since 1996. (as a hobby) I'll put the project on github later for contributions
  6. Just for the sake of sharing ideas and knowledge, these are my observations and idea about reading the sfs file as a JSON: Part of sfs file: GAME { version = 1.1.2 Title = DrMath (CAREER) Description = No description available. linkURL = linkCaption = Mode = CAREER Status = 1 scene = 5 editor = None flag = Squad/Flags/hexagon launchID = 47 modded = True envInfo = - Environment Info - Win32NT 7FFFFFFFFFFFFFFF Args: KSP_x64.exe - PARAMETERS { preset = Custom FLIGHT { CanQuickSave = True CanQuickLoad = True CanAutoSave = True CanUseMap = True CanSwitchVesselsNear = True CanSwitchVesselsFar = True CanTimeWarpHigh = True CanTimeWarpLow = True CanEVA = True CanIVA = True CanBoard = True CanRestart = True CanLeaveToEditor = True CanLeaveToTrackingStation = True CanLeaveToSpaceCenter = True CanLeaveToMainMenu = False } EDITOR { CanSave = True CanLoad = True CanStartNew = True CanLaunch = True CanLeaveToSpaceCenter = True CanLeaveToMainMenu = False startUpMode = 0 craftFileToLoad = } } } And an example of a JSON structure: {"widget": { "debug": "on", "window": { "title": "Sample Konfabulator Widget", "name": "main_window", "width": 500, "height": 500 }, "image": { "src": "Images/Sun.png", "name": "sun1", "hOffset": 250, "vOffset": 250, "alignment": "center" }, "text": { "data": "Click Here", "size": 36, "style": "bold", "name": "text1", "hOffset": 250, "vOffset": 100, "alignment": "center", "onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;" } }} So, I can load the sfs into memory (it is going to eat the hell out of the memory), then implement a function that will modify the text to match the JSON structure exactly, such as replacing the equal signs, adding quotation marks and value commas, etc... and then the remaining is easy for a JSON library... This is one approach, which I both like and dislike, as it will add some complexity and make some double work... Other approach, which I kinda prefer, is to write a function that will read the whole sfs line by line and determine the key and the value, then outputs it in an XML format... However, that will require more work but the result will be much more rewarding from the previous approach for me...
  7. Looking at JSON structure (which I am familiar with, but somehow I missed the very similarity with sfs), I think with some few manipulations to text after loading it into my application I can utilize standard JSON libraries to read the text
  8. Hello, I have asked this in the addons development forum but got no answer... So I woul like to know the format of the sfs save files, are they following a standard or is it just a format made up by squad? I need to know this as I am planning to do a small app using .NET that can work with sfs to do specific tasks that I could not find somewhere else... Thanks a lot!
  9. Hello I am looking to write a small app that I need for a specific purpose. To do that, I need to work the the sfs files. What is the structure of these files? I noticed they follow indent and node format, but it would be nice if they do this based on a standard with libraries or tools available to make working with them a bit easier... If not, then I will have to write the code myself to read the sfs nodes and headers... Thanks in advance Saleh
  10. I would say go hunt for asteroids... They are more PITA to rendezvous with than normal ships specially if they have a trajectory inside Kerbin SOI... Or maybe mess with aerobraking and atmospheric reentry, that will become very useful later in the advanced stages of your game... Maybe also build a modular space station now that you can dock stuff together, you can build an all purpose interplanetary ship that can go anywhere... For getting control back of your ship, maybe try the keys "[" or "]" switch to something other than your ship, then switch back to it, that should fix things if you cannot control it somehow. IF you are using REMOTETECH, then that is a different story, where you need an active antenna and an active connection to KSC or a command station to be able to control probes and unmanned ships...
  11. I have been playing KSP since 0.23, and I only gone out to Eve and Duna, and last planet was Moho after I was about to lose my brain... Moho was the most painful to get there, I only did it briefly on sandbox not career, so now I am preparing my career to do interplanetary trips again.
  12. Nah, it is not related to the planet, the body you are orbiting can only influence the orbital speed and altitude, but cannot affect the good separation distance which you can work in it to rendezvous... At the end, when you are chasing/meeting an object in orbit, you don't really care about anything other than your relative velocity, inclination and distance from that object, other things (assuming you don't over correct and fall into atmosphere/surface) are just data (aka: have no meaning for you yet at this stage) for this situation.
  13. 1000km is still very far away... usually rendezvous is considered possible when you get really really close like less than 50km or something... You need to play with maneuver nodes to get much more close encounter... Get yourself either in a higher orbit or lower orbit relative to your target and then place a meneuver node and play with it... dont worry if you need to complete multiple orbits before getting the close encounter you need... try to get something like 10km or less separation distance, then the tips we said above will help you reach your target... Also make sure your ascend/descend nodes are no more than 1 or -1 degrees this is important
  14. Doing the trick of pressing Z key then X quickly DOES change your current orbit numbers, so that will affect the current node. You can make an estimate of the burn time and assume it is a value between the multiple values you have seen, then execute the node based on that, then after you execute the node, make any required corrections not to far from the original location of the node... This is how I do it at least... If you are having RCS on, then turn it off before turning towards the maneuver node. RCS generates thrust when turning or rolling, thus affecting the upcoming node. Also SAS can have some effects, but not major like RCS...
  15. Did not read the other replies, but I am sure they are well explained and detailed, but my short and quick tips are: When you get really close to your target in orbit (such as 10km or around that range), your navball references will change to be related to your target velocity. If you are very close to your target, and your navball is still using your own orbit velocity as a reference, you can click the little box on top of the navball that shows what reference is the navball using (such as orbit, surface, or target). Once your navball is referring to your target, first make sure you burn retrograde (related to the target) until you get your speed to be 0m/s related to the target speed. Then point your craft to the target itself (the purple indicator on the navball), burn a little bit, this should set your prograde (relative to target) indicator on top of the target indicator. Make sure you don't go fast, for starters do it slow, like 10m/s or something, then keep watching your prograde indicator, it WILL drift, watch it as it drifts away form the target indicator. When you feel the drift is now large, you need to kill your relative velocity to the target, this will take you back to step 2, so go back to step 2 and repeat the circle until you get to meet your target. Hope these helps, this is how I did it once I wanted to learn rendezvous and docking. Once you master this, you can make your rendezvous faster with more practice and time... There is the mod Docking Port Alignment Indicator, which is an awesome docking mod, but I really don't recommend using mods for a thing until you know how it works without the mod, then use the mod to save time or have more controls or numbers at your screen. I only use this mod for large crafts dockings, but form medium/small ships, I just use the stock docking methods.
  16. Shallow re-entry, seems to be the best solution for me, I set PE between 45k to 55k, pitch to 60 degrees, and so far things were fine for me... I have been working on an MK3 crew transport SSTO, which so far was my best SSTO I ever built and the most successful one in control and overall performance... For cargo deliveries, I have not yet done anything, but I will experience with them in the next few days... Appreciate your input and the great discussion...
  17. The knowledge/information I learned about KSP are not about KSP itself, rather they are about my real life... Long introduction hidden, expand to know the back story for the talk below... KSP taught me that science is around us everywhere, it taught me to look at everything in a different way, before I play KSP, I used to hate every second I spent on an aircraft during travel, I hated every single second of my time driving a car, and more I hated to walk for a single second under the sun... But now, I await every potential chance and appointment to ride an air plane, just to feel how the air flows around that piece of metal, and I sit next to the wings just to watch the flaps, ailerons, and the "A.I.R.B.R.A.K.E.S" work, and I enjoy the sound of the engines after it was torturing my brain with its non stopping roaring. The landing time is my favourite time of the whole trip, I love it and I can feel the air outside hitting and lifting the body of the plane as I never imagined it before... I can now really see where our Earth is in space, how other planets move around our sun, and most of all, I realized that our horizon is actually vertical not horizontal as we see it from earth, I could never imagine myself sitting on the screen watching an eclipse and imagining it happening from a point of view not inside earth, but from outside it. Before I played KSP, I never felt the laws of physics so real like I do now... I am now badly looking and hoping to get a telescope (although it is not that easy here) to see more and more of the stuff I missed because of how we used to look/consider maths and physics here... I will make sure that I pass this knowledge to my children and help them not to waste their early creative years like I did.
  18. I have already tried having my AoA between all these values, from 90 down to 30 degrees, but still overheating... My atmosphere entry speed usually is about 2300m/s +/-... do I need to get it slower than this?
  19. Hello everyone, I have this bad time with a spaceplane I am trying to get it to re-enter Kerbin from an orbit ranging between 75k-75k to 90k-100k, things are fine up to the point I reach an altitude of 40k... The plane is using MK.1 cockpit, and MK.1 passenger cabin, with the rest of it using MK.2 fuel tanks... I am unable to lose enough speed with the reentry process, I set my PE to various heights while testing including 30k, 35k, and 40k, and when I hit the atmosphere at 69k, I do it with an AoA of 90 degrees... My only "semi-working" attempt was so far I keep the AoA to 90 as long as I can with my RCS, then once I hit below 50k, I just do massive pitch up/down as quick as I can to force more drag and speed bleeding... But this is very edgy process, as I get the cockpit dangerously overheated while I am doing that, and if I ease a bit on the pitching maneuvers (they are just crazy fast ups and downs), it just explode. I am wondering if there is no point of wasting time on MK.1 cockpit, as I feel it is very weak, and instead to use MK.2 cockpit... Appreciate your feedback and input! Regards
  20. I was looking for the full release notes, or list of changes and fixes... Can someone point me to that? I seem to be unable to find it around...
  21. Eve and Moho can be covered with the 60Gm dish I think (my last mission to Eve used the 60Gm one), Moho should be close as well, but make sure it can be covered with that dish, other wise use the larger ones. That's for the distance and appropriate dishes. But about the relay network itself... Have you considered a control station? build a station that can have 6 Kerbals, put lots and lots of power on it, use the RC-L01 core on it to turn it into a remote control capable. then put as many dishes as you can through docking ports - you will get a remote control modular station). It can save a lot of headache and effort, You can also have some passive antennas on it, and put satellites in higher and lower orbits to get as much connectivity as you can. For making satellites, I usually dedicate a satellite for each mission, usually 1 large dish, 2 small and 1 passive. And I don't care what orbit they are, I aim for the shortest orbital period, which can be achieved with very low orbits, 75km to 80km... Other insane approach (which I am working on it right now), is to place relay nodes all over Kerbin's surface... but that is INSANELY time consuming and NERVE CRACKING... but the result I am anticipating is: I will turn Kerbin into a giant satellite dish! I have only completed like 10% of it now, (the wide area around the KSC), with this and few satellites things are going to be fine for me...
  22. Just for the added information and if someone wanted more "ways" to find the locations: This is an awesome mode that will mark the location in flight without the need to go to map view.
  23. I think it is not about the graphics card... it is about the processor. The game uses 1 thread only, which means you are not really utilizing your CPU... I recently got a laptop with an i7-6700HQ, which has 4 cores, and I am still having some major FPS drops when I get into large crafts. I have another PC with Core2Quad 2.8GHZ and I got slightly better when I used the i7... so I guess until Unity5, we will have to be patient and maybe change the Max Physics Delta-Time per Frame setting for now. You can set the aerodynamics effects to lowest, and the rendering quality to lowest as well, that will help significantly, as I play KSP on my work PC sometimes, which has an i5 with 2 cores and an Intel HD graphics, but I can s till get some decent FPS on it with things set on lowest.
  24. Get some screenshots dude, they can provide lots of information so we can tell you where is the problem... (F1 on keyboard, files saved in game folder in folder called Screenshots). Until you get the screenshots, consider the following in your design: When you start going big (aka 2.5m), use struts to tie stuff together. Use fins on your rocket. If you see yourself going beyond 100m/s in the first 1000 meter, then SLOW-DOWN, you need to go fast, but not very fast as your rocket will not hold against gravity force and aerodynamics. Try to make gravity turns slowly and start turning slowly once you reach 50m/s. I do my turns starting from 50m/s and do them on 5 degrees every 5-10 seconds. just make sure you are doing them slow not to flip the whole rocket or blow it up. You can use 1 core orange tank + a Mainsail, + 2 radially attached 1 orange + x200-32 tank on both sides with 2 Mainsails on each of them, activate the radial ones first, then the core once you go high in atmosphere. Those will give you the required lifting safely, but make sure you monitor the ascent speed not to go super fast while low in atmosphere. Again screenshots are great And welcome to the party!
  25. I would leave the more detailed stuff for the other better guys than me... however one thing I would like to note... I would not use a Skipper in my lifter stage while I have already unlocked the Mainsail... maybe this is your main problem, try replacing the Skippers with Mainsails and adjust their thrust.to get your 1.5 TWR and I bet the whole rocket will be much better than it is now... Skippers are good in vac. but if you got an atmosphere stage with a place for 2.5m engine, use the Mainsail... Compare the Isp for both and you would see the difference. Isp is the thing that will make you choose an engine over another. Plus the Mainsail has better thrust than the Skipper already...
×
×
  • Create New...