View Single Post
Old 29 December 2019, 15:03   #6
deimos
Registered User

 
Join Date: Jul 2018
Location: France
Posts: 545
Quote:
Originally Posted by VladR View Post
I hear ya with quick Build/Deploy (was in same boat myself) but Edit&Continue environment has sped up experimenting tremendously for me. Sometimes I finish some experiments in 2 hours which would be utterly impossible with constant rebuild/deploy.
Don't forget that a Visual Studio has 4 tabs with Watches and at any time you see up to 50 variables in one watch window. That's huge for productivity.
Then, as an added bonus, you see the Output Window below the source code, where you can dump several arrays worth of data, so you really always see every single variable at any time without any effort. The code kinda debugs itself...


Looks like you're trying to get all 3 aerodynamic properties going at the same time.

Why don't you first experiment with a simple linear decrease of atmospheric density (say, a lerp between MaxDensity and MinDensity based on your altitude) and adjust thrust/speed accordingly ? The Density could really be just a simple floating point value <0.25f, 1.0f>

Once you got maximum thrust/speed at highest altitude going, as a second step, add the dependency on the gravity:
- your highest thrust is when your direction vector is Down (0,-1,0) : Full Engine + Gravity
- your lowest thrust is when your direction vector is Up (0,+1,0) : FullEngine - Gravity

And you simply lerp the thrust between the two.


Only when the above is working, I would go and introduce the weight into the equations.
I'd have to get Visual Studio and learn how to use it first though.

I have added simple movement of the enemy aircraft. Now, at every screen update, it moves in the direction it's pointed in by a distance proportional to the throttle position. You can actually fly the plane around and turn the camera about to follow it. The motion isn't super realistic, but it's not terrible.

Edit: Uploaded executable. WASD/QE F1-F10 -+ to control the plane. Cursor/<> to control the camera. It's actually quite fun.
Attached Files
File Type: zip playable.zip (26.0 KB, 10 views)

Last edited by deimos; 29 December 2019 at 16:22.
deimos is offline  
 
Page generated in 0.04436 seconds with 12 queries