Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: headdie on May 10, 2010, 03:00:56 am
-
over the last few weeks I have been thinking about how subsystems are handled in game, as it is we have a system that uses spherical empties which defines an area which any surface within that is hit in any way deducts from the damage total for that subsystem, while this is fine for most applications it does have limitations for example there are one or two models which parts of the engine section are outside the engine sphere for various reasons.
The solve for this that I am suggesting and i know it would take a complete rebuild of how the engine handles subsystems but would it be possable to use 8+ similarly named empties to form a box which defines the boundary's of the sub system area
-
Or you could just detach that part of the model, make it a subobject, make that subobject a subsystem, and if needed either do an actual -destroyed version or just clone it and make a dummy -destroyed version. Perfect hitbox every time.
-
Would it be equally beneficial to bed other shapes which can be used in tandem. Rectangle or square like the asteroid editor in fred?
Edit- agree with fubar although subobjects already work don't they?
-
Yea they work that was the idea to use those on those pieces that don't fit nicely into a sphere.
-
OR
we remove compiled-in subobjects all together. subobjects would have their own models, with their own lod trees and their own collision info, maybe even their own tables. they would get their own object derivative. to avoid breaking existing mods and packward compatability, you could procedurally seperate the subobjects from their parents and add the models to the cache. this would fix a multitude of issues and add a multitude of features:
turrets and subsystems would be modular!
turrets could have more complex collision detection
transparent textures could be made to work on subobjects
subobjects would lod based on its distance to the camera, rather than parents distance (ineffitient for large ship)
more detailed first lod, since turrets 3 klicks away arent being drawn at the same lod as their parent!
-
Keep reminding us Nuke, never give up :)
I want to see detached turret models too.
-
it just seems like it would fix so many problems and it would be incredibly useful.
-
What about an approach where we keep the current system, but introduce a new kind of special point that could basically serve as an anchor point for a submodel? Similar to the way that external weapon models work right now.
-
Treat docked object as subsystem perhaps? Could be very useful especially for cargo ships.
-
you could probibly define the anchor point position and orientation right in the ships table. if turrets have their own table then a link to an entry in that table, otherwise information about the weapon and model. of course this only adds the modular subsystem system, this doesnt fix the other problems (collision, proper lod-ing, and transparency).
-
Well, the dockpoint approach has the advantage that there's a system to deal with docked objects in place already. It also removes the need to figure out placement coordinates to put into the tbl, just say something like "On mount x, I want a turret of type bla".
The tricky bit would be to rig the system so that subsystem targeting still works correctly, as well as the AI dealing with it the right way.
-
i could see using dockpoints as turret mounts. the properties field could be used to differentiate a turret mount from another kind of dock. turrets i figure could be modeled y+ being up and 0'0'0 being the point that lines up with the dock position. i can see that working.
now back to my original point about fixing long time annoyances (dare i say bugs or hacks) ive had with the engine since before i could remember. will this allow turrets (and any other subsystem) to lod correctly with distance from the camera rather than its parent's? will transparent textures on the modular subsystems blend correctly with the parent hull? and can the subsystem have more that spherical collision detection? these are the 3 things i do not like with the way freespace deals with subsystems. any feature/fix/overhaul/improvement that mitigates any/all of those issues is welcome (and of course modular turrets will make creating new capships a million times better/faster/easier/funner).