Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Cat Wings
Oct 12, 2012

CoM right on CoL isn't a good thing with planes. You want the CoL to be a fair bit in front of the CoM, so that the plane will naturally point up, but not so far in front that the plane starts doing flips. Conversely, if you put the CoL behind the CoM, you're going to have a hell of a time getting off the runway, but if you do, the plane is going to want to dip down all the time. Modern fighter jets have their CoM and CoL really close together so they have better maneuverability, but they also have to be controlled by a computer the entire time.

You can tweak a part to be a different direction by holding shift when hitting QWEASD, it changes things by 5 degrees I think. You can also right click and change how much force the control system changes with.

Adbot
ADBOT LOVES YOU

Yaoi Gagarin
Feb 20, 2014

edit: ^^^^ What he said.

Fender Anarchist
May 20, 2009

Fender Anarchist

COL ahead makes the plane way unstable. It's the point where the lift force pushes the craft up, and it pivots around the COG.

As your angle of attack increases, lift increases as well, which pushes the nose up further, increasing lift... you get the picture, it's a positive feedback loop that makes the plane want to flip. Moving it behind the COG has the opposite effect, high AoA pushes the rear up and brings the nose back down, so it stabilizes. Much steadier, but the downside is you need a lot more control surface to maneuver effectively.

Having COL in front can make for a very maneuverable plane, if you have enough control surface/thrust vectoring authority to stop the rotation before you flip out of control, but it's not ideal for babby's first airplane.

E: The main thing for getting airborne is to set your landing gear up so the plane has a nose up attitude while stationary, and have the main gear just a hair behind the COM, so the plane will tip back with just a smidgen of elevator. Alternately, you can pitch the wings and tail up 5 degrees so they generate some lift while the fuselage is level (this is essentially what real aircraft do).

Fender Anarchist fucked around with this message at 07:44 on Apr 23, 2014

General_Failure
Apr 17, 2005

Ratzap posted:

Excellent, I had hoped you'd got it going. I'll write you up an effort post for 'my first plugin' tomorrow - it's 1:30am here and I need some sleep.

Not a problem really. It was easy to get it set up. Thanks for the help. If you do end up throwing together some sort of basic plugin that'd be brilliant. Very helpful for myself and definitely others too. It's not the programming that bothers me. I have a lot of years behind me of that. It's just working out WTF is needed to get started.

Strudel Man
May 19, 2003
ROME DID NOT HAVE ROBOTS, FUCKWIT
Dammit. Now it's pulling to the right, tipping on its side, and blowing up.

Why do symmetrical designs exhibit asymmetrical behavior. :(

edit: Handles okay if I manage to get it into the air, though. Odd.

Strudel Man fucked around with this message at 07:59 on Apr 23, 2014

Corky Romanovsky
Oct 1, 2006

Soiled Meat

Strudel Man posted:

Dammit. Now it's pulling to the right, tipping on its side, and blowing up.

Why do symmetrical designs exhibit asymmetrical behavior. :(

edit: Handles okay if I manage to get it into the air, though. Odd.

A wizard suggested that landing gear overloading causes problems on takeoff. Solution being: add more gear.

Strudel Man
May 19, 2003
ROME DID NOT HAVE ROBOTS, FUCKWIT

Palicgofueniczekt posted:

A wizard suggested that landing gear overloading causes problems on takeoff. Solution being: add more gear.
Hm. That might be it; it does vaguely correspond to when I swapped out the two front landing gear for a single central gear.

Also: Woo. It's still pulling up a trifle, but I can try to tweak that. I think it looks decently sporty, too.

Only registered members can see post attachments!

CovfefeCatCafe
Apr 11, 2006

A fresh attitude
brewed daily!

shortspecialbus posted:

Also, not to dissuade your awesome looking rocket, but that's about 100x bigger than you actually need to get into orbit. If you made it that big for fun, then awesome! If you're having trouble getting anything smaller into orbit then something is drastically wrong with either your game or your rocket design.

Yeah, I figure as much. I'm sure I can get in there with at least one less stage, but the problem seems to be, right around 30~40km I can kill the engines and coast up to 100~120km, which will use about half the fuel in those huge tanks (I'm probably running slightly faster than that chart), but when I relight them for insertion it just dumps the fuel in like 30 seconds, barely enough to get halfway around Kerbal.

nvm no cake
Feb 27, 2011

You don't have to raise your AP any higher than 70k to reach LKO, so some of that fuel can be saved for your circularization burn. Also, engines have different ISP values in atmosphere and in vacuum. Generally, you want to use your bigger engines with more thrust on your main stage for ascent and most of the heavy lifting, then use a smaller engine (LV-909 works if your ship is light enough) with better ISP in vacuum to finish off your orbit.

ssb
Feb 16, 2006

WOULD YOU ACCOMPANY ME ON A BRISK WALK? I WOULD LIKE TO SPEAK WITH YOU!!


YF19pilot posted:

Yeah, I figure as much. I'm sure I can get in there with at least one less stage, but the problem seems to be, right around 30~40km I can kill the engines and coast up to 100~120km, which will use about half the fuel in those huge tanks (I'm probably running slightly faster than that chart), but when I relight them for insertion it just dumps the fuel in like 30 seconds, barely enough to get halfway around Kerbal.

