Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Starman01 on April 04, 2007, 12:41:31 pm

Title: turrets (again) and other stuff
Post by: Starman01 on April 04, 2007, 12:41:31 pm
Hey there,

can you coder guys please give me some inside into this matter again ? We are currently working on a new model, which is breaking probably all existing limits in this matter, so I need to find the ways for the workarounds.

This is what I need to know regarding the most recent builds (or planned within the next 12 months or so)

1) What's the current max of multipart turrets per model ?
2) What's the turret max overall (including singlepart ones) ?
3) Multipart turrets on non horizonal faces (side turrets) have afaik removed because of code problems. Any chance for a hope, that this is to be fixed, or should we aim for a workaround ?
4) What's the status of the turret fix, so that they are not firing through their motherships hull, even if the FOV says so (that would give me a perfect workaround for 3) Is this still in ? Please say yes :)

5) When having two models docked together (one in front, one in the back) can they warp in docked (I guess, because transport can do with cargo) , and most important, is it possible to play with the object mass, so that the one in the back can be moving both models ? The one in the front is the bridge, second is the engine. Why ? Simple, that way I can double the amount of multipart turrets on a huge model :)

6) When using the model suggested in 5), is it possible to use a completly different model for the target view ? Of course I don't want to target only the half model. I will have to make one invisible and untargetable, and even the damage will be needed to script so that they take simultanly damage. Quite a pain, but I see no other solution.

Hint : Issue 5) and 6) are irrevelant when 1) could be around 50 (max)

Thanks for the answers :)

Starman©
Title: Re: turrets (again) and other stuff
Post by: Starman01 on April 07, 2007, 03:51:09 am
:bump:

Sorry for being impatient, but I would like to take advantage of the long easter weekend to actually do some work here, but I would need that information first. Anyone ? :)
Title: Re: turrets (again) and other stuff
Post by: Nuke on April 07, 2007, 04:27:49 am
im pretty sure that arbitrary turret axes have been removed. mainly because some collision detection problems and for reverse compatability. id like th hear what bob has to say about that cause it was a featrue i was starting to implement into my mod. it is possible to work around it with scripting, but it essentially means redoing turret code from scratch, in lua. i can say however that its been done (by me).

i think the no fire through hull or whatever flag still works. that one just checks for a collision with a non-target object before firing. but dont take my word on it. id say just try it and if it works, yay. just remember it uses the new subsytem flags feature.
Title: Re: turrets (again) and other stuff
Post by: taylor on April 07, 2007, 10:30:56 am
It was all removed, because it was a massive mess and had a bunch of bugs in it.  We simply aren't going to go bug hunting through stuff like that anymore.  Bobboau rarely fixes any bugs so all of the issues in that code would be on the rest of us and that is simply not acceptable.  If Bob had added things in one feature at a time then we could have left some things, but as it was just one huge commit, we had to rip everything out.  We still have the changes though so eventually, when time permits, we'll go through and pick out the things that make sense and add them back to CVS.

I'm not going to have time to do that myself until after 3.6.10 is released though.  Not sure exactly when/if Goober wanted to go through it.
Title: Re: turrets (again) and other stuff
Post by: jr2 on April 07, 2007, 10:35:15 am
How hard would it be to re-create it from the ground up?
Title: Re: turrets (again) and other stuff
Post by: taylor on April 07, 2007, 11:11:13 am
We don't have to recreate it from the ground up, we just need to filter out the good stuff from the bad stuff in Bob's commit and add those good bits back.  It's not a lot of work, it just takes time, but time is in very short supply for most of us these days.
Title: Re: turrets (again) and other stuff
Post by: Starman01 on April 07, 2007, 12:58:03 pm
It was all removed, because it was a massive mess and had a bunch of bugs in it.  We simply aren't going to go bug hunting through stuff like that anymore.  Bobboau rarely fixes any bugs so all of the issues in that code would be on the rest of us and that is simply not acceptable.  If Bob had added things in one feature at a time then we could have left some things, but as it was just one huge commit, we had to rip everything out.  We still have the changes though so eventually, when time permits, we'll go through and pick out the things that make sense and add them back to CVS.

I'm not going to have time to do that myself until after 3.6.10 is released though.  Not sure exactly when/if Goober wanted to go through it.


Can you please be more precisive ? What has been edited out, the sidepart turrets or the "check hull collission" flag or even both ?

What about my other question, can you give me some information about the numbers, multipart in particular ?
Title: Re: turrets (again) and other stuff
Post by: WMCoolmon on April 07, 2007, 02:55:58 pm
I would've liked to have seen the side multipart changes. I was doing a little work on understanding that part of the code a few months before Bobb implemented his thing.
Title: Re: turrets (again) and other stuff
Post by: taylor on April 07, 2007, 04:15:40 pm
Can you please be more precisive ? What has been edited out, the sidepart turrets or the "check hull collission" flag or even both ?
It was all in one large commit with a ton of other changes.  There was no choice but to yank all of it out.  That's why I said that it would have been better if it was all added feature by feature rather than in one huge lump.  We could have easily left the sidepart and/or hull collision support in that way.  But as it stands we have to wade through more than six thousand lines of changes, most of which is bad, pointless, or just plain wrong, just to figure out what is required to get those two changes back in.

