Author Topic: Question about Flight Model dynamics  (Read 2580 times)

0 Members and 1 Guest are viewing this topic.

Offline Horizon

  • 23
Question about Flight Model dynamics
In Beyond the Red Line demo from years ago, the ships move (I feel) more organically in space.  The turns are not as sudden, the stops are not as quick, there's more 'powersliding' so to speak.  This feels more natural to me given what I know about space and thrusters. 

Anyway those dynamics can make it into the flight model, or is there any way to code it myself from within the files? (I'm not a coder by trade, but I can alter small tidbits here and there.) I know it isn't really possible to add the side to side (strafing-style) thrusters to ships that do not have them, but anyway to simply alter some values within the code that would allow a more dynamic movement within my own run?  (I don't play online.)


 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Question about Flight Model dynamics
These values are easily modified in the tables using values like damping. No code access required.

 

Offline Sushi

  • Art Critic
  • 211
Re: Question about Flight Model dynamics
These values are easily modified in the tables using values like damping. No code access required.

Specifically, if you're looking for movement that is more "semi-newtonian", you'll want to:

Set $Use Newtonian Dampening: YES in AI Profiles.tbl

Increase the $Damp value in for ships in ships.tbl. You may also need to play with ship acceleration and top speed to get the effect you're after.


 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Question about Flight Model dynamics
i made an attempt at an atmospheric flight and orbital mechanics model with scripting. dispite good flight mechanics, the ability to orbit small moons and fly in mars atmosphere, it causes crashes, ai doesnt work, and collision detection is virtually non-existant. we would need to be able to need to hook in before collision detection to move objects and calculate velocities, overriding what the game would normally do at this point, then let the game run collision detection based on the physics data. then hook into collision response (this i think is possible) to apply changes in positions and velocities caused by those collisions.

the game makes a lot of assumptions about how things work as far as physics go, assuming things like velocity caps and whatnot. hooks and overrides may not be sufficient. add to that the state of the collision detection code, and you have a nightmare scenario for making a script based physics replacement system possible. i dont want to completely write off the possibility, but it would require a lot of work and you would be hard pressed not to break the existing physics of the game.
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 Horizon

  • 23
Re: Question about Flight Model dynamics
Answers so far:

Yes, it's easy!

Yes, it's easy, here's how!

I tried and got sucked in!

hehe

 

Offline Horizon

  • 23
Re: Question about Flight Model dynamics
Nuke if you happen to  make a breakthrough there, I'd love to hear about it.  Meanwhile, I'll be playing with the damping and collisions can so be it.

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Question about Flight Model dynamics
you can pull the current version off of svn, see this thread:

http://www.hard-light.net/forums/index.php?topic=69358.msg1369566#msg1369566

linear physics work great, angular physics need lots of work. ai is borked and collisions will most likely will crash the game.
« Last Edit: February 24, 2011, 02:12:31 pm 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 Horizon

  • 23
Re: Question about Flight Model dynamics
I'm noticing a lot of references around to .tbl files.  I can't seem to find any under them main FS2 directory, where should they be located?  I dl'ed from GOG and installed the original before I got FSopen.  My tables directory under Data is empty.

  

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Question about Flight Model dynamics
The core FreeSpace 2 files are all stored in the .vps in the main directory. Extract the ships.tbl using Maja or VPView to [yourmod]/data/tables, modify it there. Select [yourmod] in the launcher to play with it.