At least 1, yeah. It's actually pretty easy to get into LKO with the starting parts, i.e. a single stage. It sounds like you're not doing a gravity turn for starters, and a lot of your engines exist solely to push themselves up, more or less. Have you watched the Scott Manley tutorials? They did me a world of good. The other thing that helped me learn stuff was installing Mechjeb (in sandbox mode so you have all the stuff right away) and watching it do an ascent and some maneuvers. It went from confusing to "ohhhh, that's all you need to do for that?" and made the game a lot more fun. I don't recommend using Mechjeb all the time in the beginning, but for learning about stuff it works really well!

Jack the Lad
Jan 20, 2009

Feed the Pubs

shortspecialbus posted:

At least 1, yeah. It's actually pretty easy to get into LKO with the starting parts, i.e. a single stage. It sounds like you're not doing a gravity turn for starters, and a lot of your engines exist solely to push themselves up, more or less. Have you watched the Scott Manley tutorials? They did me a world of good. The other thing that helped me learn stuff was installing Mechjeb (in sandbox mode so you have all the stuff right away) and watching it do an ascent and some maneuvers. It went from confusing to "ohhhh, that's all you need to do for that?" and made the game a lot more fun. I don't recommend using Mechjeb all the time in the beginning, but for learning about stuff it works really well!

Mechjeb is really cool yeah. I use it to execute my maneuvers quite a lot too because I find wrestling with the nav ball to keep on target with WASD really difficult and unfun.

Zhent
Oct 18, 2011

The difference between gods and daemons largely depends upon where one is standing at the time.
Scott Manley career mode tutorial series is incredibly helpful to figuring out the first couple of steps on how to get science, build a lander, explore Kerbin, et cetera. I will also advocate the use of Mechjeb, however I find that with some rockets it will induce a rocking that gradually builds in intensity until the whole thing shakes itself apart. Turning off Kill-Rot or SAS seems to solve the problem, however then the rocket falls off of its trajectory. I guess the correct answer is probably 'build a better rocket' but I can't seem to wrap my head around how to get a lander to fit inside a fairing.

nvm no cake
Feb 27, 2011

Zhent posted:

Scott Manley career mode tutorial series is incredibly helpful to figuring out the first couple of steps on how to get science, build a lander, explore Kerbin, et cetera. I will also advocate the use of Mechjeb, however I find that with some rockets it will induce a rocking that gradually builds in intensity until the whole thing shakes itself apart. Turning off Kill-Rot or SAS seems to solve the problem, however then the rocket falls off of its trajectory. I guess the correct answer is probably 'build a better rocket' but I can't seem to wrap my head around how to get a lander to fit inside a fairing.

The answer to your problem is Procedural Fairings

Xerol
Jan 13, 2007


Strudel Man posted:

Hm. That might be it; it does vaguely correspond to when I swapped out the two front landing gear for a single central gear.

Also: Woo. It's still pulling up a trifle, but I can try to tweak that. I think it looks decently sporty, too.



Did they ever fix the thing where if you put the fueled size adapters on backwards they screw up fuel flow? I stopped using them around .21 because of that.

e: Cool reentry pic of the day:

Silver Alicorn
Mar 30, 2008

𝓪 𝓻𝓮𝓭 𝓹𝓪𝓷𝓭𝓪 𝓲𝓼 𝓪 𝓬𝓾𝓻𝓲𝓸𝓾𝓼 𝓼𝓸𝓻𝓽 𝓸𝓯 𝓬𝓻𝓮𝓪𝓽𝓾𝓻𝓮

The Green Calx posted:

The answer to your problem is Procedural Fairings

They are really great, especially with the larger rocket parts because you can make Apollo-like interstages.




