Jump to content
• Advertisement

Scrolling flight engine - A little advice

This topic is 4569 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm in the process of building a sci-fi flight/combat-based game demo using DX9 and recently came across some hurdles.. I want to build the engine to accomodate the feel of high altitude flight with landscape and water which would pass by but never ultimately being reachable (i.e. no matter how low you fly you'll never actually reach the ground, similarly no matter how high you go you'll never go into orbit..) Basically I had an idea of how I would have done it but after consideration it doesn't seem to be feasible so I was wondering how best (optimally) something like this would be done? Also I would love to fill the airspace (dimension of space where the player can move around in) with clouds to fly through but I'm also aware of the computational intensity you can get when you have stupid numbers of particles on screen at once which is something I want to avoid (i.e. sacrificing game performance for graphical "wow-itry"..) So any tips on how I could put together a method of generating alot of clouding that looks good and performs very quickly/efficiently..? Any help would be much appreciated!

Share this post

Share on other sites
Advertisement
Have you seen this?

http://www.gamasutra.com/features/20040114/wang_pfv.htm

Share this post

Share on other sites
I haven't tried anything like this, but how about letting the ground model be of constant distance from the plane?

So the code would go something like
ground.Y = airPlane.Y - 2000.0f;

Share this post

Share on other sites
A ground that is unreacheble....
Interesting

how about this:
the ground is rendered a fixed distance below the plane, this keeps it from being reachable, but we also lose the sense of being able to fly up and down
To fix this:
Rather than having the airplane's altitude change the distane to ground, have the ground Scale larger and smaller (but remain a fixed distance)
In order to avoid giant polygons and tiny polygons as the ground scales to extremes, you will need to use something Procedureal like DiamondSquare or Perlin noise to constantly re-generate the ground and add/delete new vertices between existing ones as it gets bigger/smaller

Share this post

Share on other sites
Quote:
 Original post by tagHave you seen this?http://www.gamasutra.com/features/20040114/wang_pfv.htm

Wow that was just what I wanted!! Thankyou soo much!!

In response to some of the suggestions so far,

I'm not sure how feasible those methods suggested would be.. If the ground/land remained a constant distance from the aircraft then wouldn't it kinda be a waste of calculation having to move the land vertically each frame as well as everything else..? I pretty much want the land to remain where it is but just move the objects in the air such as the planes and other crafts etc..

Also haphazardlynamed technique would work but this woulds still allow the players craft to *visually* move closer and closer to ground which is not really what I was hoping for..

Let me try and clarify..

For example, In space sims, the player can move around in space and has a real sense of the change in spacial positioning as he goes.. However, when the player directs his craft towards a planet for example, he can fly forever but won't ever reach it which give the impression that the planet is so far away it would take nearly a lifetime to get close travelling at the current velocity..

So essentially I wanna do this but not in space, in the sky, where the player has a dimension of space where he came move around and can *attempt* to decend to ground but will never get there..

Also I don't want the ground to be static either.. I'd like the ground to display visible ocean with land masses which can move *very* slowly to give the impression that the enviroment is scrolling (much like afterburner for example..)

Hope this makes more sense..?

Anyway so any ideas how best this would be performed?

Share this post

Share on other sites
Keeping the ground a fixed distance away from the player seems like the only reasonable way to achieve that level of "distance". You can give a sense of moving up and down by providing local reference points (e.g. clouds, raindrops, other planes) that the player can move closer to or further away from. The extra addition when drawing the ground isn't a big deal; computers perform millions of operations like that every second.

Share this post

Share on other sites
(Assuming the game is rendered using D3D), sounds like you're simply talking about using a 1-sided skybox.

Share this post

Share on other sites
Quote:
 Original post by ArchangelMorphIf the ground/land remained a constant distance from the aircraft then wouldn't it kinda be a waste of calculation having to move the land vertically each frame as well as everything else..?

Not at all, you would only change the translation.

Share this post

Share on other sites
Ok thnx, I'll give it a try and see how it goes..

Share this post

Share on other sites

• Advertisement
• Advertisement

• Popular Contributors

1. 1
Rutin
26
2. 2
3. 3
JoeJ
20
4. 4
5. 5
• Advertisement

• 10
• 9
• 9
• 10
• 46
• Forum Statistics

• Total Topics
631751
• Total Posts
3002078
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!