Sep. 6th, 2020

mmcirvin: (Default)
Continuing my series on flight-sim and related software...

When I was young, the one thing a video game could consistently do to impress me was to show some kind of first-person perspective view (like about 2/3 of the high-end console and PC games that exist today). This wasn't so common back then. The level of technology at the time made it fairly difficult to do, and even if the game wasn't very good, I'd think it was cool. Many of the arcade games that tried it early on, like Battlezone and Star Wars, are rightly considered classics.

Many of the first games that attempted to try it were "space pilot" shoot-em-up games that put you in the cockpit of some kind of science-fiction starfighter, shooting at enemy spaceships. Space could actually make the presentation a little easier, because you just needed a black screen with some kind of stars or small objects streaming at you in perspective. There was no need to render a whole landscape.

Here, though, is a game that attempted a first-person flight-simulator-like view on an Atari 2600, with a moving and tilting horizon. It's Air Raiders, a 1982 "M Network" game from Mattel (highretrogamelord's video):



Air Raiders is a bit unusual for Mattel in that it's an original 2600 release instead of a port of an Intellivision game, which all their other "M Network" offerings were. If you want to play it, it's actually available in volume 3 of the Atari Flashback Classics collections on consoles. (I said a while ago that those collections only had games that lacked any third-party licenses--that's not strictly true: they've also got some M Network games.)

The game is OK, not great. It gets a bit repetitive, like many 2600 games do if you play them for more than a couple of minutes. But that flight-sim-like view is really cool. I was wondering how the heck they did that on the Atari 2600.

The 2600, famously, was really designed for games more like the early Video Olympics (Pong Sports) and Combat cartridges, and has no frame buffer representing its display screen in RAM; it doesn't have enough RAM for that. Its TIA video chip has just got a few registers whose bits represent the pixels, positions and colors of various objects on the current scanline. There are:
  • two "players" (8 bits across with widths and colors you can set independently),
  • associated "missiles" (just a pixel of adjustable width, colored like the associated player),
  • the "ball" (another, independently colored pixel),
  • and the "playfield" (two and a half bytes representing 20 chunky pixels, either reflected symmetrically or repeated twice across the scanline).
You'd generally have some code that ran during the horizontal blank between scanlines, that copied some bits of the game ROM to these registers and set object positions and colors. By swapping out the ROM bits, you'd build up shapes on the screen. You could play a lot of tricks by just changing the colors between scanlines, and if you were really advanced, you could swap stuff around partway through the scanline; that was how games like Space Invaders displayed more moving objects (though you had to be careful about the time it took code to run). All this was famously called "racing the beam".

Notice that the horizon here only has three possible tilt positions: you can bank to the left at a fixed angle, bank to the right at a fixed angle, or fly straight. That is undoubtedly a helpful simplification. But it can move up and down in any of those fixed positions, and there's a grey runway that appears sometimes as well. I figured these things, as well as the peculiar cockpit arch over the top, were somehow displayed using the playfield object. But how? The horizon is neither symmetrical nor repeated.

The Stella emulator has a debug mode that swaps out fixed colors for the TIA's color registers. That can actually show you which objects are being used to represent things on screen. When you apply it to Air Raiders, the result is THIS:

A low-resolution video screen with an arch across the top in shades of purple, and a sort of X in the middle formed by two triangles in shades of purple reaching in from the left and right. There are also a crosshair, three enemy planes and a score/stats display in yellow and dark red.

What sorcery is this?
The purple areas represent the playfield object (shades of purple represent which bytes are being read). Yellow and red are the player objects, and gray is the raw background. Air Raiders can move that peculiar "X" made out of playfield triangles up and down by just shifting the values that it writes into the playfield registers at various times.

I think the rest is all done by playing with the color registers. Air Raiders must have some code to swap out the colors at the center of a scanline, right where the middle of the X is. Suppose you're banking to the left, so it wants to render a tilted horizon from upper left to lower right. Above the center of the X, on the left side of the screen, it colors the playfield green and the background sky blue. On the right side of the screen, it swaps the color registers so that both are blue.

Then below the center of the X, it does the reflected complement of that: on the left side, both playfield and background are green, and on the right side, the playfield is sky-blue and the background is green. The net effect is a tilted green horizon against blue sky.

If the horizon needs to be tilted the other way, the color-swapping trick is just done in the mirror reverse of this. If it's not tilted at all, that's much easier--all you have to do is change both color registers from blue to green partway down the screen. And the grey "runway" that appears sometimes is just displayed using these same objects, by leaving the playfield green but turning the background pixels gray near the bottom of the display!

Absolutely brilliant. To make a good-looking game on the 2600 you had to be very clever.
mmcirvin: (Default)
Well, I sprung for XPlane. MSFS2020 won't run on my Mac, though it might be interesting to check out the XBox version when it appears. But XPlane 11 does. It's a lot of fun, though I think anyone getting into it needs to realize what it is and isn't.