Proc fairings effectively put struts on everything inside them, too. The top half here would flop around like a wet noodle without them.

Deuce
Jun 18, 2004
Mile High Club

Strudel Man posted:

The behavior of planes with FAR seems slightly insane. I've got what seems like a pretty reasonable-looking one here, matched up center of mass with center of lift, and yet when I go to fly it it starts flipping upward on its own almost immediately, and it'll stall and start flipping end over end seemingly at random.

Doesn't help that I can't make heads or tails of the design tool, I'm sure.



A real airplane with the CoL and CG on the same spot would be incredibly unstable.

edit: beaten

potatocubed
Jul 26, 2012

*rathian noises*

The Green Calx posted:

Generally, you want to use your bigger engines with more thrust on your main stage for ascent and most of the heavy lifting, then use a smaller engine (LV-909 works if your ship is light enough) with better ISP in vacuum to finish off your orbit.

I'm assuming that the difference between thrust an ISP is based on something in real life, and I'm curious: what causes engines to have different characteristics in each? I would have thought that 'propulsion' was the same regardless of whether you're in an atmosphere or not, and an engine with more thrust would have necessarily more ISP.

haveblue
Aug 15, 2005



Toilet Rascal
I believe it has to do with the exhaust plume interacting with the atmosphere. Isp is related to the velocity of mass ejected from the engine, and in a vacuum there's nothing to push against so it goes faster.

Deuce
Jun 18, 2004
Mile High Club

potatocubed posted:

I'm assuming that the difference between thrust an ISP is based on something in real life, and I'm curious: what causes engines to have different characteristics in each? I would have thought that 'propulsion' was the same regardless of whether you're in an atmosphere or not, and an engine with more thrust would have necessarily more ISP.

You can think of Isp as efficiency, I suppose. How much of a push you get out of each pound of fuel. It's why the nuclear engine is so popular.

F = m * a
A higher Isp engine is accelerating the exhaust to higher velocities, thus providing more total acceleration per unit of fuel.

Deuce fucked around with this message at 15:44 on Apr 23, 2014

Inglonias
Mar 7, 2013

I WILL PUT THIS FLAG ON FREAKING EVERYTHING BECAUSE IT IS SYMBOLIC AS HELL SOMEHOW

MAXMAPS! MAXMAPS

I have discovered a game-breaking bug that must be fixed immediately!

The radar altimeter in the MK II lander can (and possibly other cockpit IVAs as well) HAS ONLY THREE PIPS BETWEEN THE 300 M AND 200 M MARKER. As you are no doubt aware, this is ONE FEWER PIP THAN THE OTHER MARKERS ON THE GAUGE! THIS RUINS ABSOLUTELY EVERYTHING!

(Unless it's intentional. Honestly, the pips on that gauge have always seemed nonsensical to me, as the MechJeb surface altitude meter when those pips are crossed don't seem to correspond with any milestones like 250 m or whatever)

Inglonias fucked around with this message at 15:43 on Apr 23, 2014

Ablative
Nov 9, 2012

Someone is getting this as an avatar. I don't know who, but it's gonna happen.

Inglonias posted:

MAXMAPS! MAXMAPS

I have discovered a game-breaking bug that must be fixed immediately!

The radar altimeter in the MK II lander can (and possibly other cockpit IVAs as well) HAS ONLY THREE PIPS BETWEEN THE 300 M AND 200 M MARKER. THIS RUINS ABSOLUTELY EVERYTHING!

(Unless it's intentional. Honestly, the pips on that gauge have always seemed nonsensical to me, as the MechJeb surface altitude meter when those pips are crossed don't seem to correspond with any milestones like 250 m or whatever)



If there's four pips normally, they're each 20m, then 100 when you get above 500.

Inglonias
Mar 7, 2013

I WILL PUT THIS FLAG ON FREAKING EVERYTHING BECAUSE IT IS SYMBOLIC AS HELL SOMEHOW

Ablative posted:

If there's four pips normally, they're each 20m, then 100 when you get above 500.

So, like this? (Zoom in to see my new, crappy markings)

Xerol
Jan 13, 2007


Deuce posted:

A real airplane with the CoL and CG on the same spot would be incredibly unstable.

edit: beaten

Also, as soon as you fire up the engine, the CoM starts moving backwards, due to consuming fuel from the front. This puts the CoL in front of the CoM and leads to flippy behavior. Use tweakables to see how the CoM moves around as you burn fuel.

----

