Author Topic: Intramission Warping  (Read 7374 times)

0 Members and 1 Guest are viewing this topic.

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Yet another thing: we need to be able to make a warping-out ship not be deallocated, but instead place it in a sort of limbo state, from which we can return it at will using the scripting system.
That was already tried.  I didn't see the scripting aspect of it much, but I saw the mission aspect.  It led to far too many problems to be practical.  A much better way would be to copy the stats of a departing ship into a buffer, and then recopy those stats into a newly arriving ship.

The ship-copy sexp is on my list of things to do, but isn't a high priority for me at this point, considering all the other stuff I'm working on.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
List those problems, please.
-C

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
We had a fairly big discussion over IM at the time, and I don't feel like reconstructing the entire argument (I don't have logs of it).  It was triggered by this Mantis bug.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
We had a fairly big discussion over IM at the time, and I don't feel like reconstructing the entire argument (I don't have logs of it).  It was triggered by this Mantis bug.

And you expect me to, what, travel back in time to view an IM conversation that, for all I know, you had with somebody else? Or try to decode your vague comments in the bug report like "it would create holes in the code"? "Holes"... Are these like potholes?

Quit jerking on my chain, Goober. You know if I already knew those reasons, I wouldn't be asking for them.

There's also the possibility that somebody else who hasn't already contributed to the discussion might have an idea that would be helpful.
« Last Edit: February 28, 2008, 04:23:48 am by WMCoolmon »
-C

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
And you expect me to, what, travel back in time to view an IM conversation that, for all I know, you had with somebody else? Or try to decode your vague comments in the bug report like "it would create holes in the code"? "Holes"... Are these like potholes?

Quit jerking on my chain, Goober. You know if I already knew those reasons, I wouldn't be asking for them.
:wtf: I'm not jerking your chain.  Why do you get so defensive when somebody points out that your code might not be the best thing since sliced bread?

I don't remember those reasons either, because they involved a lot of very specific details I found when I was digging deeply through the code.  I don't feel like doing that again because I don't want to go through all that code analysis for a problem that we already resolved, and I don't want to re-enact what was a very heated and frustrating conversation for both of us.

However I can give you the general idea.  The "limbo" code required a number of hooks into practically every single function that depended on whether a ship had departed or not.  Those hooks were, to be blunt, ugly -- in both clarity and complexity.  They introduced some convoluted logic into what were previously very simple functions.

Furthermore, they weren't even sufficient.  There were far too many edge cases that broke when a ship was in "limbo"; those were the details I found when I went digging through the code, and that is what was alluded to in the Mantis report.  The Mantis report only lists one edge case, there were dozens of others.

And the design was inherently flawed.  The FreeSpace mission management was designed with the implicit, fundamental assumption that a ship would never re-enter the mission after it had exited.  Changing that assumption would require a redesign of the basic-level ship handling; your patch was the equivalent of a quick-and-dirty fix bolted on to the foundation.

Considering how the mission management is designed, it is far more natural and far more simpler to just clone the exiting ship onto the entering ship.  That achieves exactly the same effect while bringing none of the ugly complexity of "limbo".


Quote
There's also the possibility that somebody else who hasn't already contributed to the discussion might have an idea that would be helpful.
I would certainly welcome other input.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
:wtf: I'm not jerking your chain.  Why do you get so defensive when somebody points out that your code might not be the best thing since sliced bread?

Because you've chosen to be someone online. Having watched that persona trash the forums for an April Fool's Day joke, insult the forum members for disagreeing with a decision by the administration, leading the project on for one of your school assignments, being one of the first to harass n00bs and give them degrading titles, and having made empty promises to get your way in this very case, I have a lot easier time believing that you're actually being totally indifferent to my request and not even trying to take me seriously. I can only assume that you get something out of that which you believe is worth the hard feelings that all that causes for you.

I don't remember those reasons either, because they involved a lot of very specific details I found when I was digging deeply through the code.  I don't feel like doing that again because I don't want to go through all that code analysis for a problem that we already resolved, and I don't want to re-enact what was a very heated and frustrating conversation for both of us.

I didn't ask for you to write a report on it, I just asked for your reasons. I don't even remember the debate and the "reasons" you gave in the bug report are without substance and what has me doubting the decision in the first place. I remember that I didn't feel it was worth it to try and fix the problems with the code, but I believed that they could be fixed with time and effort, without breaking things.

