165 points by smig0 9 months ago | 25 comments
pickledcods 9 months ago
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 9 months ago
HanClinto 9 months ago
NavinF 9 months ago
simne 9 months ago
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 9 months ago
mfex 9 months ago
HanClinto 9 months ago
> Evidently, all the rendering and controls can be handled by shoving all the math through a single matrix.
That's absolutely mind-boggling to me, and I would love to read more about this.
pvg 9 months ago
gmiller123456 9 months ago
#include "/dev/tty"
simonwistow 9 months ago
cc banks.c -o banks \
-DIT=XK_Page_Up -DDT=XK_Page_Down \
-DUP=XK_Up -DDN=XK_Down -DLT=XK_Left -DRT=XK_Right \
-DCS=XK_Return -Ddt=0.02 \
-std=c89 \
-Wno-unsequenced -Wno-implicit-function-declaration -Wno-implicit-int -Wno-empty-body\
-lm -lX11 -L/usr/local/Cellar/libx11/1.8.10/lib/ -I/usr/local/Cellar/libx11/1.8.10/include
cbeach 9 months ago
jboy55 9 months ago
compiled on my laptop on WSL.
sudo apt install x11-common libx11-dev
make
ran with
cat horizon.sc pittsburgh.sc | ./banks
cbeach 9 months ago
pvg 9 months ago
thih9 9 months ago
Not a video of the program running.
cbeach 9 months ago
account42 9 months ago
mianosm 9 months ago
9 months ago
zendist 9 months ago
bruce511 9 months ago
I remember one back in the day which wasn't obfuscated at all. It was clearly a simple utility. Except that it didn't do what you thought it did, it did something completely different. (alas I can't remember the details...)
thih9 9 months ago
Perhaps it was the Underhanded C Contest[1][2]? It's another competition, entires there often seem simple and perform something unexpected.
thamer 9 months ago
For an example, see this StackOverflow question and its detailed answers for an overview of what obfuscation techniques can be used, although many more exist of course: https://stackoverflow.com/questions/15393441/obfuscated-c-co...
I was able to compile it on macOS, but had to include an extra flag to stop clang from being too strict (version 16):
cc -Wno-implicit-function-declaration -std=c89 -o test test.c
./test
dvh 9 months ago
NavinF 9 months ago
9 months ago
tiahura 9 months ago
atan2 9 months ago