Jump to content

Suggestion: community code examples


Recommended Posts

Hi all,

Right now everyone is starting to figure out how to write plugins, and I feel like it would jump-start the process for everyone if we all contributed example code for common tasks. I\'m working on a species of autopilot and will be happy to put up some examples of fly-by-wire and of vector manipulation once I figure them out to my satisfaction, unless someone beats me to it.

I created a page on N3X15\'s wiki to collect these examples: http://kspwiki.nexisonline.net/wiki/Module_code_examples . Is the official wiki currently editable?

Link to comment
Share on other sites

Considering all plugins are required to be open-source... I don\'t really know if this is needed.

Keeping them organized, commented and short may be more educational than reading complete source codes, especially for beginners. And it\'d hopefully prevent copy pasting from other peoples work.

I like the idea. I\'ll see if I can contribute with some easier stuff.

Link to comment
Share on other sites

Yeah I\'d love this actually. Sure they\'re all open source, but if there was a page on the wiki full of basic examples like how to make your ship auto-retrograde burn and the likes, that would be really helpful.

Just something for the us noobs to have numerous references and a potential starting foundation all in once place

Link to comment
Share on other sites

Thanks Zool; that code helped me get started with a GUI.

I put up some code that creates some useful vectors and some simple fly-by-wire.

Also an example of modifying the allowed time warp rates! Someone should develop this into a useful time warp control plugin.

Link to comment
Share on other sites

I posted some code that will automatically activate the next stage in a semi-smart way. Before staging it crawls through the part tree to make sure the next stage will not decouple any engines that shouldn\'t yet be decoupled.

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