Flight model inertia problem almost solved. . .

More
19 years 4 months ago #18324 by Second Chance
. . .but with a fatal flaw.

Hi guys. I was discussing flight manuevers the other day when all of a sudden I realized what I was doing wrong in my attempts to get the EoC ships to fly like movie ships. So I ran to my computer and tried out my new idea, and guess what? I can now get the ships to fly around like they're on rails. That's right, zero inertia. And, I can even dial in as little or as much additional inertia as I want, so the ships can slide just a little.

Obviously, the solution is related to the thruster values. But now I see how they really work together. In assisted flight, the thrusters try to prevent you from moving sideways off your flight path (momentum). The max linear acceleration value is how hard the thrusters try to do this. But, the inertia of the ship always overcomes the amount of work the thrusters can do, so you slide off your flight path. And the faster you go, the more inertia you build, and the less effective the thrusters are at keeping you on track. So, I've discovered that if you set the max linear acceleration value close to or higher than the max forward speed of the ship, it will never move off the flight path at all, ever. Zero inertia. Then, by decreasing this value below the max forward speed value, you start to dial in the inertia setting you want. The lower the max accel value, the more inertia you get. The max linear speed value of the thrusters seems to have no effect on this, so it can be left at normal or whatever you want.

Now for the fatal flaw. Thruster override and free-flight. Since there's no cap on the thruster velocity when using the override, or non-assisted flight, and with thrusters that accelerate at speeds close to full throttle forward velocity. . . Well, you can see the flaw.

You could disable thrust override and free-flight for the player, but the AI always uses it. And I haven't looked at an AI ship's flight with this setup yet. If you want to try it out for yourself and see what you think, here's what I did:

Make a quick mod for the storm_petrel_prefitted.ini

1. Most Important - Change these values in flux.ini to 1.0
Code:
[iiThrusterSim] min_xy_lateral_acceleration_ratio = 0.2 min_xy_lateral_velocity_ratio = 0.2
These values degrade the performance of the ships INI thruster performance settings on a global scale. Presumably for developer tweaking. The ships in the game actually perform at only 20% of their INI thruster ratings because of these. You don't have to change the velocity ratio, I included it for completeness.

