Hard Light Productions Forums

General FreeSpace => FreeSpace Discussion => Topic started by: Starks on April 16, 2006, 10:42:04 pm

Title: Why was Capella's binary companion completely left out?
Post by: Starks on April 16, 2006, 10:42:04 pm
Come on, 50% of the stars in the universe are estimated to be binaries... Capella had a MASSIVE companion star.
Title: Re: Why was Capella's binary companion completely left out?
Post by: Mars on April 16, 2006, 10:46:07 pm
The binary companion is actually two stars, G class dwarfs.
You could actually also point out that Alpha Centuri is a trinary system, Deneb is a huge blue-giant more than an astronomical in radius, Gamma Draconis is an orange giant, and Epsilon Pegasi is an orange-supergiant, also Bernard's Star (the second closest star from the sun) and Wolf 359 (the third closest star from the sun) are tiny red dwarfs.
Basically, FS2 isn't too good with that kind of thing.

Title: Re: Why was Capella's binary companion completely
Post by: Shade on April 16, 2006, 10:48:02 pm
Who knows? Maybe the shivans don't like binaries and had already blow it up before we got there. Or perhaps someone just didn't think to check whether Capella had more than one star before making his mission.
Title: Re: Why was Capella's binary companion completely left out?
Post by: Backslash on April 16, 2006, 11:22:19 pm
Working on this already (http://www.hard-light.net/forums/index.php/topic,39225.0.html).  Though that post doesn't make it clear, Lightspeed's star system templates also include notes on the proper types and amounts of suns.  So it will be fixed...

Apparently (http://www.hard-light.net/wiki/index.php/Capella) Capella is a quaternary (4 stars).  Whoa.
Title: Re: Why was Capella's binary companion completely
Post by: StratComm on April 17, 2006, 12:28:03 am
Don't give the missions more stars.  Planets around binary stars are not likely at all, and yet there are planets in (most) realspace missions.  Nevermind that you'll be altering the lighting in the missions dramatically by doing so.
Title: Re: Why was Capella's binary companion completely left out?
Post by: WMCoolmon on April 17, 2006, 12:35:32 am
Contract negotiations fell short when a reality TV show offered the other three a better deal...
Title: Re: Why was Capella's binary companion completely
Post by: karajorma on April 17, 2006, 03:07:07 am
The binary companion is actually two stars, G class dwarfs.

Actually Capella (http://www.stellar-database.com/Scripts/search_star.exe?Name=capella) is a quaternary system consisting of two G class stars both over 7 times bigger than the sun and two M class stars which are both smaller.

When looking up nearby starts this (http://www.stellar-database.com/) site is great :)
Title: Re: Why was Capella's binary companion completely
Post by: Nuclear1 on April 17, 2006, 05:15:39 am
Nevermind that you'll be altering the lighting in the missions dramatically by doing so.

Ugh... can't anyone imagine the headache? Bank one way, "Oh, God, my eyes!"; bank another, "Oh, God, not again!"

It's like JAD all over again.
Title: Re: Why was Capella's binary companion completely left out?
Post by: antar05 on April 17, 2006, 05:22:39 am
Wouldn't that only happen if you were BETWEEN the stars? There is one FS2 mission with a binary system, and they basically just merge into one star model.
Title: Re: Why was Capella's binary companion completely left out?
Post by: Descenter on April 17, 2006, 02:16:57 pm
I'm guessing it just all depends on the locations of the stars.
Title: Re: Why was Capella's binary companion completely
Post by: FireCrack on April 17, 2006, 03:28:30 pm
The two main stars are .6 AU away from eachother, so considering the brightness of them, any habitable area of capella would see them as one (and thus their gravity could be thaught of as one, thus alowing planets to have relatively circular orbits)


The other two stars (small class M red dwarfs) are about a light year away(and orbit together, as a smaller binary system), so they'd be extremely dim and have very little gravitational effects on orbiting planets.
Title: Re: Why was Capella's binary companion completely
Post by: Wanderer on April 17, 2006, 03:52:31 pm
0.6 AU = 90 x 10^6 km while the radius of different spectral type G stars is pretty close to 1 x sun radius which is about 1.4 x 10^6 km so there is still nearly a difference by two orders of magnitude. It would be amazing if those could be seen as one from a distance where 'lifezone' exists.
Title: Re: Why was Capella's binary companion completely
Post by: karajorma on April 17, 2006, 04:13:31 pm
The visual comfort zone around both stars is 11.7 A.U.s Make of that what you will.
Title: Re: Why was Capella's binary companion completely
Post by: aldo_14 on April 17, 2006, 04:26:51 pm
Or perhaps someone just didn't think to check whether Capella had more than one star before making his mission.

Galloping guppies Batman, he's onto something!

Spoiler:
Sorry.  I just wanted to say 'galloping guppies'....

The visual comfort zone around both stars is 11.7 A.U.s Make of that what you will.

Sunglasses?
Title: Re: Why was Capella's binary companion completely left out?
Post by: Eightball on April 17, 2006, 05:24:14 pm
"I thought we finished installing sun shields on those fighters..."
Title: Re: Why was Capella's binary companion completely left out?
Post by: Eishtmo on April 17, 2006, 07:21:34 pm
Well, um, you see, the reason is, uh. . .

NEVER ASK THAT QUESTION!
Title: Re: Why was Capella's binary companion completely left out?
Post by: S-99 on April 17, 2006, 07:31:15 pm
Oh man, the only time stars become unbearably bright is when you run the smart shader HDRish.
All of a sudden you're fighting, the fighter fly's through the light of the star, and the blinding light is actually pretty disorienting.
All of this considering when you look at the sun in the sky it's pretty blinding.
4 suns would kick my ass with fake hdr in fs2 :lol:
Also considering that stars aren't blinding at all without fake hdr:p
Give capella 4 suns:)
That would be ****ing awesome ;)
Besides, when only one of them goes nova, it still takes out capella anyway.
All the shivans would need to do is target the star closest to the inhabited areas of capella.
And scientists by amazement have discovered planetary systems with multiple suns :D
Who cares if it screws up the lighting of a mission:p
Lighting is different based on every different system you go to anyway:p
And distance to the star of course:)
SWEET :)
Title: Re: Why was Capella's binary companion completely
Post by: phreak on April 17, 2006, 10:13:47 pm
Because supernova-start only works if you have one sun in the mission and it doesn't work with any more.
Title: Re: Why was Capella's binary companion completely left out?
Post by: Descenter on April 18, 2006, 09:49:07 am
That seem pretty pathetic coding for a supernova to only work with one sun missions.  Someone should fix that then if that is the case.
Title: Re: Why was Capella's binary companion completely
Post by: karajorma on April 18, 2006, 12:02:17 pm
You offering?
Title: Re: Why was Capella's binary companion completely
Post by: Shade on April 18, 2006, 12:57:43 pm
Sounds like a challenge ;) Poked around a bit, and the offending bits would seem to be:

