Hard Light Productions Forums
Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Lynx on November 23, 2003, 02:05:54 pm
-
Here's something I worked on beside my other stuff from WCS: The Gettysburg class battlecruiser from the WC1 timeline! It's not on our plans, but I'll add it anyway.;) An I didn't fell victim to the fanboy disease, I didn't pull it out of my ass just because I can, it's a canon ship, it's mentioned both in the Game and the novel(we just don't see how it looks) I won't texture it now since I've got lost of other more important things to do, but when I do it, It'll get all new individual textures.
I have some questions on the turrets though(I'll flip them later, but for the screenshots it looks better when they point forward).
See the huge turret in front of the bridge, the two laser batteries to the sides of the bridge and the one between the bridge and the upper tail fin? Since I haven't made a capship before, just fighters, I don't know: Is the turret fov adjustable to avoid them firing throught the hull( or in case of the big twin turret that it doesn't turn around 180° and intersects with the bridge) or can give me someone better turret positions? Thanks:)
(http://www.scifi-3d.de/wcsaga/Lynx's stuff/Getty1.jpg)
-
Nice!
-
Dayum!
-
oh,nice:yes:
-
I've always been impressed with your work on the Gettysburg. This latest looks like you took into account all the flaws of the previous version. Nice work.
-
Yeah, that's the final version now. Ingame it should feature three triple barelled heavy neutron turrets, nine twin laser batteries, a cruise missile/torpedo launcher, (and probably a twin plasma cannon - the huge twin turret, though I still have to discuss that with someone). Now I would appreciate if someone experienced with turreting would comment on my questions I posted above; since judging from what I know about the FS engine this model is a #1 candidate for turrets firing through the ships hull if not taken care of it.
-
FS2 turrets will willingly and knowingly fire through the hull of their parent ship. Take the turret in front of the bridge superstructure for example - giving it a FOV which would avoid the superstructure means it can barely move from vertical. Or, you give it the FOV you want and it shoots through the hull. The SCP guys refuse to touch this and other turret issues, claiming that they're scared.
-
Hmm, I thought there was a way....seems that I have to rearrange some of the turrets. Damn FS turret system.:(
BTW don't you think that ship would be reason enough to implement turret recoil;7
-
Nice :yes: ,although I'm not a big fan of wings on capital ships.
-
have you LOOKED at the turret code, it is freak'n mean
and that turret in front of the bridge isn't a problem, just give it a 90-100 fov and have it pointed half forward by defalt
also the turrets are all going to have to point in there center of view in the model (generaly strait up/down)
and use auto-faceting for the shadeing
-
Originally posted by Bobboau
just give it a 90-100 fov and have it pointed half forward by defalt
You can do that :confused:
Every time I've tried, the model simply refuses to work correctly.
-
Originally posted by Bobboau
have you LOOKED at the turret code, it is freak'n mean
So rip it out and code all new turret code. It may take a while but the benefits will outweigh the cost.
-
yeah you can do that, look at the Aeolis
and that's part of the reason it's so ugly, there isn't simply a block somewere that says
/*start turret code*/
...
/*end turret code*/
it's all snaked into the subsystem code and the AI code and the model hierarchy handeling code and the weapon code and the ship code and the high level object handeling code the parseing code and... you get the point yet?
if anyone were to try to rip it out they'd likely remove some large chuncks of other vital organs as well
-
I know the aeolus does, but it's also got the default axis set differently doesn't it? As I said, I've tried repeatedly to get that to work, with no success. The turrets always try to point the wrong way.
-
I've never had any problems, just have them set half forward or half back and make sure they've got the corect normals (wich PCS will do for you now), and don't even bother with the axes, the game doesn't even give a damn with regards to turrets
-
Nice. I'm feeling all inferior now. :D
-
Originally posted by Bobboau
have you LOOKED at the turret code, it is freak'n mean
and that turret in front of the bridge isn't a problem, just give it a 90-100 fov and have it pointed half forward by defalt
Doing that don't work, sorry. You'll just get weapons fire that misses everytime (unless you are using flak or a none 'Swarm' weapon), and the barrels will not point at the target, but off to one side, which is just:wtf:
And the turret will STILL fire though the ships hull.
Just my POV:nervous:
Bobboau, the first time anyone asked for a fix to this, you said that it was "...a five minute fix ..... that requires half an hour of trawlling though code to find...." Please, prove this.'Tries to give a sad puppy dog look, realises he can't do, switchs to growlling, very scary, very annoyed raptor look'
-
Originally posted by Bobboau
and that's part of the reason it's so ugly, there isn't simply a block somewere that says
/*start turret code*/
...
/*end turret code*/
it's all snaked into the subsystem code and the AI code and the model hierarchy handeling code and the weapon code and the ship code and the high level object handeling code the parseing code and... you get the point yet?
if anyone were to try to rip it out they'd likely remove some large chuncks of other vital organs as well
I have a very limited knowledge of c++ (and it's something of many years ago), nonetheless I thought it wouldn't be difficult even for me to add small things like for example what argv did for virtual shields...
I opened (an year ago I think) cvs and started reading some code looking expecially for shields, turrett targeting etc....
I closed it after 10 minutes.
Admittedly I never looked at a code of this complexity before (nor I had the skills to), but what really scared me is the way it is organized.....or better, the way it ISN'T organized:p
Bob is right, what makes a proposed change easy or hard to do, is how many other parts of code this change will affect rather than its complexity. And you can't simply say "it is a mess? then rewrite it!", because you have tons of values that will be used in other parts of the code, and that you will have to track if you want it to work. If you want to re-organize the code, you would probably have to rewrite almost all the game.
Sometimes we propose changes that look very easy, we express them in a logic way, like an algorythm, that sound simple and easy, but infact they aren't easy nor simple.
In this case, we know for example that the game already check if an object is visible or occluded when targeting (an occluded object has a different reticle).
I remember I thought that if it already check if a subobject is occluded or not, probably it should be easy to have the engine check if a turret's target is occluded or not, and then you will just have to don't make a turrett firing if it's target is occluded.
Even not considering eventual performance hits, this sound trival, easy, simple...as easy or simple or just attractive sound many other proposed solutions....
But if they have not been implemented before, well it means that they are nor simple nor easy:)
A change in the turrett code will require a lot of time, and a lot of time in debugging too, and with all the coders looking for HT&L, I think we will not see it in short time; nonethless, I hope to see this one day or the other, just bear in mind that it can't happen soon
-
OK, just to re-iterate and make extra clear the turret rules which have been mentioned already:
A turret has a Field Of View given in degrees. This represents a cone around the normal. A FOV of 20 would mean the turret could fire at targets up to 10 degrees away from its normal.
A turret's normal is a line comming out of the fire point of the turret (where the weapons fire originates). For single-part turrets this can point any where you like.
Multi-part turrets must have their normal pointing either straight up or straight down. IT'S THE LAW. Trying another angle will result in the turret either not working or having the barrels not point in the direction they are firing (looking stupid as a result)
The Aeolus cheats a bit - it has multi part turrets pointing both up and forward. It gets away with this by having flak on those turrets, so you don't really notice the resulting dodgy angles. It's not something we like to encourage, though.
Now, Mr Bobbau, if the turret code is too horrendous to fiddle with (and I won't questiuon your assesment), could you at least make turret fire impact the hull of its parent ship? ANYTHING to stop turret fire comming at you through the hull of your target...
[EDIT] Dammit, my cigar went out as I wrote that...
-
Originally posted by diamondgeezer
I second you DG, on all points.
-
Originally posted by an0n
Dayum!
Frah mah hahd!:p
-
Ship.Sexy()
-
Originally posted by diamondgeezer
Now, Mr Bobbau, if the turret code is too horrendous to fiddle with (and I won't questiuon your assesment), could you at least make turret fire impact the hull of its parent ship? ANYTHING to stop turret fire comming at you through the hull of your target...
yeah on that, but does not let it make damage if it happens, tho.
About the turret code pb, btw:
That's something that kinds of worries me about the SCP's way of doing things: sounds to me like you're avoiding all the large pbs coz they're difficult to fix. Sounds like you're too busy laying fresh paint on that broken car, if you know what I mean.
Isn't it possible to strip off all that ugly turret code, reorganize it and put in back in a cleaner way?
I think the very first endeavour the SCP dudes should have started, before everything else, was the Great Spring Cleansing.
-
If I correctly understood, I think nico that the problem is that "cleaning" the code isn't that easy, because you can find functions of the turret code here and there, and many functions are connected with other parts of the code here and there. As result, it is incredibly difficult to track all the turret code and all the code that will be affected by it.
Unless you want to rewrite a good part of the code in a little more organized way
BTW I think that althought difficult, some modifications will be necessary, at a certain point
-
cleaning up the origional FS2 code base isn't "difficult" it's downright IMPOSSIBLE
V used ****ing GOTOs and non-localized variables,etc
the only way to fix some of the fundamental bug is not to - don't fix, rewrite the entire engine from the _ground_ _up_
[/me hmms... and considers]
-
I can tell you now that the first sacrifice of coding to a deadline is cleanliness - it's all very nice having a well planned system, with nice hierarchy, design patterns, encapsulation, etc - but after about an hour of coding you'll find youreslf having to squash in some specific optimisations, or adding specific case checks into general case methods, or plain ;fudging' for effect.
And i'm talking about a system that is miniscule in comparison to the FS2 codebase, and which uses (at least) OO functionality..... any large scale system will - unless given inifintie time and budget - degenerate into alphabetti spaghetti.
Sure it'd be nice to have a dedicated framework with nicely defined hotspots, etc, but we don;t have it and never will. some things just can't be done, and people have just got to accept it..
-
Please let me know when this monster is ready for downloading cause I want it for some mods I could come up with. Its just so massively big and beatiful.
-
Here's the (almost) ready version of the Gettysburg!
(http://www.thelairofcaptainobvious.50megs.com/MyStuff/GettyA.jpg)
(http://www.thelairofcaptainobvious.50megs.com/MyStuff/GettyB.jpg)
(http://www.thelairofcaptainobvious.50megs.com/MyStuff/GettyC.jpg)
-
Me LIKES!:yes:
-
very nice model and texsturing:nod: :yes: :yes:
-
cool but can you make the turrets ontop of the nose 2 or 3 barreled?
-
Originally posted by Ashrak
cool but can you make the turrets ontop of the nose 2 or 3 barreled?
They may be 2 barreled already. Look closely at the untextured pics.
-
3 barrelled - you can see in the middle pic.
-
You must have better eyes than me :D
Ohhh. 4500 posts. I missed 4000 so I'm glad I caught this one
-
Very cool. :nod:
-
Very. Damn. Sexy. Nice. :yes: :yes:
-
Good god ALMIGHTY!
I have dreams about this ship already. Couldn't believe it would turn out THIS beautiful.
I also stand by my pledge. You release it, I will make a campaing out of it. (FO'REAL!!!)
-
Now I hope it works ingame. Since i hate using tiling textures only since that the perfect way to make even the prettiest ship ugly unless the model itself is rather high detailed, I always put some individual textures on the capships to, like the windows or the red stripes here. Burt apparently it's too much textures for HTL. None of my ships have over 20 or so textures, but it still seems to be too much for HTL. Hmmm...:blah:
-
it is a perfect example of codding that forces us to remake certain capital ships. I dunno why they codded htl mode this way, surely not to give us additional work :(
-
I didn't even used that much individual texture maps on my ships; it's three or four, maximal. The rest is just a different amount of tiling textures. Darn...
-
it is not the number of maps itself, but the number of materials
-
I believe you're making a problem out of smg. that wouldn't be if you had known more of the issue.
HT&L wasn't coded like this to annoy you, but only because that's how the technology works. You have to send as many triangles to the card as fast as possible and with multiple textures you have to keep switching the VRAM's content killing the whole process.
This is the reason you can't use too many textures.
However there is no limit on how BIG textures you use.
What you need is to bake the textures with LW or smg. else and use huge big ones instead several little pathces.
-
Originally posted by Tolwyn
it is not the number of maps itself, but the number of materials
you sure? ( altho on lowpoly ships, mat and map count should be the same, it's not like you're using procedurals or anything )
-
just looked into the way TS is handling materials on FS models: yes, you are right.
@Lynx: I just counted: Jutland for example, uses 20 maps in lod 1, this are 5 textures too much.
-
Good. I just came to the conlusion that the remapping process isn't nearly as time consuming and annoying as I thought. And the Gettysburg does already fit into thae limit. Wohoo! Have a Guiness on me!:D
-
Originally posted by Lynx
Have a Guiness on me!:D
your wish is my command ;)