What about my other question, can you give me some information about the numbers, multipart in particular ?
Either I can't find it, or there is no limit.  I'm not sure if it's linked in with the rotating subobjects limit though, but that was is 50.  Are you actually running into an issue with a lot of turrets?

And regarding #6, yes, you can specify a different targetbox model, it's "$POF target file:" in the ships.tbl entry.  That capability has been there since retail I believe.


I would've liked to have seen the side multipart changes. I was doing a little work on understanding that part of the code a few months before Bobb implemented his thing.
Ask Goober if he still has the diff of the changes.  If not then I'll dig up the copy that I have.  Though, you can just diff it with CVS youself if you don't want to wait, the commit was made on the 14th of January.
Title: Re: turrets (again) and other stuff
Post by: takashi on April 07, 2007, 06:16:57 pm
why would you want side-multiparts? they look....wrong.
Title: Re: turrets (again) and other stuff
Post by: jr2 on April 07, 2007, 11:45:37 pm
...Maybe because the code is broken?
Title: Re: turrets (again) and other stuff
Post by: Starman01 on April 08, 2007, 01:21:51 am
@Taylor :   That's really bad news :(  As for your question, we have one huge model open that we haven't started yet and need badly.  Since our modeldesign (universe) don't "support" singlepart turrets (I mean it would simply look strange if we suddenly use it on one model) we will have to make it all multipart, and this model will need at least 50 due to it's size . But if the limit is now 50, that should be enough (it was only 20 or 25 a while back)

If possible by any means, please try to bring back someday at least the hull collission thing. Then we can mount turrets on the ships flank, but still on a horizontal axis, and they wont fire against their own ship.
Title: Re: turrets (again) and other stuff
Post by: taylor on April 08, 2007, 01:51:42 am
The plan is to bring back both features, the hull collision thing (which I have always hated the game doing) and the side mounted turrets as well.  Both features are really needed, and even I am pretty damn disappointed that we had to rip them out.  But they will deffinitely be reintroduced, there is just no ETA on when.  I might work on it before 3.6.10 is released, if I have time, but probably not until after (ie, late June).  Someone else might decide to take a crack at it in the meantime though.

And if you have trouble with multi-part turret limits let me know.  I can either try to bump something or just make any problematic limit dynamic instead.
Title: Re: turrets (again) and other stuff
Post by: chief1983 on April 08, 2007, 02:23:14 am
As far as total turret count, I could have sworn someone had been tossing around a number like 100 or 110 as a max, are you saying you can't find any thing claiming that's still accurate?  That would give us a lot more breathing room on the Super Star Destroyer for the SWC.  I doubt we'll hit the canonical number, but I had calculated that a canonically sized SSD with 100 turrets would leave each turret having to cover a radius of approximately 1500m, assuming they're spread evenly.  Being able to get something like 200 or 250, while probably breaking the game in other ways, would reduce that cover area significantly, and be danged awesome too.

Edited:  for grammar
Title: Re: turrets (again) and other stuff
Post by: Nuke on April 08, 2007, 05:03:22 am
can you detail box turrets? that would definitely speed up rendering. set it up so that only about 20 turrets are visible at any given position.

as for bobs tweaks il kinda be glad when they're back in head. the turret code just seems to be screaming upgrade me!, but it seems every attempt to optimize them tends to completely break something else. i wonder if it would be wise to have an advanced turret system, in parallel with the standard system with maybe an upgraded trt2 chunk, which would support more advanced turret arrangements, such as arbitrary axes, multiple gun subobjects (sorta like light and heavy guns on the same base with septate, but parallel, rotational axes), support for simultaneous gun and missile banks, ectgatling turrets i know its sorta re-inventing the wheel but the outcome might be better than all the other upgrade attempts.
Title: Re: turrets (again) and other stuff
Post by: Starman01 on April 08, 2007, 05:16:58 am
@Chief : Singlepart turrets have a higher limit ( something about 100 AFAIK, at least it was so a while ago). Just the multipart turrets (or rotational subsytems) have been limited far below.

@Taylor : Well, in that case I will make the model into one mesh, and will already built it with sidemounted multiparts (I just make them fix-mounted for the first releases). Since there is quite some time until the final release of WCS, you guys have plenty of time of working on that feature :)
Title: Re: turrets (again) and other stuff
Post by: Col. Fishguts on April 09, 2007, 11:38:54 am
IIRC, PCS autogeneration feature for turrets only processes 2-digit numbers (in the submodel name), that's where the 100 turret limit seems to come from. I guess the engine can handle more, if you can create them somehow in PCS ( I don'r remember offhand if you can define more than 100 turrets manually in PCS)
Title: Re: turrets (again) and other stuff
Post by: chief1983 on April 09, 2007, 12:02:52 pm
Ah.  I think Bobboau had worked on a couple fixes for PCS1, and is working on the new PCS2 gui, so maybe that will be fixed before too long.