I didn't get any screenshots of it last night but I had put together a staged spaceplane which had stable flight characteristics at each stage. It looked something like this (top view):

code:
                                  [W]
            [C][W]     [LVT-30][FLT-800][I]
[J][I]         [W]                  [D]          [w]
[J][Jet Fuel][Jet Fuel][D][909][FLT-800][Cockpit][Tail Connector]
[J][I]         [W]                  [D]          [w]
            [C][W]     [LVT-30][FLT-800][I]
                                  [W]
Where J is a jet engine (regular, not turbo, because I'm not there in the tech tree yet), I is intakes, W are wings (swept wings so they're not to scale), w are winglets, C are control surfaces, D are decouplers. There were also some top-mounted tail fins and the tail connector on the nose was loaded with scientific instruments. Flew very well at every stage, the jets got me up to about 12km before running out of fuel, then the T-30s pushed the apoapsis to about 80km, and I got the rest of the way to orbit with the 909. And then flew to minimus, landed, and returned.

I'll have to remember to get some screenshots of it when I get home. It's not an insane project nor an SSTO but for the early portion of the tech tree I consider it a personal accomplishment.

e: Also I ditched all the landing gear on the early stages so it has parachutes on the "tail" connector (which is actually serving as a really long nosecone here) so it can land.

Silver Alicorn
Mar 30, 2008

𝓪 𝓻𝓮𝓭 𝓹𝓪𝓷𝓭𝓪 𝓲𝓼 𝓪 𝓬𝓾𝓻𝓲𝓸𝓾𝓼 𝓼𝓸𝓻𝓽 𝓸𝓯 𝓬𝓻𝓮𝓪𝓽𝓾𝓻𝓮

potatocubed posted:

I'm assuming that the difference between thrust an ISP is based on something in real life, and I'm curious: what causes engines to have different characteristics in each? I would have thought that 'propulsion' was the same regardless of whether you're in an atmosphere or not, and an engine with more thrust would have necessarily more ISP.

obligatory Scott Manley video:

https://www.youtube.com/watch?v=jI8TuufCp0M


The Cliff Notes version: rocket exhaust in the atmosphere gets scattered when it hits air molecules, so it ends up pushing the molecules out of the way instead of pushing the rocket up. IRL you can minimize this by using a longer engine bell to guide the exhaust out better.

Thrust vs. ISP: ISP has to do with how fast your exhaust exits the engine. Faster exhaust means you have more kinetic energy for a given mass, so you get more delta-V for a given mass. You can have a very high thrust engine with relatively low ISP, dumping tons of exhaust at a relatively low speed/temperature, but in a ground launch situation you need as much thrust as you can get to escape the atmosphere/gravity well. In space, especially for interplanetary burns, ISP is key and you can get away with really small amounts of thrust. Ion engines have crazy high ISP because they are able to accelerate reaction mass incredibly fast compared to chemical engines, they just can't move much mass all at once, so they provide very little actual thrust.

Makrond
Aug 8, 2009

Now that I have all the animes, I can finally
become Emperor of Japan!
Additionally, the reason high-thrust engines have lower Isp in KSP is to discourage using them in space (but this doesn't really work because it's space legos and who cares). The reason(s) they tend to have lower Isp in real life are diverse and many-fold but mostly it's because high-thrust engines tend to be designed for sea-level efficiency and have a ton of compromises to let them pump enormous amounts of fuel into the combustion chamber without exploding.

The Rocketdyne F-1 (used on the first stage of the Saturn V) uses a small amount of its fuel to run a turbine, which runs a pump that feeds the combustion chamber. This reduced its efficiency slightly, but it would be impossible to build such an enormously powerful single-chamber rocket without doing this. It also used some of the kerosene to cool and lubricate this turbine as well as the engine bell, and the turbine exhaust ran through the large pipe you see about halfway down the motor (which delineates the nozzle extension) and into the bell itself to keep it cool as well - probably the only time you'll hear about turbine exhaust being useful as coolant. The F-1 was also optimised for sea level, which makes it less efficient at higher altitudes and in vacuum compared to an equivalent engine with a redesigned engine bell. It's still far more efficient at altitude, but the exhaust plume overexpands and reduces the unopposed pressure in the combustion chamber, reduces the exhaust velocity and reduces the efficiency (Isp). All of these things detract from the engine's overall Isp, but when you have to fight gravity drag for so long, the extra thrust can easily make up for them.

SocketSeven
Dec 5, 2012

Makrond posted:

