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…
Falcon game still have a large following today.
Translating a Fortran F-16 Simulator to Unity3D
51–60 of 129 posts
Re: Translating a Fortran F-16 Simulator to Unity3D
#52Air density can become pliable, controllable. Thrust velocities match projectile spec velocities (m/s) making calculating intersect a breeze. Trust me, you want to convert the FORTRAN math into standard metric. They didn't believe in Base10 back then so do the math.
Re: Translating a Fortran F-16 Simulator to Unity3D
#53Re: Translating a Fortran F-16 Simulator to Unity3D
#54Earlier quoted context omitted.
I'd agree with 1-based indexing problems, but not 0-based, which seems very natural. And if you have -2-based, I'd argue that perhaps you don't want an array.
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.
Perhaps I've been influenced by writing a lot of code in assembler, way back when, but zero-based has always seemed completely natural to me, to the extent that I find it very hard to understand algorithms expressed in non-zero based code.
Re: Translating a Fortran F-16 Simulator to Unity3D
#55Earlier 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.
I wonder how many of the "off by one" issues/bugs we encounter in the wild are because of arrays typically using 0-based indexing vs 1-based indexing.
Re: Translating a Fortran F-16 Simulator to Unity3D
#56The "UNITS" part is wonderful. I had no idea slugs even existed. You want to measure how much air mass is in a given volume? That’s gonna be slugs/ft3.
The 'List of non-coherent units of measurement' [1] and 'List of humorous units of measurement' [2] pages are always a fun rabbit hole to go down. [1] https://en.wikipedia.org/wiki/List_of_non-coherent_units_of_... [2] https://en.wikipedia.org/wiki/List_of_humorous_units_of_meas...
Re: Translating a Fortran F-16 Simulator to Unity3D
#57Awesome 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.
I was able to coerce Fortran's type system into checking units, but it comes with quite a few downsides: https://fortran-lang.discourse.group/t/compile-time-unit-che...
An approach based on static analysis would not have the downsides I listed, but I personally would prefer being unable to compile the code at all if it had an error that could be detected.
Re: Translating a Fortran F-16 Simulator to Unity3D
#58> 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!
https://github.com/sourceryinstitute/fidbits/blob/master/src...
https://fortran-lang.discourse.group/t/just-say-no-to-non-de...
Re: Translating a Fortran F-16 Simulator to Unity3D
#59My Mom was a FORTRAN programmer for a defense contractor from the late 50s to the mid 90s. She spent her career doing things like that F16 simulator. The last thing I remember her talking about was one of the B1 or B2 bombers. When I was elementary school age in the late 70s, I'd go into her office with her sometimes on school holidays that were not work holidays. She'd let me play Colossal Cave Adventure on a termin…
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 cartoons on Nick in the deputy’s office most of the day. He gets a kick out of that story now.
Re: Translating a Fortran F-16 Simulator to Unity3D
#60I'm somewhat surprised the physical units matter in a computer simulation. As long as the simulation is internally consistent (which I would assume the original code is) it seems odd to me that the nominal units are important at all. Is that video game character walking 100 yards? Or maybe the character is 500 feet tall and he's walking 50 leagues?
Gravity doesn't scale this way. Earth's gravitational pull (~10m/s^2) is a constant that ties distance to time, so if you want to observe the same gravitational effects in the same gravitational pull on a small dimensional scale, you need to adjust the time scale to compensate. This is why scale model sets for practical VFX in cinema were always recorded at higher frame rates and then played back slower.
The acceleration defined to simulate gravity in this Fortran code is presumably already proportional to everything else defined in the simulation.