Jump to content

Computers n' such


Gweese_king

Recommended Posts

Hello all,

I am fairly new to the game and forum. It seems like KSP has a great community around it and attracts a lot of good natured folks. Im looking to get into some moding and was wondering if anyone has recommendations on learning how to write code and do computer programming. I live in the States (Maine) and work a schedule that affords me quite a bit of time off (three weeks on three weeks off) in a completely unrelated field to computers. I just built my first computer after a lot of research on parts and it came out great. So iv got this great computer and want to do more with it, but I dont know where to start. So any books, classes, or ideas for learning the computer language would be appreciated. Thanks!

Link to comment
Share on other sites

If you wanna start at the bottom, learn some assembly: http://www.avr-asm-download.de/beginner_en.pdf

I learned assembly on an 8-bit AVR, and they are easy and cheap machines to code for, and an emulator/assembler (I recommend AVR studio) can be acquired easily. The skills you pick up also scale to other low-level coding, and you'll be more aware of things like pointers in higher-level coding.

Link to comment
Share on other sites

Are you on windows? KSP is written in Unity(Mono), so I reccomend microsoft visual C# express 2010. That's free and you can make a lot of cool applications. And you learn automaticly Mono, which is equal to C#.

You've mixed terms a lot there.

KSP is built in top of Unity. This means that some of the KSP code is provided by Unity and common with other Unity-based projects (and Squad have used some of the tools provided by Unity to help develop the game). The actual languages KSP is written is are largely C# and C++ (the latter is a guess but very likely).

Computer code itself consists of 0s and 1s specific to each class of hardware, this is obviously next to impossible to write so most programming language consist of more writeable code that gets converted to this by a compiler (or interpreter). Generally the trade off is between efficiency and productivity/flexibility.

Assembly language is the lowest level language, exactly the same commands as the actual code but using letters rather than numbers. Used for the most speed critical things but slow to write anything of any size and very hardware specific.

At the other end of the spectrum something like Java, Python or C# is much slower performance wise but you can get far more done and it's can be compiled for different platforms on the fly - so you can write something which can run on both a phone and a PC with no effort on your part.

Which to go for depends on why you're learning programming but the high level end is likely to be easier - there are more people using them and they're more productive. Personally I'm a fan of Java's documentation, Python's seems nice as well but the language didn't really gel with me.

Basically my advice would be to find an area you're interested in and pick the language most other people in that area are using. If it's KSP plugin writing then C# is probably the best choice. Visual Studio 2010/2012 is OK, I prefer Xamarin Studio myself (formerly Monodevelop) but it's largely a matter of personal preference. SharpDevelop has it's followers as well. Try all three.