However I can give you the general idea.  The "limbo" code required a number of hooks into practically every single function that depended on whether a ship had departed or not.  Those hooks were, to be blunt, ugly -- in both clarity and complexity.  They introduced some convoluted logic into what were previously very simple functions.

Furthermore, they weren't even sufficient.  There were far too many edge cases that broke when a ship was in "limbo"; those were the details I found when I went digging through the code, and that is what was alluded to in the Mantis report.  The Mantis report only lists one edge case, there were dozens of others.

And the design was inherently flawed.  The FreeSpace mission management was designed with the implicit, fundamental assumption that a ship would never re-enter the mission after it had exited.  Changing that assumption would require a redesign of the basic-level ship handling; your patch was the equivalent of a quick-and-dirty fix bolted on to the foundation.

Considering how the mission management is designed, it is far more natural and far more simpler to just clone the exiting ship onto the entering ship.  That achieves exactly the same effect while bringing none of the ugly complexity of "limbo".

If you understand the limbo code, then you should also understand that the underlying idea behind it was to prevent the ship from actually exiting. The idea was to play the warp effect animation, and then prevent the ship from being rendered or simulated in any fashion. So the ship would still remain in-mission; it wouldn't be added to the Exited_ships array and it wouldn't be pulled out of the Ships array. I did add it to the log so that it would appear to have departed, but since that broke SEXPs, it'd also be possible to devise a means of checking if a ship was in limbo or not. The SEXPs issue seems somewhat serious, but that's mostly a matter of how many SEXPs there are to change. But since the functions to check for a ship's death are fairly standardized, it wouldn't be that bad. In the end, it might actually be beneficial to just pull it out of the departed log so that all of the SEXPs could operate on it; it would let mission designers alter attributes of a ship when it was offstage, so to speak.

As for the warp code, I remember that I had to add a boolean value to a number of the functions and update the core function(s) with an alternate path to handle if a ship warped out, but not really.

This is why I have a hard time accepting your explanation; there's no evidence from what you've stated that you understand the idea behind the limbo code. The idea was never to remove a ship from the mission entirely and then put it back in, it was just to make it invisible and intangible. There are a finite number of ways that an object interacts with the outside universe and many of those already have toggles. For those that don't - say, if there's no toggle for a ship that makes all AI ignore its existence - there's probably a reason to add them in anyway.

So the question I'm not asking is whether it's possible or not - I already know it is - it's how much work is needed to actually do it?

Suppose you wanted to do transphasic cloaking from Star Trek - you'd need to do exactly what the limbo code is supposed to do anyway.
-C

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Actually, I think the transphasic cloaking thing is the best way to approach this. Suppose someone wanted to implement transphasic cloaking - the ship would disappear, drop off of all radars, make no collisions with other objects, no AI-controlled object would respond to its presence. What problems do you see with that?
-C

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
...I have a lot easier time believing that you're actually being totally indifferent to my request and not even trying to take me seriously.
No, it's simply that I'm annoyed this can of worms is being opened again.  We already resolved this once.  Lying low for two years and then resurrecting the same argument is not going to change my mind.

Quote
I didn't ask for you to write a report on it, I just asked for your reasons. I don't even remember the debate and the "reasons" you gave in the bug report are without substance and what has me doubting the decision in the first place. I remember that I didn't feel it was worth it to try and fix the problems with the code, but I believed that they could be fixed with time and effort, without breaking things.
I've been through the mission management code repeatedly, and its design is very fragile.  It works well enough on its own, but when one of its assumptions is violated, it tends to collapse like a house of cards.  It was hard enough adding initial multiply docked ships; what you're proposing would require an unreasonable amount of effort for a very small gain.

It's the same situation as autogenerating Orion nameplates when texture replacement already does the job.  It may be technically possible but it requires an investment of dozens of hours of work to save 30 seconds of graphics editing.  It's pointless.

Quote
If you understand the limbo code, then you should also understand that the underlying idea behind it was to prevent the ship from actually exiting. The idea was to play the warp effect animation, and then prevent the ship from being rendered or simulated in any fashion. So the ship would still remain in-mission; it wouldn't be added to the Exited_ships array and it wouldn't be pulled out of the Ships array. I did add it to the log so that it would appear to have departed, but since that broke SEXPs, it'd also be possible to devise a means of checking if a ship was in limbo or not...

