Jump to content

Search the Community

Showing results for tags 'programming'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Announcements
    • Welcome Aboard
  • Kerbal Space Program 2
    • KSP2 Dev Updates
    • KSP2 Discussion
    • KSP2 Suggestions and Development Discussion
    • Challenges & Mission Ideas
    • The KSP2 Spacecraft Exchange
    • Mission Reports
    • KSP2 Prelaunch Archive
  • Kerbal Space Program 2 Gameplay & Technical Support
    • KSP2 Gameplay Questions and Tutorials
    • KSP2 Technical Support (PC, unmodded installs)
    • KSP2 Technical Support (PC, modded installs)
  • Kerbal Space Program 2 Mods
    • KSP2 Mod Discussions
    • KSP2 Mod Releases
    • KSP2 Mod Development
  • Kerbal Space Program 1
    • KSP1 The Daily Kerbal
    • KSP1 Discussion
    • KSP1 Suggestions & Development Discussion
    • KSP1 Challenges & Mission ideas
    • KSP1 The Spacecraft Exchange
    • KSP1 Mission Reports
    • KSP1 Gameplay and Technical Support
    • KSP1 Mods
    • KSP1 Expansions
  • Community
    • Science & Spaceflight
    • Kerbal Network
    • The Lounge
    • KSP Fan Works
  • International
    • International
  • KerbalEDU
    • KerbalEDU
    • KerbalEDU Website


There are no results to display.

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL



About me



