Jump to content

Any good tutorials?


Recommended Posts

So I'm rather extremely new to this programming buisness, and most of the reason I want to code is for Kerbal Space Program. indeed, my first code ever was written for Kerbal Operating System, and it told a two-stage SRB rocket how to fly.

Yesterday I realized it was possible to program a TI-83 Graphing Calculator. I spent most of my class not listening to the teacher and instead learning how to program in the TI-BASIC language. I created three programs for it: Quadratic Formula, Linear Equations (Just for fun, didn't actually need it), and Delta-V.

So my programming knowledge is not exactly... real. But I definitely want to make it real! But I've spent 10 minutes trying to find a good tutorial for getting started with KSP modding, and I haven't found anything. Obviously part modding is easy, editing part.cfgs is not exactly programming. I desparately want to learn how to write plugins! After all, if I can write plugins for KSP, I might eventually even be able to move on to the next step: making a game.

Link to comment
Share on other sites

I have recently made a foray into plugin writing, and have found it to be much harder than learning modeling/texturing. I would say your best resources for directly KSP related issues are source code and the KSP API documentation. Google for the C# (i.e googling errors etc.) For Unity I found these tutorials to be useful Link as well as this and this.

Link to comment
Share on other sites

Well, for the basics you need, you will want to start with a C# tutorial.

I started from pretty much where you did and what got me off the ground was a good series of tutorial videos.

There is a series of them here on the MSDN website that look decent. (I can't remember if this is the same videos I used or not.)

Then setup your IDE with the hooks into KSP that it needs and try to print "Hello world" to the debug log as a first step.

D.

Link to comment
Share on other sites

I am just starting with plugin development as well, I can also suggest you follow through the steps described in the wiki: http://wiki.kerbalspaceprogram.com/wiki/Plugins

Also, looking at the source of existing mods helps a lot.

It turned out that I didn't need to download and install unity for the stuff I intend to do (only programming, game-behaviour changes, modelling and texturing I know that I cant do well).

For me so far the bigger obstacles are understanding the KSP API and the concepts behind it (just started to look into it yesterday).

Tutorials or proof of concepts are hard to find for the directly game related stuff.

The wiki describes some basics on how to make a new part, but I have trouble finding stuff for:

- how to load/save a vessel from a craft file

- how to spawn a vessel and put it somewhere

- how to determine in which scene I am (editor, map, flight, IVA)

I'm sure I'll find it out either by trial/error or by looking at other people's code, but it would be great to have some collected knowledgebase for such basics. If there is such a place, please show me ;)

Either way, I will try to write together what I find on my modding journeys.

Edited by LordFjord
Link to comment
Share on other sites

  • 3 weeks later...

The basic steps: set up a C# IDE which compiles to the 3.5 .NET framework, and then add two .DLL files from Kerbal Space Program/KSP_Data/Managed: Assembly-Csharp.dll and UnityEngine.dll. Then start plugging away.

You'll want to look at the KSP API. TaranisElsu has some demo addons to help you get started, and, in general, you're going to want to spend a lot of time looking at other peoples' code. Just make sure that if you ever copy code, even if it's just a single method, that you obey that person's license. Fortunately, a lot of them are MIT/BSD-style licenses, where all you need to do is attribute the original author and his license. GNU GPL licenses force you to use the GNU GPL license (unless you can get an exception from the author). ARR (All Rights Reserved) means you can't copy any code without the author's permission.

Link to comment
Share on other sites

The basic steps: set up a C# IDE which compiles to the 3.5 .NET framework, and then add two .DLL files from Kerbal Space Program/KSP_Data/Managed: Assembly-Csharp.dll and UnityEngine.dll. Then start plugging away.

You'll want to look at the KSP API. TaranisElsu has some demo addons to help you get started, and, in general, you're going to want to spend a lot of time looking at other peoples' code. Just make sure that if you ever copy code, even if it's just a single method, that you obey that person's license. Fortunately, a lot of them are MIT/BSD-style licenses, where all you need to do is attribute the original author and his license. GNU GPL licenses force you to use the GNU GPL license (unless you can get an exception from the author). ARR (All Rights Reserved) means you can't copy any code without the author's permission.

So, I see that there are a number of free C# IDEs out there. Which would you recommend?

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...