This is a tiny flight simulator based on a Cessna-172R with a G1000 glass cockpit. (This is the plane I fly in real life, so I thought it would be a challenge to see if it can be done with Pico-8.)
The flight model is not based on theory but on my observations as a pilot. I have to say that it's quite good ;-) Within the limits of Pico-8 it quite feels like the real thing.
Disclaimer: while I created the instruments and the flight model, the majority of the programming work was done by @freds72, including 3D outside view, code structure, eye candy, music, etc. Many thanks Fred, this would not have been possible without your ninja programming skills!!
If you want to go flying right away, the cheatsheet will get you in the air in less than 1 minute:
If you are more the serious type, there is a 34-page flight manual, which explains everything in detail and features 20+ flight lessons.
We also created an entire area you can fly in (with a mountain, an island, ships and much more):
Just as a sneak preview, here are some of the things you can do:
High speed buzzing
Illegal low-level flying at night
Instrument flying in the clouds
Here is the real cockpit on a flight in the Swiss alps to compare:
The full approach is probably worth explaining in more detail. You are inbound to Pico VOR (a navigation beacon - blue dot on map display) at 3000 feet. You will now continue to fly your inbound course of 313 degrees while remaining at 3000 feet. The blue arrow on the HSI (horizontal situation indicator - round instrument in the middle) always points towards Pico VOR and the number at the bottom left shows the distance to it in nautical miles. As you pass over Pico VOR, you will observe that the bearing pointer changes direction and now points directly behind you and the distance to the VOR will start increasing. Continue to fly a heading of 313 degrees at 3000 feet while observing the distance from the VOR.
Pay close attention to the green arrow on the HSI once you are at 6 miles. The middle part of the arrow will start moving towards the airplane symbol, which means that you approach the runway centerline. Once you are almost on the centerline, start turning to a heading of 265 degrees - AWAY from the airport! This is now the moment to reduce power (to around 2000 RPM) and descend to 2000 feet (at around 1000 feet per minute).
Level off at 2000 feet and slowly turn right 45 degrees to a heading of 310. Fly for one minute and turn left 180 degrees to a heading of 130. Now you are at a 45 degree intercept angle for the final approach towards the airport. Once again, closely observe the middle part of the green arrow on the HSI. As it starts moving towards the airplane symbol slowly turn left the final approach heading of 85 degrees.
Try to keep the moving part of the green arrow in the middle (this means that you are on the extended runway centerline). If it is to the left of the airplane symbol this means that you are to the right of the runway centerline. Turn left a couple of degrees to re-intercept the centerline and turn back to the final approach heading 85. Keep the line centered! Now things start getting busier.
At around 6 miles from the airport (pink number on top right), the green dot next to the altimeter will start moving. This is the glide slope indicator and it will tell you how much you need to descend to end up at the beginning of the runway. Once it starts reaching the center, you will start a gentle descent towards the airport: deploy flaps (Q), reduce power to around 1700 RPM and lower the nose a bit, such that you get an indicated airspeed of around 90 knots and a descent rate of around -500 feet per minute. This will keep the glide slope centered. If the green dot is above the center, this means that you are below the glide slope and you need to pitch up and add a little bit of power to re-intercept the glide slope. Try to keep the glide slope and the green arrow centered.
At around 3 miles from the airport, you will see it appear as a green dot on the map display. Keep everything centered! At around 200 feet, reduce power to around 1200 RPM to slow down the airplane to 65 knots while still keeping the green arrow and glide slope centered. At around 50 feet, slowly reduce power to idle and start gently raising the nose. Your goal is to be in a slightly nose high attitude, at 50 knots by the time the altimeter and the distance to the airport both read zero.
Congratulations, you have successfully shot an instrument approach and landed the airplane - welcome to Tiny Municipal Airport!
This description is valid with no wind. If you fly with wind, it will push you away from where you want to fly, so you need to correct your heading a couple of degrees into the wind. Check the wind arrow to see where it is blowing from. Example: if you are on final approach (heading 085) and the wind is blowing from the left (060), it will push you to the right. The localizer will start moving to the left, so you will need to correct into the wind and towards the localizer to a heading of let's say 078 to recenter the localizer.
If this is confusing for you, here is what the entire will more or less look like in the map screen.
I am really impressed by this project, a lot less by the code structure and how you do 3d!!
I have a solid framework to do 3d flightsims (draft below) - happy to colaborate if you want.
@freds72 Thanks for your comment regarding code structure and 3d. These are literally my first lines of code and I'm afraid that this is about as good as it gets ;-) This being said, I am seriously impressed by your projects! If you have some time to spare, I would be more than happy to collaborate and improve this cart.
For those interested, unminified source code & assets can be downloaded from:
[Please log in to post a comment]