Jump to content

View more

Image of the Day

Inventory ! Va falloir trouver une autre couleur pour le cadre D: #AzTroScreenshot #screenshotsaturday https://t.co/PvxhGL7cOH
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Simulating flight dynamics in two dimensions

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
4 replies to this topic

#1 carterza   Members   

155
Like
0Likes
Like

Posted 01 February 2013 - 12:27 PM

Hello all,

 

I have decided that in order to improve my math skills and game programming skills I am going to work on a two-dimensional space simulator. The view of the player or camera will be from inside the cockpit of a spaceship. This presents quite a few challenges which I am looking to the gd.net community for help with. I'm not asking for any code or any specific answers, just suggestions on what subjects to research.

 

My first challenge is going to be related to perspective correction. Since I'm only working with two-dimensions I need to fake flight dynamics. If you imagine that you are sitting in a cockpit of a spaceship, when you move the flight stick to the right or left the ship would yaw in either direction. Simulating this in two dimensions is much more difficult than in three dimensions, as you have to apply some sort of perspective correction.

 

The same is true if you were to pitch the nose of the spacecraft up or down. Simply moving the camera along the x / y axes won't be enough. I need to correct the perspective of my camera so that it appears that the aircraft is actually yawing / pitching in the desired direction and not just panning upwards / to the side.

 

What is the basic mathematical formula for applying this kind of perspective correction? If a formula is too much to ask for, where can I read about examples of this being done / read about the basic concepts I need to understand to accomplish this?

 

Thanks!



#2 Álvaro   Members   

20922
Like
1Likes
Like

Posted 01 February 2013 - 08:55 PM

I have a hard time imagining what you mean by a 2D space simulator. It looks like you are trying to get all the effects of a 3D simulator but somehow calling it 2D. Just use 3D geometry and be done with it.

#3 Ameise   Members   

1148
Like
0Likes
Like

Posted 05 February 2013 - 01:57 PM

It sounds like he's trying to do something reminiscient of Wing Commander 1 and 2, using sprites.



#4 LorenzoGatti   Members   

4365
Like
0Likes
Like

Posted 06 February 2013 - 05:01 AM

Since I'm only working with two-dimensions I need to fake flight dynamics.

No, you are flying in three dimensions and therefore you should use an ordinary 3D rigid body simulation.

You can build "2D" graphics, whatever it means, on the solid foundation of a properly moving aircraft and camera.


Omae Wa Mou Shindeiru


#5 Norman Barrows   Members   

7149
Like
0Likes
Like

Posted 10 February 2013 - 11:44 AM

No, you are flying in three dimensions and therefore you should use an ordinary 3D rigid body simulation.
You can build "2D" graphics, whatever it means, on the solid foundation of a properly moving aircraft and camera.

 

Here! here!


Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

 

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

 

 





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.