a)
Quote from: sexp.cpp
void sexp_supernova_start(int node)
{
   supernova_start(eval_num(node));
}
b)
Quote from: supernova.cpp
   if (stars_get_num_suns() != 1) {
      return;
and c)
Quote from: starfield.cpp
      if(supernova_active()){
         local_scale = 1.0f + (SUPERNOVA_SUN_SCALE * supernova_pct_complete());

Now, I'm still rather new to this, but if (a) could be made to pass on the index for the sun to go supernova, (b) pass the sun in question on to (c) instead of just tossing it right there if there are more than one in the mission, and (c) made to check for supanova earlier in the function than it does now and only magnify the sun it has been passed, it just might work. And of course it might not, as I'm still about 70% utterly lost when I try looking at the CVS :p Except when I look at FRED, then I'm 99% utterly lost and 100% scared and wanting my mommy.

I imagine just getting rid of the check in (b) would be enough to just allow more suns, but then it would just magnify all the suns in the mission, and it seems rather unlikely for several to go supernova at once. Though of course you never know when Shivans are involved.
Title: Re: Why was Capella's binary companion completely
Post by: karajorma on April 18, 2006, 01:29:36 pm
a) Passes the length of the countdown before the supernova reaches the player. You can see that only a single numerical value is passed to the SEXP simply by looking at it in FRED.

b) You're quite correct that this function is not doing anything if there is more than one sun present. Removing that check might have the effect you suggested. Then again it might not. FS2 is weird that way.
Title: Re: Why was Capella's binary companion completely
Post by: Shade on April 18, 2006, 01:35:58 pm
Yes, that's why it would need to be changed. My point was, for multi-sun-mission supernovas to work without all of them getting bigger, it would need to pass the sun too so that stars_draw_sun can check and magnify only the correct one. If Descenter doesn't care about whether it's pretty and just wants it to work though, I am as sure as I can be without being able to compile it yet that simply skipping the check in (b) will do the trick.