As for the warp code, I remember that I had to add a boolean value to a number of the functions and update the core function(s) with an alternate path to handle if a ship warped out, but not really.
And that's the problem.  You have to add dozens of little checks in too many places.  It's too disorganized and it's too easy to miss a specific detail.  Furthermore, it's too easy for someone to accidentally break it while working on what they would think is an unrelated piece of code.

You need to take into account not only the feature in question, but how it affects everything else.  Neither the Law of Unintended Consequences nor Murphy's Law are typically very forgiving in this regard.

Quote
This is why I have a hard time accepting your explanation; there's no evidence from what you've stated that you understand the idea behind the limbo code. The idea was never to remove a ship from the mission entirely and then put it back in, it was just to make it invisible and intangible.
The issue is not whether one understands the technical implementation (which I do); the issue is whether it's good design (which is what seems to be escaping you).  I know very well how it works.  I also know that it's a brutal hack and a flawed design.  It's so flawed, in fact, that its implementation is tantamount to sabotaging the existing code.

Quote
So the question I'm not asking is whether it's possible or not - I already know it is - it's how much work is needed to actually do it?
To do it properly you'd have to rewrite the entire mission management code with the anticipation that a ship may leave and then return.  But as I said earlier, this would be pointless.  You'd be using a daisy cutter to swat a flea.

Actually, I think the transphasic cloaking thing is the best way to approach this. Suppose someone wanted to implement transphasic cloaking - the ship would disappear, drop off of all radars, make no collisions with other objects, no AI-controlled object would respond to its presence. What problems do you see with that?
None.  But transphasic cloaking is not the same thing as causing an object to depart and then re-enter.  If you want to script a cloak and call it departing and re-entering, that's your choice.  I happen to think that ship-copy is closer to what you actually want to achieve, but your mileage may vary.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
...I have a lot easier time believing that you're actually being totally indifferent to my request and not even trying to take me seriously.
No, it's simply that I'm annoyed this can of worms is being opened again.  We already resolved this once.  Lying low for two years and then resurrecting the same argument is not going to change my mind.

Oh ffs. The only reason I even looked into this in the first place and changed my mind is because somebody asked me a question, which required me to justify the reason that this got taken out in my answer. I looked back at the bug report, and found that I agreed at the time, but realized that all of the reasons that I could remember were mostly circumstantial and time- and politics- related. I didn't want to hassle with it back then. So I looked at your responses and found them utterly unhelpful, and felt like I'd been suckered into agreeing with the wrong course of action by smooth-talking and outside pressure. I still didn't want to push the issue, so I didn't contact you about it. But when I got the opportunity to give you the benefit of the doubt and justify yourself, I gave it to you.

I haven't done any work on the bug other than to check once if it had been removed or not when somebody complained that the toggle on the scripting functions wasn't working. I resent the implication that I've had nothing better to do for the last two years than to stew about this issue - if I had that kind of luxury, I'd have just implemented the feature and disproven your concerns for good.

Quote
I didn't ask for you to write a report on it, I just asked for your reasons. I don't even remember the debate and the "reasons" you gave in the bug report are without substance and what has me doubting the decision in the first place. I remember that I didn't feel it was worth it to try and fix the problems with the code, but I believed that they could be fixed with time and effort, without breaking things.
I've been through the mission management code repeatedly, and its design is very fragile.  It works well enough on its own, but when one of its assumptions is violated, it tends to collapse like a house of cards.  It was hard enough adding initial multiply docked ships; what you're proposing would require an unreasonable amount of effort for a very small gain.

See my response to your response to my comment about cloaking.

It's the same situation as autogenerating Orion nameplates when texture replacement already does the job.  It may be technically possible but it requires an investment of dozens of hours of work to save 30 seconds of graphics editing.  It's pointless.

It's not pointless at all. It's an incredibly valuable bit of code that could save us a LOT of headaches later on as features are added to ships. It also saves the FREDder (or scripter) a lot of headaches because they don't have to deal with multiple ships and copying values between them. How do you do that right now without leaving stuff out or using up dozens of variables? How much time would it take to copy all the subsystem data from every single subsystem on a capital ship? How many variables internal to the code are inaccessible using SEXPs?