2. Then I simply added ones in front of the lateral thruster acceleration values for the prefitted Storm Petrel (this was so I could get the original values back by just deleting the ones, and I wouldn't have to remember the original values).
Code:
; Maximum linear acceleration as a vector (m/s/s) acceleration=(1200, 1200, 300)

That's all there was to it. Load up Instant Action and fly tight circles around the asteroids. You may have to get used to fighting the AI, since they're still using the stock setup and you can't joust in a straight line and simply pivot in place anymore. You are now moving in the direction you are pointing, at all times. Just like in the movies. [8D]

Don't forget to activate the mod. I did. [:I]

Play around with the values. You'll see the inertia increasing and decreasing. And try out the thrust override and you'll see the fatal flaw I mentioned. This is probably not the solution we want, but I think I'm moving in the right direction.

mailto:second_chance@cox.net
The Ultimate Guide To Modding: I-War 2 - Edge Of Chaos (on hold during SW MP mod)
cartoons.sev.com.au/index.php?catid=4
.

Please Log in or Create an account to join the conversation.

More
19 years 4 months ago #12146 by MajorTom

Originally posted by Second Chance

... Play around with the values. You'll see the inertia increasing and decreasing. And try out the thrust override and you'll see the fatal flaw I mentioned. This is probably not the solution we want, but I think I'm moving in the right direction.


Good to see you're making progress here. Remember, we want the SW ships to fly slower but still have the low inertia. the key is probably to slow the ships down proportionally and then set the "; Maximum angular acceleration (deg/s/s)" properties higher. That gives you a faster responce to joystick movement.
(note that the storm petrel, just by chance, has rather high numbers for those values as compared to other ships)

I didn't understand your "fatal flaw". Could you eloborate some? (I can't test it out because I've already packed my joystick away.)

You may be closer than you think, at least for our SW mod, because we don't have unlimited thruster override in the MP game engine. (It just maxes out at the ships actual ini values for acceleration.)

btw, after I get to southern CA, we really should concentrate on getting the issue with the batch file fixed so it will be easier for you to test in SW/MP mode. Then we could test jointly online rather effectivly and under ideal conditions because we'll be less than 100 miles distant.



Iwar2 Multiplayer Fan Site

Please Log in or Create an account to join the conversation.

More
19 years 4 months ago #12175 by Second Chance
Oops, sorry. I forgot you asked a question in your last post.

The fatal flaw comes from the acceleration of the sideways thrusters being as high or higher than the total max speed of forward flight. With such high acceleration the ships can fly unbelievably fast, sideways. Much faster than they would normally in forward flight. And since the AI always does this, it gives them an unfair advantage.

But. . . I've been doing some testing. And you're absolutely right. The much slower overall speeds I've recently given the test ships seem to have minimalized the problem. In fact, it no longer seems to even be a problem.

And what's even better, is that I've realized a way to set this up universally, instead of going through every ship and changing the acceleration value. By changing the acceleration value listed in flux (shown in my above post) to around 3 or 4, you get an excellent response from every ship universally. But I'm using that number because I've halved every performance figure in the INI's, including thuster acceleration. At full EoC speeds, the number needs to be more like 5 or 6.

The reason this is good, is that you can set the Star Wars ships up with performance comparable to the normal EoC ships. This way, in the mod they'll fly correctly, but if anyone want to use them outside the mod, they'll also fly well against the normal EoC ships in newtonian mode. Because their performance will match.

This is, of course, just an option. There may not be a reason to do this through flux, if we decide to design the SW ship flight performance specifically for the mod.

Let me show you what I have currently, and anyone who wants can use these figures to start their own testing.
  • Based on MajorTom's suggestion of slowing the ships down, I halved all ship performance figures. So my storm petrel performance looks like this:
    Code:
    ; Maximum linear speeds as a vector (m/s) speed=(100,100,650) ;(200,200,1300) ; Maximum linear acceleration as a vector (m/s/s) acceleration=(14, 14, 150) ;(200, 200, 300) ; Maximum angular rotation (deg/s) yaw_rate=40 ;80 roll_rate=45 ;90 pitch_rate=40 ;80 ; Maximum angular acceleration (deg/s/s) yaw_accel=20 ;40 roll_accel=25 ;50 pitch_accel=20 ;40
  • Changed the thruster acceleration value in flux.ini (near the bottom) to read:
    Code:
    [iiThrusterSim] min_xy_lateral_acceleration_ratio = 3 min_xy_lateral_velocity_ratio = 1
  • Halved the performance values of all missiles and rockets. Otherwise, you wouldn't stand a chance against them.
This has yielded unexpectedly good results. I encourage everyone to try this and see if they can find problems I've missed, or haven't seen yet. Or a combination that better suites our purposes.

You may have noticed that the petrel's thruster acceleration value is different than it should be. This is specific to the storm petrel. For some reason, PS gave the storm petrel unbelievable thruster acceleration. So I lowered it to more closely match the other game ships. Remember, this is unique, so it shouldn't be considered part of the issue. All the rest of the EoC ships have more reasonable thruster acceleration values that are 1/3 to 1/8 the max thruster speed.

Now, if only we could force the AI to use assisted flight mode.

mailto:second_chance@cox.net
The Ultimate Guide To Modding: I-War 2 - Edge Of Chaos (on hold during SW MP mod)
cartoons.sev.com.au/index.php?catid=4
.

Please Log in or Create an account to join the conversation.

More
19 years 4 months ago #12176 by MajorTom
Good ideas! I'll check them out asap.

Originally posted by Second Chance


Now, if only we could force the AI to use assisted flight mode.


That shouldn't be a problem in our SW mod. For several reasons (ship specific cockpits, ect.) we'll probably have special AI versions for each of the ships used in the mod. So, we can tweak the thrusters accordingly.

Iwar2 Multiplayer Fan Site

Please Log in or Create an account to join the conversation.

More
19 years 4 months ago #12177 by Second Chance
Thanks. :D

That shouldn't be a problem in our SW mod. For several reasons (ship specific cockpits, ect.) we'll probably have special AI versions for each of the ships used in the mod. So, we can tweak the thrusters accordingly.

What do you mean? Tweaking anything won't stop the AI from flying backwards and sideways. At least assisted flight mode tries to keep you always flying forward, that's why I wish we could make the AI use it.

If your telling me that there's a way to disable non-assisted flight mode for the AI; for the love of god please tell me!!!

I've been trying to figure out how to get the AI to fly forward only from the day one. I hate the newtonian flight model.

mailto:second_chance@cox.net
The Ultimate Guide To Modding: I-War 2 - Edge Of Chaos (on hold during SW MP mod)
cartoons.sev.com.au/index.php?catid=4
.

Please Log in or Create an account to join the conversation.

More
19 years 4 months ago #12178 by MajorTom

Originally posted by Second Chance


If your telling me that there's a way to disable non-assisted flight mode for the AI; for the love of god please tell me!!!


Lol, you can't disable that mode for AI, (or anyone for that matter) because they wouldn't be able to fly (assisted flight mode is AI applied to the raw power of the thrusters).

By tweaking the X and Y thruster speeds and acceleration values you can however negate the reaction time advantage that AI pilots have (if you use AI specific ships):

; Maximum linear speeds as a vector (m/s)
speed=(100,100,650)

; Maximum linear acceleration as a vector (m/s/s)
acceleration=(14, 14, 150)

Those values are for X,Y and Z (where Z is also the max throttle speed)

If you leave them as above for the player but change them for the AI specific ships you can influence the AI advantage. Try values like this (just a guess at a starting point):
; Maximum linear speeds as a vector (m/s)
speed=(80,80,650)


; Maximum linear acceleration as a vector (m/s/s)
acceleration=(12, 12, 150)
AI would still be able to fly sideways but a bit slower than a player can. Since AI has faster reaction times than a normal player you have reduced their advantage.
Backwards (and forwards) they should have the same speed as a player. You as a player can fly backwards and blast an attacker coming at you at full speed without them getting closer (unless the attacker has a faster ship). AI should be able to do that too.

(EOC has a newtonian flight model, so we're stuck with it.)
I wouldn't want any space flight without newtonian personally. Are you perhaps relating or associating too much with your own terestrial piloting experience?





Iwar2 Multiplayer Fan Site

Please Log in or Create an account to join the conversation.