Makes no difference to me, just saw it as a good excuse to try learning a little bit more about the code :)

[Edit] Just thought of a simpler solution that still keeps it pretty. Ditch the multiple sun check in supernova_start, then instead of mucking about with passing info just modify stars_draw_sun to only magnify the first sun, presumably by just adding an 'if (idx=1)' check in addition to 'if(supernova_active())'. Just no choice of sun to go supernova that way. Well, no simple way to choose at least, could presumably still choose by placing the appropriate sun first.

Oh, and
Quote
That seem pretty pathetic coding
A lot of it is pretty ugly. One reason, I imagine, why one should never assume an scp code job to be easy without looking first. Some seemingly simple things turn out immensely complicated once you try looking at the code, and I bet all the SCP people have headaches because of it at times. It's not their fault it is that way.

Anyway, think I'll have to have another go at making this thing compile. Want to see if it actually works or if I'm just talking out my arse. Think the odds are about 50/50 of that being the case.
Title: Re: Why was Capella's binary companion completely
Post by: Descenter on April 18, 2006, 04:42:05 pm
You offering?

Sorry, no.  I don't know yet know how to program anything and also I probably don't have the software needed.
Title: Re: Why was Capella's binary companion completely
Post by: Flipside on April 18, 2006, 04:47:31 pm
The return if more than one sun could simply be a protection against crashing, you might find that simply removing the line will work, it's worth a try, but you are equally likely to find that trying to set off a Supernova in a system with more than one star will crash the game. I'm not a coder, but the best suggestion would be 'try it and see' ;)
Title: Re: Why was Capella's binary companion completely
Post by: Goober5000 on April 18, 2006, 05:38:23 pm
Oh, and a lot of it is pretty ugly. One reason, I imagine, why one should never assume an scp code job to be easy without looking first. Some seemingly simple things turn out immensely complicated once you try looking at the code, and I bet all the SCP people have headaches because of it at times. It's not their fault it is that way.

You see why we get annoyed when people say that. :)
Title: Re: Why was Capella's binary companion completely
Post by: phreak on April 19, 2006, 01:13:15 pm
post the bug in mantis and see if someone fixes it.
Title: Re: Why was Capella's binary companion completely
Post by: Shade on April 20, 2006, 12:16:38 pm
Well, now that I can compile, I can confirm that simply removing the multiple sun check does allows a supernova to occur when you have several suns, without any crashes. My idea for confining the expansion to a single sun didn't work, though, as it seems the code that calls for the drawing of each sun is actually in freespace2.cpp and not in starfield.cpp as I originally thought.

Will experiment more after I familiarise myself with the new code I have to look through, but at least there's no game-crashing reason for supernovae to be confined to single sun missions :) They just all blow up at once as it stands now... looks rather funny actually to have 7 suns all ballooning in front of you.

[Edit] A build for anyone who wants to blow up 17 suns at once: fs2_open_r-supernova.zip (http://www.fileh.com/dkshade/fs2_open_r-supernova.zip)
Title: Re: Why was Capella's binary companion completely
Post by: StratComm on April 20, 2006, 12:20:01 pm
No, but I'll point out that all of the CB anis, as well as some coherence things surrounding the Sathanas fleet need Capella to be a single star to make any sense.  Adding a couple of bright points in the background that are really small (Proxima Centauri-like far-orbiting dwarves) would be ok (and should probably be done with non-sun bitmaps so they don't make lighting scary), but trying to cram 4 suns into the space where the one belongs is not going to be good for the story.
Title: Re: Why was Capella's binary companion completely
Post by: karajorma on April 20, 2006, 01:03:44 pm
Capella Ha and Hb can go in without problem (well apart from the supernova thing). They're pretty small and insignificant anyway what with being 11000 AUs away from the two main stars and pretty small anyway.

It's Capella Hb that is the problem.
Title: Re: Why was Capella's binary companion completely
Post by: Shade on April 20, 2006, 01:21:46 pm
Problem turned out to be that, unlike what I thought, the supernova code in freespace.cpp/game_sunspot_process handles the drawing of it (except the glow) on its own instead of calling stars_draw and its related functions. So basically modifying those only affected the stars not supposed to go nova anyway, and thus didn't help.

Anyway, it's definitely fixable, once I figure out just exactly how all the parts tie into one another.
Title: Re: Why was Capella's binary companion completely left out?
Post by: NGTM-1R on April 21, 2006, 01:04:28 am
The other stars aren't there because I ate them. They were yummy. :p