It also saves coders time, because they don't have to add code to one more function to handle a new variable that they added to the ship. I dislike functions that require you to reference member variables directly because it's very easy to assume that they'll be handled by the existing code, and it's very easy to either forget or simply not know all the functions that you have to add a new variable to for each given class. If a ship-copy function were implemented and it were anything but a memcpy (which it can't be), every single coder on the project would have to know and remember to update that function every time they added a variable. That's doable, but it's a fast way to ambiguous bugs.

Quote
If you understand the limbo code, then you should also understand that the underlying idea behind it was to prevent the ship from actually exiting. The idea was to play the warp effect animation, and then prevent the ship from being rendered or simulated in any fashion. So the ship would still remain in-mission; it wouldn't be added to the Exited_ships array and it wouldn't be pulled out of the Ships array. I did add it to the log so that it would appear to have departed, but since that broke SEXPs, it'd also be possible to devise a means of checking if a ship was in limbo or not...

As for the warp code, I remember that I had to add a boolean value to a number of the functions and update the core function(s) with an alternate path to handle if a ship warped out, but not really.
And that's the problem.  You have to add dozens of little checks in too many places.  It's too disorganized and it's too easy to miss a specific detail.  Furthermore, it's too easy for someone to accidentally break it while working on what they would think is an unrelated piece of code.

You need to take into account not only the feature in question, but how it affects everything else.  Neither the Law of Unintended Consequences nor Murphy's Law are typically very forgiving in this regard.

Ah, so you're implying that I'm being small-minded now? That's very rhetorical of you. :)

It's true that you'd have to modify several bits of code to do what I'm saying, but there are other benefits to doing it (if nothing else, by gaining that one aspect of cloaking). It's also not that subtle; it's pretty obvious that if there's a should_this_show_up_on_radar flag and you don't use it, you ought to have a good reason. There are already functions in the FS2_Open code that use functions or flags like that; the only thing I can think of that doesn't have an obvious implementation in retail code is the effects on AI. AI might automatically fly around the object, though given how well the AI is at doing that, you might never notice that it was trying to do anything of the sort. Firing at empty space could be a problem - but there's already circumstances where that would have to be checked for anyway (eg the huge flag) and you could simply add a function, can_this_weapon_be_fired_at_that, which can be used for all cases.

A lot of this is similar to the problem you'd face with a ship-copy SEXP, yes, so it's not an outright improvement in that regard. However, like I said, nearly all the effects of the limbo code already need to be in the code for various other features. It's only the limbo code which would draw all the features together into that particular combination. But since they could be drawn into a number of functions, I don't think it'd require quite so much cross-systems knowledge as the ship-copy SEXP. Somebody working on the radar code would just need to know that they need to use the can_this_thing_be_targeted function, and if they ever modified it, they'd notice that one of the conditions was to check the limbo flag from the object struct. Thus it'd be self-evident in modifying the code that the flag needed to be checked for in the new version.

Quote
This is why I have a hard time accepting your explanation; there's no evidence from what you've stated that you understand the idea behind the limbo code. The idea was never to remove a ship from the mission entirely and then put it back in, it was just to make it invisible and intangible.
The issue is not whether one understands the technical implementation (which I do); the issue is whether it's good design (which is what seems to be escaping you).  I know very well how it works.  I also know that it's a brutal hack and a flawed design.  It's so flawed, in fact, that its implementation is tantamount to sabotaging the existing code.

Just because somebody says or thinks that they understand something doesn't mean that they do, and "good design" is a subjective enough term that it seems rather silly to generalize me as not understanding it like you do. Of course, I can't really 'prove' that I'm correct in that sense any more than you can, which makes it a rather worthless argument to make and just more rhetoric.

Also, I'd like to note that you're dipping back into throwing subjective opinion around as if it's some kind of objective analysis of the situation. It's not; and just because your mind is made up about it doesn't mean that it's any more valid for you to do so as a justification or support of your argument.

Quote
So the question I'm not asking is whether it's possible or not - I already know it is - it's how much work is needed to actually do it?
To do it properly you'd have to rewrite the entire mission management code with the anticipation that a ship may leave and then return.  But as I said earlier, this would be pointless.  You'd be using a daisy cutter to swat a flea.

Now we go back down to my explanation of what the limbo code is and what it was meant to be. There's a reason that it was called the limbo code, rather than the code-that-lets-a-ship-depart-and-come-back code.

Actually, I think the transphasic cloaking thing is the best way to approach this. Suppose someone wanted to implement transphasic cloaking - the ship would disappear, drop off of all radars, make no collisions with other objects, no AI-controlled object would respond to its presence. What problems do you see with that?
None.  But transphasic cloaking is not the same thing as causing an object to depart and then re-enter.  If you want to script a cloak and call it departing and re-entering, that's your choice.  I happen to think that ship-copy is closer to what you actually want to achieve, but your mileage may vary.

And here's where I can have some fun and lecture you on engineering and design. :) A good engineer or a good designer, whether they're working on code, building a bridge, making a play, or writing a treaty - works with what they've got. They make sacrifices and cut corners because the world isn't perfect. Sometimes they have to fake things. Sometimes you have to bull**** people or make a bluff rather than go the route of lofty ideals.

In this particular instance, nobody is insisting that it be done the right way, because they can't. Ship-copy is not the same thing as causing an object to depart and then re-enter; it's using an active copy of a ship's attributes to make it appear that way, rather than using a more passive approach to conserve those attributes so they don't have to be recreated in the first place. Ship-copy would have its place in mods, I'm sure. But it's not what people asked for and, frankly, it's a more wasteful solution and has its own downsides that I haven't even talked about yet. How does it keep track of textures? How does it handle position and orientation of a ship, how does it handle names? Does it create the ship for you? How do you handle things like having a fighter depart from a certain ship, if it's possible that that ship will depart in the interim? How do you handle any other SEXPs that apply specifically to that ship if the time that a ship warps is variable?

For a pre-scripted mission, ship-copy would work. But for an RTS or a flexible mission, it doesn't work. You'd invalidate whatever handle you were using each time you used the ship, and if you had a ship make 20 jumps, you'd need to add the overhead of creating and handling the departure of ships (Not 20 different ships, just one ship making 20 jumps; when you assume that all ships in Freespace are capable of making subspace jumps, that number gets pretty large really fast). Future coders would have to constantly be wary of maintaining even mostly-unrelated features in the system, and handling pointers to memory allocated for subfeatures of a ship. You'd have to implement a copy function for ship trails, etc, and whatever else is implemented now with the expectation that a ship won't ever be duplicated in its entirety. For that reason, a perfect ship-copy function becomes a very, very difficult goal to obtain because you either have to spend all that time yourself to create those extra functions and ensure that other coders create them, or sacrifice elements of the ship copy. Again, I'm sure there's a valid use for a ship-copy function outside of this one specific case, but it's not a hard-and-fast better substitute to what I'm suggesting to solve the request.
-C

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: Intramission Warping
How did the original inferno guys manage that nanojump? I never peeked into the workings. Nice effect though.
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline Shade

  • 211
They used two different ships, the second having an undisplayable character added to its name.

[Edit] As for the rest of this thread... what the ****? There's obviously something going on here that goes way further back than me joining the forum, because nothing said early on in this thread warrants the kind of hostility bordering on utter hatred you two are showing towards eachother. It's not nice to watch, especially as a very junior member of the SCP team who happens to have enormous respect for the contributions you've both made (and are continuing to make) and hoping to some day learn enough to be anywhere near as useful.
« Last Edit: March 05, 2008, 03:35:45 am 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 WMCoolmon

  • Purveyor of space crack
  • 213
I definitely don't hate Goober. I wouldn't expect to ever end up hanging out with him over a couple of beers, and I'd probably try to avoid getting assigned to the same project as him if we ever worked together. But I do respect his achievements for the project as well, and at least part of his design ethos is something I'd strongly support. I haven't ever really found any fault with multi-docking, and it's one of the kinds of improvements that is often undervalued. It'd be damn hard to list on a CV and have it sound interesting or significant, but once you began to explain it, it was something that was almost instantly useful to everyone (no learning curve) and nobody ever expected it to be implemented.

Goober and I have clashed in a dug-in battle once before, about three years ago or so. The ~3500 lines of code for the lab are essentially an outgrowth of that argument. If things get to that point, we probably won't need to argue anymore.
-C

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
its not possible to store extra vars in a ship object is it? because if it is it makes my whole metadata system i scripted for fsrts totally useless :D
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
It's not. There's some code in the scripting system to handle it, but it's not working atm. IIRC, I got to the point where I had implemented everything, but then found that it didn't work and didn't know why and decided not to bugfix it then, or did find the reason that it didn't work and decided to hold off until I came up with a better solution.

Either way, I think it'd be something good to put in on a future date, but there are issues like network persistence to be worked out.
-C

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
i just store a array (or rather a table in lua terminology) of ship names, and a corresponding array for each var i wish to store. so if a ship is index 1 then all its vars in the other arrays are also index 1. periodically, i scan mn.Ships[] and make sure that each ship name is referenced in my name array. i maintain an array of bools as part of the metadata to flag a set of metadata as active or dead. so when a ship is created it tries to overwrite those dead indexes first, only creating new ones if there are no available slots in the existing arrays.

i also periodically scan the names array that i set up as well, likewise checking if the names in the list are present in the ships in mn.Ships[]. this is how i determine if ships are dead. i really only do this when i need to add a ship since having metadata of dead ships is not a problem (save wasted memory). there are always some wasted indexes but since im using up dead ones the arrays wont get ridiculously long.

it requires lots of loops to go through ships to update the meta arrays and to check to make sure that new ships are assigned data. and many other functions to get a ships index for example (names are looped through until it matches the string in the ships name field, then that index is returned). its rather cumbersome but it works. im sorta concerned that all the loops are an impediment to game speed. so long as you have a sane amount of ships in a mission at a time, it performs pretty well.
« Last Edit: March 08, 2008, 01:32:01 am by Nuke »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Goober and I have clashed in a dug-in battle once before, about three years ago or so. The ~3500 lines of code for the lab are essentially an outgrowth of that argument. If things get to that point, we probably won't need to argue anymore.

was that the GUI war?
Goob's ethos is very conservative, which is great for keeping out bugs, but not so great for new features (or keeping coders) we shall see if this was a good or bad thing at some point in the future.

I too have felt the sting of his ever informative "it has problems" style explanations for why some bit of code must be or was removed.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline taylor

  • Super SCP/Linux Guru
  • 212
    • http://www.icculus.org/~taylor
Goob's ethos is very conservative, which is great for keeping out bugs, but not so great for new features (or keeping coders) we shall see if this was a good or bad thing at some point in the future.

I too have felt the sting of his ever informative "it has problems" style explanations for why some bit of code must be or was removed.
I'm very conservative as well, much more so than Goober, but we really need that to actually keep the community alive with new code.  If the code gets so unstable that it can't be used then everyone loses out.  And I'm not going to speak for Goober, but my conservatism is directly related to the fact that if there are problems then it will most likely not be the person that introduced that problem(s) fixing it later.  Being conservative is a must in the type of environment that we have going here.

And I can also say for a fact that our lack of good coding standards has kept more than a few new devs from joining the project.  We are too all over the place to actually get some of the talent that we want.  Luckily they tend to stay involved to some extent, randomly giving out advice or small patches, but we have lost out quite a bit from not having those people officially involved.



And to offer what I'm sure is a complete shock to everyone here: I agree with Goober on the notion of going with ship-copy over the limbo code.  All of that code is really just too old and ****ty to really stand a change as extensive as what limbo requires.  And it has nothing to do with the amount of changes, merely with the type of changes.  Even I have tried to introduce new features into this code and it simply doesn't work.  All sorts of strange bugs tend to crop up, and more often than not they seem completely unrelated to what caused them.  Even the small things that actually did work out needed small rewrites of code, or bad hacks, just to get working well enough.  But that really doesn't need to happen for a feature that is truly needed by people.  If that code were actually rewritten, or if we had a developer who would dedicate themselves to that part of the code, then the story might be different.  As it stands now though the ship-copy idea seems the least intrusive of the two options and should work closer to how the code expects things to work.

But before everyone completely barricades themselves into one side of the argument or the other, lets just give Goober some time to code up ship-copy and then we'll actually know how it looks/works.  Until there is at least a test build to base opinions on there really isn't much point in getting stressed out over this.  One thing that I know for sure about the FS code base is that how it might work and how it actually works are all too often very different things.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
And I can also say for a fact that our lack of good coding standards has kept more than a few new devs from joining the project.  We are too all over the place to actually get some of the talent that we want.  Luckily they tend to stay involved to some extent, randomly giving out advice or small patches, but we have lost out quite a bit from not having those people officially involved.

I've semi-read the rest of your post, and may/may not respond when I get the opportunity to read it more fully (I thought this issue was dead and buried, albeit in a very shallow grave and most likely a target for gravediggers, I just didn't expect the exhumation to be this soon :p)