The Rocketdyne F-1 (used on the first stage of the Saturn V) uses a small amount of its fuel to run a turbine, which runs a pump that feeds the combustion chamber.

Fun fact. The Russian N1 rocket's first stage motor used a closed loop turbopump, rather than the open loop the F-1 and all other american engines used. American motors vented the turbopump exhaust, while the russians fed it into the combustion chamber. :science:

This closed loop system produced significantly more power then the open loop systems, with the added benefit of of baffling american rocket scientists who swore it couldn't be done without resulting in a massive explosion. :ussr:

"The engines which came out of the cold" on netflix is a fantastic documentary on these engines.

Fishstick
Jul 9, 2005

Does not require preheating

Samsquamsch posted:

Thanks, I had gotten so used to just looking at orbital/vessel info that I stopped looking at the other two tabs early on. Today I've just been running local missions and not really seeing the big benefits of maintaining terminal velocity. I'll explore it more tomorrow.

It's not a huge drag unless your speed is serious overkill, but adjusting throttle every 5k or so helps a bit.

Fishstick fucked around with this message at 18:09 on Apr 23, 2014

illectro
Mar 29, 2010

:jeb: ROCKET SCIENCE :jeb:

Hullo, I'm Scoot Moonbucks.
Please stop being surprised by this.

SocketSeven posted:

This closed loop system produced significantly more power then the open loop systems, with the added benefit of of baffling american rocket scientists who swore it couldn't be done without resulting in a massive explosion. :ussr:

It's not technically correct, by the time the US scientists got to see the engines Closed cycle engines had been flying on the space shuttle for over a decade so the technical challenges had been surmounted, but the soviet engines still had a better thrust to weight ratio than the SSME (although to be fair they used different fuels), the performance of this decades old engine still impressed them enough that they thought there must be some error in performance figures they were getting quoted.

Nowadays the Merlin engine used by SpaceX handily beats both of these engines.

Fishstick
Jul 9, 2005

Does not require preheating
One thing I learned today is that the turbopumps in the Saturn used a cartridge with hypergolic fuel to ignite/kickstart them, like an oversized version of the cartridges used to start prop planes. That's pretty :jeb:.

Edmund Honda
Sep 27, 2003

Roflex posted:

I didn't get any screenshots of it last night but I had put together a staged spaceplane which had stable flight characteristics at each stage. It looked something like this (top view):

Something like this?



I love a good spaceplane. FAR says it'd be unstable to the point of unflyable empty but that's assuming all of the tanks empty, I guess?

Maxmaps
Oct 21, 2008

Not actually a shark.

Fishstick posted:

It's not a huge drag unless your speed is serious overkill, but adjusting throttle every 5k or so helps a bit.

I just make sure my altitude and speed match. 110 and 1000 meters, 120 at 2000, 130 at 3000, etc. Then at 10k I turn to 90 and then burn with everything I got. Disclaimer: Am scrub.

Ratzap
Jun 9, 2012

Let no pie go wasted
Soiled Meat

Maxmaps posted:

I just make sure my altitude and speed match. 110 and 1000 meters, 120 at 2000, 130 at 3000, etc. Then at 10k I turn to 90 and then burn with everything I got. Disclaimer: Am scrub.

And you're not using FAR ;)

While you're here, are you (ie Squad) going to do something about third party mods advertising for 'Donations' in game? Toolbar and Interstellar are at it already. If they get away with it you can bet there will be a lot more soon. What's next after that? Mods start containing adverts for soap power unless you pony for ad free?

Fishstick
Jul 9, 2005

Does not require preheating

Ratzap posted:

And you're not using FAR ;)

While you're here, are you (ie Squad) going to do something about third party mods advertising for 'Donations' in game? Toolbar and Interstellar are at it already. If they get away with it you can bet there will be a lot more soon. What's next after that? Mods start containing adverts for soap power unless you pony for ad free?

[Feature available in Premium only]

Maxmaps
Oct 21, 2008

Not actually a shark.

Ratzap posted:

And you're not using FAR ;)

While you're here, are you (ie Squad) going to do something about third party mods advertising for 'Donations' in game? Toolbar and Interstellar are at it already. If they get away with it you can bet there will be a lot more soon. What's next after that? Mods start containing adverts for soap power unless you pony for ad free?

Our new modder agreement will get rid of all that, once we move to the new platform.

IOwnCalculus
Apr 2, 2003