Found 22 results

  1. kOS Scriptable Autopilot System v1.4.0.0 for KSP 1.12.x (This is a continuation of the old thread about the kOS mod: ( 1.2.2 kOS scriptable autopilot system ).) kOS (Kerbal Operating System) is an autopilot you script yourself. kOS is to programming, what Kerbal Space Program itself is to rocket science. You don’t have to know what you’re doing to get started, but you may find yourself learning a lot by accident as you play with it. And if you already know a lot about programming, it will still be able to hold your interest. kOS is meant to scale with the skill level of the user. You can start off doing very small simple things with it, and get more and more into using its features as you go. Example: print "Launching". lock steering to heading(90,80). lock throttle to 1. stage. wait until altitude > 5000. lock steering to heading(90,60). wait until altitude > 15000. lock steering to heading(90,45). wait until altitude > 25000. lock steering to heading(90,30). until apoapsis > 80000 { print "apoapsis is " + round(apoapsis,0). wait 0. } lock throttle to 0. // ..etc... What it does kOS introduces a few new parts that each contain a simulated computer capable of running programs written in its own scripting langauge called kerboscript. The computer has powerful smarts built in to the hardware that allow it to do complex spacecraft operations in one command, thus making it possible to make complex programs with only a few lines of script text. The intent of kOS is to be a fully in-game item that lives inside the Kerbal’s universe. The program isn’t running on your own gaming computer, but rather it’s being run in a virtual machine that is simulated in the underlying Unity engine. History kOS was originally begun as a mod by a single author, Kevin Laity aka Nivekk. Although the project has undergone massive changes since then and now has a very different underlying archetecture and is under active development by a different set of people, none of that would have been possible without his original vision and work. Changelog Source Downloading: From Curse From SpaceDock Direct from the GitHub Project
  2. I'm adopting a collection of extensions to kOS that I've found useful and fun: kOS-StockCamera (Adopted from @hvacengi) Allows kOS to control the flight camera and map camera. Documentation: https://github.com/JonnyOThan/KOS-stockcamera#description Download: https://github.com/JonnyOThan/KOS-StockCamera/releases License: GPLv3 kOS-EVA (Adopted from @Ger_space) Allows kOS to control kerbals on EVA. Documentation: https://github.com/JonnyOThan/KOS-eva#kos-eva Download: https://github.com/JonnyOThan/kOS-EVA/releases NOTE: depends on harmony. License: MIT kOS-SCANSat (Adopted from @Ger_space) Allows kOS to interact with SCANSat. Now with anomaly detection! Documentation: https://github.com/JonnyOThan/KOS-scansat#kos-scansat Download: https://github.com/JonnyOThan/kOS-scansat/releases License: MIT kOS-Career (NEW!) Allows kOS to interact with career mode elements like contracts, building upgrades, and the tech tree. Documentation: https://github.com/JonnyOThan/KOS-career#kos-career Download: https://github.com/JonnyOThan/kOS-Career/releases License: GPLv3
  3. Hi, I know this might be somewhat controversial, but please hear me out first. I love automating things. I spent hundreds of hours in games like Factorio and Dyson Sphere Program and I have also tried to automate different things in KSP 1. As an example, automation is great for things that need to be perfectly repeatable (like an ascent with a specific profile) or that are hard to do manually (like suicide burns). The best way to script it in KSP 1 right now is to use kOS but I think there might be a better option. While waiting for KSP 2 I decided to try SimpleRockets 2 (by the way, it's a cool game, go try it out). So I opened the game, downloaded a cool-looking Atlas V and was blown away by what happened next. The rocket knew how to put its upper stage into orbit not just around its home planed but also its moons at a desired altitude! Turns out, SR2 has a built-in visual scripting language called Vizzy you can use to write programs like that. I decided to try it out and just in a few hours I had two programs for performing ascent and landing for me. Here's how the language looks: SR2 blog post about Vizzy. This could also be used to complement new tutorials by showing not just a video but an actual rocket flown by a computer to teach new players. And yes, all this can (and has) been done before but I find the experience of using something like kOS far from perfect: you need to install the mod, learn a new scripting language, constantly switch to an external text editor, launch scripts from the command line and debugging is often a pain. If implemented correctly, built-in scripting can improve the player's experience, especially if scripts could be shared through the Steam Workshop for those who don't want to code themselves. And hey, it's not a bad thing either if someone learns how to code a bit while playing KSP 2! And the good thing is, you don't have to reinvent the wheel. This has already been done in SR2 and it works great there. So what do you think?
  4. It's another controversial topic, but I know everyone is open to discussions, ideas and suggestions. So let's just assume that KSP2 will have a simple visual programming language like Vizzy in SR2 that also plays well with the Journey Planner. I think this would allow adding a feature (stock or as a dificulty setting) that would make the game even more interesting: (manned craft or ground support = command stations <-> unmanned craft) communication delayed by the light-speed limit of causality. Let's have an open mind and think about it. Manned craft would be controlled in real-time as usual, but it would take some time for scientific results to be transmitted to the network of colonies. This has a small impact on tech progression if experiments would also take time to run as implemented in Kerbalism. Besides, we can always time warp to get the science points. Manned craft would be even more important because they could allow the control of probes in proximity: this is motivation to create space stations, colonies closer to unmanned mission destinations. Unmanned craft would be pre-programmed, re-programmable and remotely controlled with distance-proportional-delay and using limited information (using data from hull cameras, telemetry, sensors, science and other instruments). This could also mean implementing a Probe Control Center, like an instruments deck similar to IVA view. Previous point means also that early in the tech tree only manned craft would be able to see a direct close-up real-time interactive detailed view of celestial bodies. So there would be a bigger motivation to send actual exploration crew and would ensure gradual discovery of celestial bodies. Unmanned craft would be useful but limited, dispensable, even launch-and-forget - not as important as manned missions. This means a faster rhythm of craft iteration and discovery. It really ties in nicely with reusable craft, logistics automation, and delivery routes system. I think the game would have a lot to gain from giving the player learning experiences: "I hope I did a good job and everything works, because it's out of my real-time control now - I just get the instruments info and watch the show" "I messed up the programming, but I will learn from the mistake and do better next launch" (just read how hard it was to send successful missions to Mars) "I learned basic programming" "I found a mistake during the mission, I can't control the probe in real-time, but I can update the software" "I need to send crew to be able to control in-proximity probes in real-time" "99% of the work is in design and testing - after launch we hope for the best" And I'm sure there would be a lot of interesting variation and emergent gameplay from this. Long live RemoteTech! Unleash it with visual programming!
  5. I think it would be great to heave the ability to programm tasks for the Spaceship to perform... IN ADDITION to the action groups. When you want to design a Capsule that lands in water with parachutes but also got retro thruster to slow the landing. It would be cool to be able to programm the task to ignite the thrusters when reaching a specific height. For example 5 metres above surface height. It would also be great to add the possibility to perform a specific action after a certain number of time. Just like detaching two boosters + disabling the engine (like an action group) so the boosters can separate peacefully and after 2 seconds reigniting the engine. It could also be some kind of extension to the action groups as we know them. Also in terms of automation it would be cool to heave. When you install a mod that adds a real Soyuz Capsule it has to ignite its retro thrusters. I just thought I want to open this thread. I think it would be a nice idea wich can really make some things easier. If it really is a great idea, I would be extremely happy to see it in KSP 2.
  6. I found a potential bug in kOS, where I try to create a maneuver node from a list of four values, and it returns the error "Cannot iterate on an object of type kOS.Safe.Encapsulation.ScalarIntValue. What's going on?
  7. I'm trying to revive someone else's kOS code for rover pathfinding using A*, but their code is so messy I can't make heads or tails of it. Can someone help me? The Reddit post featuring the code is here:
  8. [Edit: For the updated stand-alone version of this tutorial, go here] So I started off getting my video recording & editing software back so I could make an animated GIF for reddit to showcase my robotics powered rover deployment system. But of course I ended up remembered how much fun doing videos can be, and wanted to share the method I found that took my programming time from 3+ hours to less than 1, so the 6+ hours I'd spent programming the arm & doing a comedy showcase GIF ended up spiraling into another 8+ hour editing session. I think it's my most polished video thus far; spent sooo much time working on the timing and ironically half way through editing I realised that if I used THE SAME METHOD that worked so well for the robotics programming I'd be done already. It was nice though, got the last bit done far faster ^^ Well, enjoy, I hope it is useful!
  9. I have Asperger even if I was kid I was suspected (wrongly) that I have ADHD I could not learn the multiplication table, which was required in my country, Poland I can not do it until today, and I am almost 33 years old I often flunk math I could make calculations, but only with the help of a calculator. I remember once from boredom I started playing with a calculator and started to add numbers to each other. The teacher saw it and asked what I was doing? I apologized to him, and I said I was just having fun. This teacher said that I was just doing the Fibonacci sequence, do not even know it, and that I would not put crap on him, that I do not know mathematics, because from what I see it could be quite a good mathematician xD One of my friend who is also having Asperger advised me to learn to programming in Python, that is the easiest programming language to learn. I bought a course on Udemy and start to study, but I'm afraid that I'm too old https://answers.yahoo.com/question/index?qid=20190124084232AA3Yh98
  10. Got a problem with flacon heavy script, its saying "Cannot find sensor for ACC", and sending to this lines of script: SET vertAcc TO sProj(SHIP:SENSORS:ACC, UP:VECTOR). SET dragAcc TO g + vertAcc. //vertical acceleration due to drag. Same as g at terminal velocity What is ACC, and how to fix this error ? KSP version 1.5.1 (macOS), and latest kos. P. S. Its not my script I just download it so don't be very mad for my stupidness.
  11. Hi, I'm a student games programmer in my final year of University. I absolutely love KSP as it has given me a greater understanding of the difficulty and science behind real life space missions! I really want to make a simple 2D space sim game in order to buff out my portfolio (and for fun of course!). I've looked everywhere on the internet and forums for suggested methods of programming realistic gravity physics for orbiting etc. The problem is the methods I try are inconsistent or unrealistic... Looking at KSP it looks like they calculate trajectories and then put the ship on rails effectively so (relatively) wonky game engine physics don't change the orbit paths. I was just wondering if anyone knew how Squad achieved this, or if any developers who saw this could shed some light? Thank you very much, Jason.
  12. I want to launch a model rocket with a stability assist system and trajectory system. I want to code it myself but I honestly have no idea what I'm doing. Further I'm terrible at coding in general. Is their any very simple to use code, simpler that kOS, that I can use for this? I would be fine with drag and drop but I cant find anything for robotics that can run multiple programs. Just programs that do a do b do c etc. Any suggestions? Also it would need to run with any simulator that could handle it only because the rocket will take time and money I don't have and I would want the software done before I finalize the design.
  13. Yeah, so I would have liked to post this in the Addons section because I'm looking for help from coders and/or math geeks, but since it isn't really KSP-related, I decided on this place. Mods, please do move the topic if you feel it would fit in a more specialized section. Anyway. Here goes: I'm making a little 2D arcade space game that basically puts "Lunar Lander"-like elements in a tiny solar system with orbiting planets and moons. Fuel efficiency is obviously going to be an important gameplay point, and so I want players to use gravity assists etc. For that, I need to be able to show predicted trajectories. And that's where it gets complicated. I'm using Game Maker, and the tutorials, discussions or even marketplace scripts that I found on the topic rely on Game Maker's built-in physics. And those don't help me because obviously I don't have a constant "down" direction for gravity to pull in. I've only got relatively basic skills in GML (and I know even less about other languages) and while I'm not exactly sh!t at maths, high school was a long time ago. So I'm looking for help creating (or finding somewhere in the GM marketplace) something that will allow me to graphically display a projected trajectory. Since I'm not using GM's built-in physics, so far it's all just simple vector addition (current veloctiy + sun gravity + current grav-well gravity). But I have no idea how to draw a prediction, since my gravity direction changes constantly, and I have multiple sources of gravity AND distance thresholds at which they become active, like SOI's in KSP. Somehow I think that a frame-by-frame prediction of next x and next y over thousands of frames would kill most computers running this game. So. Is there anyone out there who... a) can point me to someone who knows this kind of stuff (the person/people who made MechJeb maybe?) b) can help me find something on GM Marketplace that would do the trick c) can help me directly with coding this d) ...has done this before and could help me port it into GML? Thanks very much.
  14. Hello guys, I need some help over there. I need to know, how can I get the vector that always poits to the certain spot on the orbit. I'll try to explain. For example, I'm on my stable orbit. And I decide "Oh, such a nice place, I need a vector that starts on my craft and poiting there". Are there any built-in functions in KOS to help me? Or may be I can do it using maths somehow? I've spent a whole day trying to solve it, but nope, I don't know how to do it. Illustrative picture is here (I'm a newbie, so I dont know how to attach my pic without URL). Thx a lot
  15. LASA Robotic Space Program (Lukes Awesome Space Agency) I bring you the Robotic Space Program from LASA. This is somewhat of an experiment/challenge for myself. But I also like story telling so I figured I'd make this thread here. What is the plan then? Well I plan to fly all flights IVA (Hudless where possible) unless they are being controlled by KOS controllers or other similar computer based options. I won't fly remote missions manually though I will manually load scripts to the vessel computers for performing the flights. I'll provide copies of all my scripts in this post. All vessels and Crew must be recovered at the KSC Green Patch unless picked up by Stage Recovery. I have also included a new starting team member Luke Kerman. The crews new programmer (engineer) who's speciality is doing as little actual work as possible. Self Enforced Rules Can only automate flights or control Kerbal IVA/EVA (Where this is unavailable I will use default view to control kerbal, eg: EVA) Once Cameras are available Ships without kerbals on board must be viewed from cameras. Otherwise They are viewed from IVA. Vessels and Crew must be recovered from the Green Patch around KSC. (Stages recovered through Stage Recovery count as recovered by a private contractor. Independent recovery is a priority.) All Manned flights must have an escape/abort system. Contingencies must be made to ensure crew survival. quick loading is for game crash security only. Difficulty The difficulty is basically hard mode but a little harder. Here are the basic starting difficulty and while I have put resource abundance back up to 100% I have turned on loads the extra difficulty options and reduced my starting cash from 10k to 3k. The Kerbals Jeb Kerman - Rocket Pilot/Mission Specialist (Jeb often screams "More boosters!" in his sleep so it's only fair to give him the job. When asked what he thought of atmospheric flight he stated it was a pointless pursuit if it didn't result in orbit. This disagreement between Jeb and Bob prompted the management to hire an Aeronautical Pilot to ensure a more diverse technological development stream, since Bob and Bill think it may be possible to reduce costs by flying into space instead of dumping engines off the coast of Kafrica from rockets.) Valentina Kerman - Aeronautical Pilot/SSTO Specialist (While some people (Bob) might say she was a diversity hire, the truth is she was the only one interviewed who was willing to sit on a giant tank of liquid fuel going the speed of sound only a few metres off the ground. Valentina loves the skies more than anything in the world and dreams of someday experiencing life under and in different colour skies.) Bob Kerman - Lead Scientist/Extra Planetary Specialist/Cook (Bob is all about the science. He has put forward some of the most highly questionable proposals the space agency has ever seen and often argues with everyone else on the team. If it weren't for his genius he'd probably be placed on the experimental test team by now. I mean seriously, do you know anyone else who can remember the names of BOTH of Kerbins moons? Bob can and even knows the sun is called Kerbol. Who would have thunk it? Bill however thinks he's funny but that's mainly because he likes to wind Bob up whenever he can.) Bill Kerman - Lead Engineer/Colonisation Specialist (Bill is a real character. A wind up merchant but a brilliant engineer. Rumour has it he thinks in 3D and scans of his brain do indeed prove that his brain is in fact three dimensional. The space agency hired him on his ability to solve almost any logistical and mechanical issue as well his work on his beercan space program which while admittedly a "failure" by everyone's standards but Bills, was an inspiration. That and Bob would only join the space agency if Bill was hired too. But we aren't Allowed to tell Bill that. Since he is also the only Kerbal on the team to have had an ant farm as a kid he was also appointed the position of Colonisation Specalist. He actually still has the farm and Bill says it's on it's 19th generation of monarchs and doesn't expect a revolution in the coming decade.) Luke Kerman - Lead Programmer/Drone Specialist/Rover Specialist/Horticultural Specialist (Luke really is good at doing as little actual work as possible and as such makes him perfect for his main roles. His work on Kemp based rocket materials is somewhat underwhelming however as it seems most of the Kemp is being harvested for THK extraction and curing for reasons beyond the management. Best they can tell is he's burning it in some sort of experiment or extraction process though any results are yet to be seen. The management have requested that Luke take his Kemp production and experiments out the back of the R&D center as there have been complaints from Bob who says the fumes make him drowsy and unable to concentrate. His ability to not fly rockets is surprisingly valued But Jeb and Val say if they are going up in one of his puter guided missiles they want Luke to go first. This technically makes Luke an Experimental Test Pilot as well but management won't give him the role for both insurance and payroll reasons. His background is rather mysterious however as he just showed up one day and set the clocks on everything in the space center. When the Management discovered the microwave clock was accurate they decided to give him a job as Lead Programmer. He claims to be robot wars intergalactic champion but nobody at the KSC has ever heard about such a thing , nor have they ever heard of Kraig C Kerman.) Missions 1. Advent (Sounding Rocket) More Coming Soon.
  16. Is there a mod that allows me to program actions ahead of time. For instance, I would like to use remote tech for added comms delay realism, but for it to work properly I need to be able to program a robot (which can range from a probe to a rover) to behave according to my specifications, given certain sensor or navigation inputs), effectively, robot programming. Is there a mod that allows me to do this? Does infrenal robotics do this?
  17. I don't have very much experience coding, I have only learned HTML and a bit of Javascript. The only mods I'm able to create are basic part mods and I use textures from other mods (No, I don't release any of them...) and I also use their configs and stuff.What am interested in is Mods to edit terrain and create parts and add Moar physics! So, Does anyone have a recommended language to write these mods? Also what 3d editing software? (Paint 3d?) How to put Everything together? And how the heck to you use unity?
  18. I've got serious problem with using a List / Dictionary collection classes where adding data in one event does not propagate to other event. Code example: using System; using System.Collections.Generic; using System.Linq; using System.Text; using UnityEngine; namespace TestPartPlugin { public class TestPartPlugin : PartModule { public struct teststruct { public string s; public int i; } public class testclass { public string s; public int i; } // this is shared among events, it will be passed as argument, for purposes of this example its not a problem ? public List<teststruct> l = new List<teststruct>(); public string ss; public override void OnLoad(ConfigNode node) { base.OnLoad(node); ss = new string('x', 10); // just allocate in runtime and fill it with dummy data, for reference to the problem at hand teststruct t; //now the interesting part for (int i = 0; i < 10; i++) { t = new teststruct(); //also did same with testclass, same problem t.s = "a"; //dummy fill t.i = i; l.Add(t); //add new item. if i looped in collection inside here, it would work } } public override void OnStartFinished(StartState state) // now the troublesome part { base.OnStartFinished(state); Debug.Log("LIST DUMP START"); foreach (teststruct t in l) Debug.Log("string: " + t.s + " int: " + t.i.ToString()); // BANG ! List/struct is empty ! Debug.Log("LIST DUMP END"); Debug.Log("simple string test: " + ss); //this worked, meh ... } } } I need a mutable collection that will be filled in OnLoad() and then later being used in OnStartFinished() . Right now, when i fill data in OnLoad(), inside OnStartFinished() my collection will be empty, no data is present. What now ? would using "out" keyword in method argument work ? I tried "ref" also with no result.
  19. Hi, I have a couple questions on how I would program something like this: - I've already made a "Teleporter" part that can hold 6 kerbals. - I want to program it so you can: 1. Select any other Teleporter within 1000km 2. Hit a button and make the Kerbals disappear from the sending pad and reappear at the recieveing pad after a short delay. 3. Have small chance of catastrophic failure. (I.E. Death of all teleportees) How would I do that? Cheers, UbuntuLinuxKing
  20. So I had always known how to find how much delta-v a spacecraft had but what about efficiency. The efficiency is the ratio of mass wet to delta-v relative to mass dry you can graph the relationship with v=isp*ln(1+w/d) Final I took calculus and I've written an equation so you can find the best amount of fuel based on of payload(anything that is not fuel tanks) and the added weight of the fuel tank shells and isp also you can change the efficiency the payload isp, isp is p, and efficiency is e first, divide e by 10000 side note the value is just representative how close you are the curve the farther from 100 the less efficient however it is necessary to do so often second multiple I by 9.81 (from the game given amount) use the formula below and that is the amount of fuel you should use i/(3√((3/4)^2-p/2))
  21. I'm trying to write a general one size fits all launch script based around Powered Explicit Guidance, but the math is way over my head, and I'm not quite patient enough to write all those formulas... Can someone help me develop this? I want the final product to be able to pilot a ship from the launch pad to an orbit defined by apoapsis. periapsis, inclination, longitude of ascending node, and argument of periapsis, with the first two being the only mandatory arguments. I am using a heavily modified (mostly trimmed) variant of Seth Persigehl's launch script for the in-atmospheric flight, including open loop pitch control and open loop heading control. PEG will kick in once the second stage starts, and the rocket's engine will not shutdown or throttle significantly until cutoff - the rocket will make orbit in one long burn.
  22. So as a proper, over ambitious programmer, I decided to tackle a problem that is at least 3-6 years worth of education above my head, delving into big scary math where nobody my age (nor my teachers for that matter) have dared bury their heads in equations before. For context, this is where my problem comes from : http://www-evasion.imag.fr/Membres/Fabrice.Neyret/NaturalScenes/fluids/water/waves/fluids-nuages/waves/Jonathan/articlesCG/simulating-ocean-water-01.pdf I want to try to simulate ocean waves before I get into other scary water related math problems. I currently have two problems, they both involve programming the equation: The equation h(x, t) = Ʃ mean_h(k, t) exp (ik · x) k where h is the height, x is the wave direction vector (2d vector), mean_h is h with a line over it (I believe it is the mean height, hence the name) , t is time, k is another 2d vector that I think I've defined in programming. (this is more clearly on the article at 4.3, equation 36 in the article) But some parts of the equation raise questions... such as what to do with the exp(ik * x) , I can do the exp(I * x) just fine (its obviously a dot product), but how do I treat the i, it appears to indicate the complex number, but what should I do ? supposing that just means (0,1) (since it can mean that), what do I do between it and the I (ik * x), should I do a cross product or a dot product seeing as it doesn't have a dot unlike the other term. The second problem I have is putting the sigma into programming, the person who wrote the equation does not give everything that summation normally does, it uses a vector of all things as the start point, gives no end... It also leaves me clueless as to the mean height, how do I obtain it ? it doesn't indicate in the article, is it just a product of the summation ? tl;dr : I have math problems with that equation involving just about everything after the = sign.
  • Create New...