But I did want to address this point, because it's come up before.

I really don't like this argument. If you can prove that good coding standards have some definite effect on productivity, by all means go for it. But I've had enough of trying to appease indifferent outsiders in general. It's a whole lot easier to say "I'm not going to join your project because you suck" than it is to just knuckle down and deal with it. There's no guarantee that these coders wouldn't up and decide to move for greener pastures within two weeks of getting dev access, regardless of what concessions we made.

For that matter, stated as simply as it is, I would very strongly challenge the idea that we need to be much more adherent to coding standards. Coding standards are a nice, safe, happy utopia of what things should be like. Rigid adherence to a prescribed methodology of coding, especially as dictated by the free software community, is about as sure of a death sentence as I can see happening. (At best this would become an unheard-of cult phenomena - at least right now, we seem to be experiencing growth and additional publicity) I see a lot of posts on slashdot (and on here at times, for that matter) with things that make perfect since to technical-minded people who have spent years tinkering with computers for the sake of tinkering, but would make absolutely no sense to 'normal' people who do other, just as valuable, things with their time. And there is a very bad tendency for people to label that latter group as being somehow more ignorant of things than the technical-minded people - when it's really the opinion of the latter that matters more, because they're the ones actually using the software.

Despite all the great strides that FS2_Open has made in graphics, it severely lags behind in AI and gameplay and other areas which require some kind of creativity as well as design savvy. When we get enough funding to hire somebody fulltime to proofread all the code, let me know, but until then, I feel like it's more than a little unreasonable for people to choose not to join and blame it entirely on things not being done 'properly'.