Mono/.NET (two different implementations of the same standards, they're essentially interchangeable) are the support structure for C# and other CLI languages (Visual Basic.net, IronPython, Boo etc.). They handle the platform specific changes that allows you to write code that runs on all supported platforms by providing the compilers, libraries etc.

Link to comment
Share on other sites

The chances that you will need asm for commercial software development are close to zero. Even small embedded devices (Stuff like automatic doors, high end fire alarms, cars) are usually programmed in some flavor of c. As a newcomer, who already is in another field: go for java or c#. The bulk of business applications utilizes these (from android apps to business application servers). After you've got your feet on the ground branch out to c++, or look into some of the languages with more abominable syntax/language features (php, javascript) if you are interested in web development.

O'reilly has a series called "head first" where topics are covered in a fun, easy to remember approach - if you are a blank slate regarding software development you may profit from that.

http://www.amazon.com/Head-First-Java-Kathy-Sierra/dp/0596009208

Edited by jfx
Link to comment
Share on other sites

You've mixed terms a lot there.

KSP is built in top of Unity. This means that some of the KSP code is provided by Unity and common with other Unity-based projects (and Squad have used some of the tools provided by Unity to help develop the game). The actual languages KSP is written is are largely C# and C++ (the latter is a guess but very likely).

Computer code itself consists of 0s and 1s specific to each class of hardware, this is obviously next to impossible to write so most programming language consist of more writeable code that gets converted to this by a compiler (or interpreter). Generally the trade off is between efficiency and productivity/flexibility.

Assembly language is the lowest level language, exactly the same commands as the actual code but using letters rather than numbers. Used for the most speed critical things but slow to write anything of any size and very hardware specific.

At the other end of the spectrum something like Java, Python or C# is much slower performance wise but you can get far more done and it's can be compiled for different platforms on the fly - so you can write something which can run on both a phone and a PC with no effort on your part.

Which to go for depends on why you're learning programming but the high level end is likely to be easier - there are more people using them and they're more productive. Personally I'm a fan of Java's documentation, Python's seems nice as well but the language didn't really gel with me.

Basically my advice would be to find an area you're interested in and pick the language most other people in that area are using. If it's KSP plugin writing then C# is probably the best choice. Visual Studio 2010/2012 is OK, I prefer Xamarin Studio myself (formerly Monodevelop) but it's largely a matter of personal preference. SharpDevelop has it's followers as well. Try all three.

Mono/.NET (two different implementations of the same standards, they're essentially interchangeable) are the support structure for C# and other CLI languages (Visual Basic.net, IronPython, Boo etc.). They handle the platform specific changes that allows you to write code that runs on all supported platforms by providing the compilers, libraries etc.

you are right. I just wanted to explain what is good to learn if you want to make plugins fro KSP. I am not someone who code very long, I am just a kid that does C# and javascript for about a year.

Link to comment
Share on other sites

If you start with the "easy" languages (Python, Javascript, etc.), every new language will add new and confusing syntax/features and be hard to learn.

I'd say go and learn C++ first, it's not exactly rocket science (heh) and once you learn that, most other languages will be a cakewalk as most are pretty much subsets of C++ anyway, usually with simpler syntax. Other advantages are that C++ is extremely efficient (really only beaten by assembly) and works on every OS so you won't be limiting or locking yourself into a single platform.

Link to comment
Share on other sites

Strictly speaking, what EndlessWaves said isn't quite true. Different chip architectures have different flavors of assembly, and thus binary (what computers actually work with.) The best thing to do is ask how deep you want to go. If you want to get deep, start with C++ or C. Anything you can do in a modern language, you can do in one of those, since most modern languages have C or C++ behind them. You might have to get into the mucky details of the hardware, true, but you can still do most of what a modern language can accomplish. If you want to get really deep, go with assembly. Grab a cheap system on a chip and go to town. This will give you a stark, no sugar coating, picture of what's going on behind the scenes. Once you can do things like make a counter, something that multiples two numbers, something that adds three numbers, and something that can subtract two numbers, learn C or C++, then you can mosey on up to Java, C#, and Python, or PHP, Ruby, Perl, and javascript if you want to code for the web. (HTML is NOT a programming language, anyone who tells you otherwise either doesn't know better, or is just an idiot.)

If you really want to get into, ask a CS professor or someone who does programming for a living some good books on coding practices. Languages are good and all, but if you have a firm foundation in best coding and testing practices, then you can code in anything. Speaking of testing, be prepared to do a lot of it.

On the other hand, you may like being in the graphics and modeling side. Grab Blender and GIMP. Both are open source and free. Both also have a learning curve that can be frustrating to beginners, but once you get Blender, it's a joy to model in. If you want to get into digital painting or something along those lines, I highly recommend buying Autodesk's Sketchbook Pro. It is incredibly nice and once you get used to the interface, it is very nice to use. Photoshop can be intimidating for a beginner, and it's pricey, even with the subscription, so I'd hold off until you know for sure that this is something you want to do. I'd stay away from most commercial 3-d software for that same reason as well (USD$3000 for 3dsMax, ouch.)

The hardest thing about modeling is UV mapping. On simple objects it can be a breeze, but the more complex the object, the harder it gets. The best thing is to start simple, start with a cube or a cylinder and go from there.

What ever route you go I wish you luck. It can be infuriating at times, but when you make something awesome, it's worth it.

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