scp-fs2open / fs2open.github.com

Origin Repository for SCP FreeSpace 2 Open
https://www.hard-light.net/
Other
401 stars 161 forks source link

Idea: New object type for terrain #4727

Open The-E opened 1 year ago

The-E commented 1 year ago

This was prompted by a recent post in the Event Horizon channel on discord, where EH hit the ship class limit due to how they've built their on-planet levels, and that got me thinking: Why do these things need to be ships? Other game engines have "static" object types, usually representing things that players can't really interact with (think walls or terrain, stuff that defines level geometry but can't be destroyed or affected by player actions). We can approximate things like these with the tools available, but they do take up space that, conceptually at least, should be fundamentally different from Ships.

So here's a proposal:

  1. Create a new table, terrain.tbl. This table creates entries for terrain models that each reference a pof and may define animation triggers similar to ships.
  2. Terrain objects should be placeable and manipulatable in FRED similar to ships
  3. Terrain objects may have destroyable subobjects
  4. Terrain does not take damage from weapons fire or collisions and is unaffected by physics
  5. Terrain does participate in collisions
  6. Terrain does count against the global objects count
  7. Create sexps to add/remove terrain objects
Goober5000 commented 1 year ago

I think I talked about this with @Baezon at one point, and it became clear that there are only two significant differences between ships and terrain: AI and subsystems. Ships and terrain share a lot of things in common, such as collision, submodels, and general physical object management. Physics is debatable, but the recent improvements to the "immobile" flag might have fixed this.

I like this proposal, and it would be a good way to organize in-game objects for surface missions, but in my experience there hasn't been a strong need for a new object type given that it's not too expensive for the game to simply skip AI and subsystem handling for ships that act as terrain.