Also, I don't know if you're referring to it or not, but my experience with the warp code has been that it looks complex, but once you dig deep enough, it starts to make sense and can be organized relatively sanely. I haven't dealt with the point where Ships start getting their information transferred between arrays, but I would hope to avoid that entirely. Mostly I've dealt with the warp effects code, which is what I'd need to understand for the limbo code. And a lot of that was done, even in the original, just as hackishly as the limbo stuff was in that section.
« Last Edit: March 12, 2008, 02:06:39 am by WMCoolmon »
-C

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
the problem is/was the whole code base was originally made with no or bad standards, it's hard to keep a ship clean when it's floating in a sea of piss.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline taylor

  • Super SCP/Linux Guru
  • 212
    • http://www.icculus.org/~taylor
If you can prove that good coding standards have some definite effect on productivity, by all means go for it.
I don't have to prove it, because plenty of other people have already done so.  And those people are far beyond my level of skill or experience so any opinions that I have on the subject really don't matter all that much.  If you doubt the idea then prove that lack of coding standards don't hurt productivity.  I'd bet that you would be hard pressed to find anything credible in that area.

There have been many studies that detail how coding standards effect productivity and quality.  There are plenty of books that cover, or at least touch on the subject as well.  Every C or C++ tutorial or book that I've ever seen at least touches on the subject coding standards.  Hell, every programming language has some sort of standard, and most/many coding groups have defined standards as well.  And they do that simply because it works better, it makes coding more efficient, it makes code easier to read, and it makes debugging far easier.

the problem is/was the whole code base was originally made with no or bad standards, it's hard to keep a ship clean when it's floating in a sea of piss.
Very true, but we have only made it worse.  In fact it's significantly worse now that the original code release made by Volition.  The problem with this group is that every developer has there own way of doing it, and pretty much nobody keeps to how the original code was done.  The original code may not be great in that area, but having multiple coding styles in the same bit of code only makes things that much more difficult.  The simple fact is that we (the SCP) have no coding standard, and previous attempts to start one have failed because nobody agrees on any of it, or even that a a coding consensus is even needed.



Both of these issues are a dead horse though, so there isn't a lot of point in continuing this here, since it is off-topic.  A few Google searches should turn of plenty of info covering these topics, and most of that info will be provided by far more knowledgeable sources than myself.