remix logo

Hacker Remix

IOCCC Flight Simulator (2010)

161 points by smig0 2 days ago | 24 comments

pickledcods 2 days ago

This entry inspired me to write this javascript implementation to test my high-speed GIF encoder, which I used for animations in the pre-canvas era. It needs keyboard arrows to navigate.

https://xyzzy.github.io/jsFlightSim

I tried to reverse-engineer the code to understand how the model in the simulator worked, only it raised more questions than answered. I did uncover that the author had flight simulator writing experience, so the mechanics were truly obfuscated. Carl, amazing piece of craftsmanship, tipping the hat!

HanClinto 20 hours ago

Kudos on the port -- it's really, really well done!

HanClinto 2 days ago

Wasn't able to find a video of the app working, but did find this Javascript port (?), and it seems to roughly match the appearance shown in screenshots:

https://xyzzy.github.io/jsFlightSim/README.html

NavinF 2 days ago

It's very hard to avoid rolling upside down and I wonder if that's intentional. IRL you can just let go of the controls and most aircraft will be stable and fly close to level

simne 1 day ago

> you can just let go of the controls and most aircraft will be stable

This is not rule.

Some planes named "friendly to novice pilot", and are stable, others are not, and this is somewhere predictable when design.

I even hear, Lindsberg, when was preparing for his flight, asked designer to make his plane unstable, because typical stable flight is very boring and he scared to fall asleep.

In other cases, modern planes like 737s and larger scale, usually considered to have zero stabilization in design and if need, stabilization created by electronics (navigation system is usually made as very high precision inertial platform, so could in most cases know, how should fly to looking stable). This is because design stabilization costs additional resistance, less payload and more fuel consumption - for 737 scale it is about 1-3 additional passengers and few percents of range. Military planes and some aerobatics now are designed unstable for better maneuverability.

I don't say, this new trends are good, just notice.

addaon 1 day ago

Just about all useful airplanes are stable in pitch (either statically stable aerodynamically, or closed-loop stable with an enhanced stability system), but roll stable aircraft are relatively rare. Most aircraft are slightly spiral unstable, at least beyond a critical bank angle; but the double time constant is so slow that it's a non-issue.

mfex 2 days ago

After this was posted here in 2017 I made a version in ClojureScript, where you fly over Amsterdam instead of Pittsburg.

http://thegeez.net/2018/04/01/flight.html

pvg 2 days ago