I don't know, now I want a mod where I can plaster my ships in NASCAR-levels of sponsorship. What gets more attention than a rocket with your name on it becoming the newest crater on Mun?

Also, holy poo poo has this game come a long, long way from that pre-order back in 2011. I just picked it up again since it makes a good late-night keep-awake distraction.

IOwnCalculus fucked around with this message at 18:37 on Apr 23, 2014

Thwomp
Apr 10, 2003

BA-DUHHH

Grimey Drawer
I don't care, I'm crossposting this from the spaceflight thread.

kippa posted:

I feel like SpaceX should scrap the whole landing system and just go for something like this instead. Some of the things designed in the 50's are absolutely bonkers!




Maxmaps, make this happen.

maniacdevnull
Apr 18, 2007

FOUR CUBIC FRAMES
DISPROVES SOFT G GOD
YOU ARE EDUCATED STUPID

Ratzap posted:

And you're not using FAR ;)

While you're here, are you (ie Squad) going to do something about third party mods advertising for 'Donations' in game? Toolbar and Interstellar are at it already. If they get away with it you can bet there will be a lot more soon. What's next after that? Mods start containing adverts for soap power unless you pony for ad free?

Just write an ad-block mod, seems simple to me.

Queen_Combat
Jan 15, 2011
Interstellar radiators don't work, and instead create heat, if interstellar detects that you have adblockers installed.

E: this is satire, but is it?

Ratzap
Jun 9, 2012

Let no pie go wasted
Soiled Meat

General_Failure posted:

Not a problem really. It was easy to get it set up. Thanks for the help. If you do end up throwing together some sort of basic plugin that'd be brilliant. Very helpful for myself and definitely others too. It's not the programming that bothers me. I have a lot of years behind me of that. It's just working out WTF is needed to get started.

Good, that makes it easier but I'll assume not much C#. I stripped down the main Fusebox code to a skeleton to show the basic required structure for you: https://dl.dropboxusercontent.com/u/71576136/KSP/Skeleton.cs

You probably only need the top 3 imports at the start but the others are useful once you actually start doing something. First off, name your namespace - this declares your code space scope. If you add more .cs files later, just add them to the same namespace.

Next up, the KSPAddon block. The Squad module sucks because it does not differentiate between your mod and say an MLP kerbal face mod which leads to only one getting loaded. This chunk hashes your module object and tags your KSPAddon with it as an ID. No more problems, everyone's mods load without crapping on each other.

public class Skeleton : MonoBehaviour - this declares your class object in such a way as to be Unity compatible (the MonoBehaviour part). Very important and so easy to miss if you go off random google C#.

I'll skip describing global declarations, I'm sure you know about that and we'll describe some of the more important (and used) overrides from Unity:

public void Awake() - called once and only once when your plugin is initialized (loaded)

public void Start() - called once and only once just before your code begins receiving events. See the link for the distinction between awake and start.
http://docs.unity3d.com/Documentation/ScriptReference/MonoBehaviour.Start.html

private void OnApplicationQuit() - Called once as the program ends, save your config in here for example

public void Update() - called once per frame, frames can take variable amounts of time. You cannot do GUI things in here but you can run a timer, calculations etc

private void OnGUI() - called once per event, there can be a large amount of events per frame but this is the only code path which can run GUI commands. For example I was getting lag in my plugin when in the VAB. It turned out that each mouse movement = 1 event which meant when you try to turn the view around there's a flood of events. I ended up running a timer in Update to only allow the heavy calculations to be done 3 times a second but you have to run your GUI code for every event or you could lose input or your window disappears.

You can compare the skeleton to the file I trimmed it from here https://dl.dropboxusercontent.com/u/71576136/KSP/Fusebox.cs

That's it really, the Unity3d documentation is not very detailed but it's complete. If you need any more help just shout.


Geirskogul posted:

Interstellar radiators don't work, and instead create heat, if interstellar detects that you have adblockers installed.

E: this is satire, but is it?

Life isn't far off it tbh. C# reflection lets you grub around in everything else running - that adblocker would not last long ;)

Adbot
ADBOT LOVES YOU

RubberJohnny
Apr 22, 2008
OK, I was a bit premature with my bashing of the campaign in this, once you get to the Mun and Duna and start bringing in big science it works well and is fun. That whole Kerbin stage still seems spectacularly misjudged, whoever thought taking a soil sample next to the launchpad was an intuitive first step for new players should have their dev tools taken away. There are some key parts I'd move around, and it needs a balance pass, but there's a decent foundation there.

  • Locked thread