Author Topic: Why was Capella's binary companion completely left out?  (Read 5225 times)

0 Members and 1 Guest are viewing this topic.

Offline Shade

  • 211
Re: Why was Capella's binary companion completely
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.
Report FS_Open bugs with Mantis  |  Find the latest FS_Open builds Here  |  Interested in FRED? Check out the Wiki's FRED Portal | Diaspora: Website / Forums
"Oooooooooooooooooooooooooooooooooooooooh ****ing great. 2200 references to entry->index and no idea which is the one that ****ed up" - Karajorma
"We are all agreed that your theory is crazy. The question that divides us is whether it is crazy enough to have a chance of being correct." - Niels Bohr
<Cobra|> You play this mission too intelligently.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Why was Capella's binary companion completely
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.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Shade

  • 211
Re: Why was Capella's binary companion completely
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.
« Last Edit: April 18, 2006, 02:36:44 pm by Shade »
Report FS_Open bugs with Mantis  |  Find the latest FS_Open builds Here  |  Interested in FRED? Check out the Wiki's FRED Portal | Diaspora: Website / Forums
"Oooooooooooooooooooooooooooooooooooooooh ****ing great. 2200 references to entry->index and no idea which is the one that ****ed up" - Karajorma
"We are all agreed that your theory is crazy. The question that divides us is whether it is crazy enough to have a chance of being correct." - Niels Bohr
<Cobra|> You play this mission too intelligently.

 

Offline Descenter

  • 27
  • Gamers Rule, but so do Thoes Who Make Them
    • Steam
Re: Why was Capella's binary companion completely
You offering?

Sorry, no.  I don't know yet know how to program anything and also I probably don't have the software needed.
"War is like playing a game of chess.  You move units on a field, and stratiegically try to weaken the opposing force, a sort of... elequent ballet.  Sure you might lose a few units,.... but, at times, it all part of the plan..."

"Most of the human race really don't give a damn.  Well I do, and I try to do something about it by giving a damn."

 

Offline Flipside

  • əp!sd!l£
  • 212
Re: Why was Capella's binary companion completely
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' ;)

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Why was Capella's binary companion completely
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. :)

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
Re: Why was Capella's binary companion completely
post the bug in mantis and see if someone fixes it.
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline Shade

  • 211
Re: Why was Capella's binary companion completely
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
« Last Edit: April 20, 2006, 12:36:45 pm by Shade »
Report FS_Open bugs with Mantis  |  Find the latest FS_Open builds Here  |  Interested in FRED? Check out the Wiki's FRED Portal | Diaspora: Website / Forums
"Oooooooooooooooooooooooooooooooooooooooh ****ing great. 2200 references to entry->index and no idea which is the one that ****ed up" - Karajorma
"We are all agreed that your theory is crazy. The question that divides us is whether it is crazy enough to have a chance of being correct." - Niels Bohr
<Cobra|> You play this mission too intelligently.

 

Offline StratComm

  • The POFressor
  • 212
  • Cameron Crazy
    • http://www.geocities.com/cek_83/index.html
Re: Why was Capella's binary companion completely
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.
who needs a signature? ;)
It's not much of an excuse for a website, but my stuff can be found here

"Holding the last thread on a page comes with an inherent danger, especially when you are edit-happy with your posts.  For you can easily continue editing in points without ever noticing that someone else could have refuted them." ~Me, on my posting behavior

Last edited by StratComm on 08-23-2027 at 08:34 PM

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Why was Capella's binary companion completely
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.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Shade

  • 211
Re: Why was Capella's binary companion completely
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.
Report FS_Open bugs with Mantis  |  Find the latest FS_Open builds Here  |  Interested in FRED? Check out the Wiki's FRED Portal | Diaspora: Website / Forums
"Oooooooooooooooooooooooooooooooooooooooh ****ing great. 2200 references to entry->index and no idea which is the one that ****ed up" - Karajorma
"We are all agreed that your theory is crazy. The question that divides us is whether it is crazy enough to have a chance of being correct." - Niels Bohr
<Cobra|> You play this mission too intelligently.

  

Offline NGTM-1R

  • I reject your reality and substitute my own
  • 213
  • Syndral Active. 0410.
Re: Why was Capella's binary companion completely left out?
The other stars aren't there because I ate them. They were yummy. :p
"Load sabot. Target Zaku, direct front!"

A Feddie Story