F-4 Phantom cockpit control panel

This is pretty much the opposite of the Google Earth flight sim. Which is to say, it treats the world scenery with some indifference, but this is the one for people who are really, really, really into the planes.

Detailed view of the interior of a 747 cockpit

The cockpits are all modeled lovingly in three dimensions, and you can move about the cockpit and examine all the switches and gauges in detail; many of the doodads in there will actually be operative. By default the sim starts you on the runway with a full tank and the engine already running, but if you want, you can run through all the checklists and bring up a jetliner from completely powered-down (there's a version of this sim, not the standard retail version, that is certified for pilot simulator training--the key thing is apparently that it has to make sure it's always running at maximum FPS). You've got a mix of general-aviation aircraft, jetliners and fighter planes, an incredibly fun ultralight, a helicopter (haven't tried that yet), some exotic things like an X-15 and a Space Shuttle orbiter. For the latter things, there's support for planes carrying other planes (you can be the carrier, or be carried and have an AI take you up).

Crashed X-15 with smoke coming out

One problem if you're just using a single laptop monitor is that some of these control panels are physically gigantic, particularly in the big airliners, and in something like a 747 it can be hard to even look at the standard gauges while also keeping an eye out the window. You spend a lot of time panning around inside the cockpit with the view controls. The more modern planes have glass cockpits and you end up trying to interpret a little screen on your big screen. There's a HUD mode available with all planes (whether it would make realistic sense or not) that alleviates these issues, but I think one of my favorite planes in the program is the Stinson L5 Sentinel, a World War II-era military light plane, just because it's got a compact basic instrument cluster that is really easy to look at. People who are really into this stuff have elaborate multi-monitor setups that wrap around them almost like a professional simulator cockpit, sometimes with subsidiary computers just to control additional displays; XPlane supports a boggling variety of options, including VR headsets and using tablets to display control panels. I might try connecting an external monitor and using the main one just to display instruments.

Pilots seem to really like the flight model here; according to them, at least, the planes handle realistically. I wouldn't know, but the handling differences between the aircraft are palpable. I tried plugging in an XBox controller, and XPlane calibrates and handles it flawlessly*; a more serious user will doubtless prefer a realistic flight stick or yoke, but of what I've got, this is clearly the best way to control the simulation. The twin sticks give you independent rudder and aileron controls so you can practice coordinated flight; some buttons map to the throttle by default. When you have to push on the stick like a pilot would, instead of effectively controlling a virtual yoke with a keyboard or mouse, it does give you an appreciation of what trim controls are for.

747 Carrier Aircraft on runway with Space Shuttle orbiter on top; tiny caption says 'Space bar to separate'

What it's not is a sim for sightseeing of famous landmarks in the virtual world. It doesn't stream scenery like Google or Microsoft do, so the whole world has to be stored on disk, and the main way to scale back detail for lower-powered machines is to reduce the number of generated buildings. The scenery generally looks OK, but in a generic way. Cities will have more or less the correct street layouts, but be populated somewhat haphazardly; if you've got the scenery complexity set to low (which I think is the default), many towns will have streets but almost no buildings, and the world ends up with a barren, post-apocalyptic quality, almost Fallout 4-like. It looks better if you dial up the graphics settings (at risk of getting nagged that your system is too feeble to hit 60fps--at least you can turn off the nagging). But you'll still get a weird alternate-universe feeling if you try to go somewhere familiar to you, because almost everything is a generic object.

On the other hand, it's got a gigantic number of airports, basically every airport of significance in the world. Those are quite detailed--but with an eye to functional aspects a pilot would care about, not striking terminal architecture. Toodle around a major airport (the ultralight is useful for being a fly on the wall) and you'll see planes with all sorts of airline liveries, moving airport vehicles, etc. You can communicate with the tower, request and receive clearance if you want to play that way, get refueled and even pushed back from the gate by a tractor. (small correction: you can summon the snack truck and the pushback tractor, but not the fuel truck--you "refuel" just by editing your vehicle settings: in real life that takes a long time anyway.) All the navigation and ILS equipment is of course operative (even 1980s Flight Simulator had a lot of that). The night lighting of runways and taxiways is spectacular. But you won't find IAD's swooshing Saarinen terminal or LAX's Theme Building rendered recognizably. If you mostly want that, you might as well stick to Google Earth. Where this game gives near-pornographic aesthetic attention is the aircraft.

My impression is that MSFS 2020 is an attempt to bridge these worlds--it's got the accurately rendered planes in a mind-blowing streamed world. But even there, you may need fairly grunty hardware to get all the benefits.

* I also got around to trying the XBox controller with the Google flight sim, and it tried to handle the thing but there were hopeless calibration/centering problems that there seemed to be no way to address. Will need to stick to the mouse with that one.

June 2025

S M T W T F S
1234567
89101112 1314
15161718192021
22232425262728
2930     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 16th, 2025 07:44 am
Powered by Dreamwidth Studios