Live data from Hacker News

Translating a Fortran F-16 Simulator to Unity3D

vazgriz.com

81–90 of 129 posts

Re: Translating a Fortran F-16 Simulator to Unity3D

#81
post #68

Earlier quoted context omitted.

Falcon 4.0 source code leak led to Falcon BMS, still actively developed today.

Falcon 4.0 was one of the worst bugfests I ever encountered, practically unplayable; the modding community did a tremendous job to fix and improve that mess. At the time of its release it was even worse than Privateer 2: The Darkening , a title whose structural imperfections were only matched by its utterly bizarre Britkraft sci-fi setting.

Privateer 2, as I recall, just had the "Privateer" name slapped on a completely unrelated project due to executive meddling.

That aside, I kind of weirdly liked it. The story was hard as hell to follow, but the setting was interesting in a trippy way.

Re: Translating a Fortran F-16 Simulator to Unity3D

#82
This is an epic blog post!

In the words of Jerry Maguire: "You had me at hello."

This early sentence really hooked me:

    > While I am a professional software engineer and I have worked in the aerospace industry, that doesn’t mean that I understand what I’m doing.
My favourite part: The image comparing X/Y/Z axis between different 3D modelling products: https://vazgriz.com/wp-content/uploads/2025/05/EmVSW5AW8AAoD...

Plus the comment below can make you laugh hard enough to get Coca Cola up your nose!

    > Mathematically speaking, these are all equally valid. But we all know that Unreal made the worst possible choice

Re: Translating a Fortran F-16 Simulator to Unity3D

#83

Awesome achievement but I have to say the units stressed me out. I hope that in the real world there's some kind of dimensional analysis code linter that verifies no one is comparing slugs to feet or something, and that altitude doesn't go below zero.

> altitude doesn't go below zero

Uhm...

https://www.c-130.net/forum/viewtopic.php?p=9974&sid=bb425b3...

Re: Translating a Fortran F-16 Simulator to Unity3D

#84
post #49

Earlier quoted context omitted.

Ada too, which is of course Pascal-based. Like many programming language features, it feels like it was lost simply because C didn't have it and everyone wanted to copy C.

In C can't you just offset pointer and then you'll be able to index with arbitrary starting value?

Yes. I do this a lot when writing linear algebra stuff. All the math texts write things in 1-based notation for matrices. The closer I can make the code match the paper I'm implementing makes life so much easier. Of course there's a big comment at the beginning of the function when I modify the pointer to explain why I'm doing it.

Re: Translating a Fortran F-16 Simulator to Unity3D

#85

Earlier quoted context omitted.

I think it's down to personal preferences/how you think. I haven't actually used any languages that didn't have 0 based indexing, but I remember it being very painful and super unintuitive to learn, it just didn't make sense at all (still doesn't, but it's not a problem for me anymore). I always thought 1 based would make a lot more sense and be way easier to learn.

The zero-based approach makes sense in C, where it is syntactic sugar and `a[i]` is equal to `*(a + i)` Treating it as offset of 0 is logical. The more you go away from raw pointer semantics the less intuitive it gets.

For extra fun, in C you can write i[a] since addition is commutative *(i+a) == *(a+i)

Re: Translating a Fortran F-16 Simulator to Unity3D

#86
post #64

When I was growing up computers were getting faster by leaps and bounds, and I remember a video game that was so 'sophisticated' that it needed a math (FP) co-processor (80387) to play some parts of it: > The program requires a minimum of a 12MHz 80286, 1MB RAM, DOS 5.0 or DR DOS, one 1.2MB 5 1⁄4" or 1.44MB 3 1⁄2" disk drive, hard drive with 11MB of free disk space, and VGA graphics. In addition, Falcon3.O supports a…

I have fond memories of playing the original Falcon on my Amiga 500. It felt like magic after years of playing F15 Strike Eagle on the Apple IIc. Hearing real sound effects kicking in the afterburner and getting too close to the ground ("Pull Up! Pull Up!") were all so satisfying. I remember being so excited when Falcon 3.0 came out. But it just felt like a let down. The graphics were amazing for the time and it seem…

Having been the kid who loved to geek out over flight sims, and then the adult who was fortunate enough to have flown military jets, I find the trend for uber-realistic military sims like DCS and such kind of sad in a way.

I mean, the software itself is impressive. But the idea of grown adults geeking out over old versions of the NATOPS and trying to develop tactics and such is frankly cringe. You're never going to get it right, because the actual thing is classified. And from the outside looking in, it's like watching a kid put on Dad or Mom's suit jacket to play "office."

Re: Translating a Fortran F-16 Simulator to Unity3D

#87
post #64

Earlier quoted context omitted.

I have fond memories of playing the original Falcon on my Amiga 500. It felt like magic after years of playing F15 Strike Eagle on the Apple IIc. Hearing real sound effects kicking in the afterburner and getting too close to the ground ("Pull Up! Pull Up!") were all so satisfying. I remember being so excited when Falcon 3.0 came out. But it just felt like a let down. The graphics were amazing for the time and it seem…

Having been the kid who loved to geek out over flight sims, and then the adult who was fortunate enough to have flown military jets, I find the trend for uber-realistic military sims like DCS and such kind of sad in a way. I mean, the software itself is impressive. But the idea of grown adults geeking out over old versions of the NATOPS and trying to develop tactics and such is frankly cringe. You're never going to g…

> You're never going to get it right, because the actual thing is classified.

Except for the stuff leaked on the War Thunder forum.

Re: Translating a Fortran F-16 Simulator to Unity3D

#88

Earlier quoted context omitted.

FWIW she probably wasn’t breaking any security protocols - basically as long as the kids can’t read well they are fine to be escorted without the red light. I used to take my daughter into the SCIF when she was about 2 when needed, and there was a week where I was took my son into work at the Pentagon. I working for Snake Clark at the time and people kept bringing him candies and treats. I think he was watching carto…

I do a double-take if I see a dog! I've seen babies, but I'm pretty sure anyone that can walk or talk would be a no-go. My assumption is OP wasn't in a facility like that.

Ultimately it’s up to the SSO/SSM/facility manager to make the risk call, and that’s largely based on commander guidance and DSCID inspections from the HQ SSO.

Plenty of shenanigans in JSOC scifs that wouldn’t fly on NSA campus.

Re: Translating a Fortran F-16 Simulator to Unity3D

#89

Earlier quoted context omitted.

Having been the kid who loved to geek out over flight sims, and then the adult who was fortunate enough to have flown military jets, I find the trend for uber-realistic military sims like DCS and such kind of sad in a way. I mean, the software itself is impressive. But the idea of grown adults geeking out over old versions of the NATOPS and trying to develop tactics and such is frankly cringe. You're never going to g…

> You're never going to get it right, because the actual thing is classified. Except for the stuff leaked on the War Thunder forum.

Or, often Russian, FTP servers. Aaah, good times.

Re: Translating a Fortran F-16 Simulator to Unity3D

#90
post #6

> Note that Fortran supports arrays with an arbitrary starting index, in this case -2. So this table supports indices in the range [-2, 9]. That is such a useful feature! Surprised I haven’t seen that more often. So much fiddly code exists that’s just fixing offsets to conform to 0 (or 1 for Lua) -based indexing!

The feature worked fine and was portable in Fortran ‘77, but its interactions with modern features are full of shocking pitfalls even when the compiler implements them correctly, which only two do, so it’s not really portable either.
Post reply on HN