Analogue is tricky: how one team is re-creating the Vectrex with an iOS app
I'm a huge fan of the classic Vectrex system. Nothing looks or plays like it, so when I heard that a developer was trying to emulate that beautiful system on the iPad and iPhone, I had to figure out how they were doing it. It turns out recreating those wonderful vector graphics is not easy, but so far it looks like the hard work is paying off. For about the past six months or so I have been involved in a seriously involving technological challenge. My company is bringing - to a digital platform - a games console that almost defines retro-vector-analogue: The Vectrex. The Vectrex is incredible. If you’ve never actually physically seen one run in the flesh (plastic) then really you won’t get what I’m talking about – unfortunately whenever you try and record a video of the Vectrex in action you always get more flicker and pulsing than you get in real life due to the frame rate issue of the camera versus the Vectrex screen. And the glow… the glow in real life is bright, maaan. It’s a pretty simple technology - essentially, you’ve got a beam of electrons, some things that control where the beam actually goes (and when it’s on) and a monochrome phosphor CRT screen. But fire it up and it’s impossible not to be mesmerized. When Vectrex was launched in 1982, the only other games consoles around (mainstream) were heavily raster-based (like the Atari 2600). On the “computer- hooked-up-to-TV side of things” we (in the UK) had the ZX Spectrum 48 (with ‘colour clash’ – only 2 colours in a 8x8 square) and the Commodore VIC-20 and 64. Essentially, games that looked like this: The Vectrex didn’t have pixels - it had pure, smooth, glowy (very glowy) perfectly straight and non-jaggy LINES. Just like in the arcade. And we loved it. Even if it did only have two colours (white… and… well, black). Colour is added in an interesting way – each game came with an attractive perspex, colour ‘overlay’ that clipped into the screen and gave some semblance of colour. That would all count for NOTHING if the games were bad. But they weren’t – you got an Asteroids clone for free and it is just PERFECTLY weighted. Ignore the fact that the shipped ROM (part of the console) crashes on level 13. Who cares. I actually got there once. It crashed. Oh well. Mind you, I wish I’d sent a letter to the distributers to complain – they sent out a super-rare Minstorm 2 cartridge to everyone who did.
People often make the mistake of thinking that the reason people like retro games & consoles is because of nostalgia. That rose-tinted, ‘things were better in my day’, loved-my-childhood kind of nostalgia. That’s only true in a very small sense. The reason that people like retro games & consoles is actually because (lots of) the games are so incredibly playable! There’s a freaky logic in that – the ROMs for the Vectrex games weigh in at a heady 4-8K. K as in Kilobytes. Every email I send is bigger than that! Clearly, with severe limitations on CPU and graphics (CPU ran at a massive 1.5 MHz) you’ve got to find another way to make a good game, and that was ‘Game play’! So, how do you turn something so analogue into a compelling and authentic tablet/smartphone experience? By compelling, I mean things like it's fun to use on a tablet or smartphone; all the goodies you’d expect. It's appealing to everybody – not just retro games, not just people who remember Vectrex, but people who enjoy good games. By authentic, I mean things like good performance, visuals (i.e. screen rendering), and controls (the controller on the Vectrex is great – lovely buttons and analogue joystick). The answer is that it’s harder than you’d think!
There are some issues that are just insurmountable. For example, the iCade (which was top of our list of features) is actually a digital controller. Fortunately, although the Vectrex joystick is analogue not many games actually require analogue input so it doesn’t actually effect game play. On-screen control is also hard to get right - there’s always a compromise involved in using on-screen controllers since there is obviously no tactile feedback. We’ve tried hard to get over that by allowing lots of customization- making it easy for people to move on-screen buttons and having a tracking joystick that follows your thumb around while you’re playing. We’ve got it to apoint where it’s actually pretty playable – even on the smaller form factor of an iPhone.
To reduce flickering, the real Vectrex relies on phosphor glow/ghosting when drawing to the screen. This is a super-hard effect to replicate, and we’ve experimented lots with various shaders and trails. We’ve also got a few things we’re working on to really make the most of the retina display – although it already looks pretty awesome running at full resolution at 60FPS.
This continues to be heavy going – the Vectrex uses a General Instrument AY-3-8912 chip for sound. Emulating this via CoreAudio has been a bit like slowly stabbing yourself in the leg with a semi-blunt fork.
We also wanted to add a little bit extra – to take the Vectrex and give it some of the features that make the most of a modern gaming platform (a.k.a. iOS). Things like iCloud Support, as we thought it would be cool if you were playing a game on an iPad, and then you have to leave for work that you could continue playing on your iPhone. Of course that kind of stuff is pretty easy conceptually, but for us it means backing up the entire Vectrex RAM plus game state and packaging it up as small as possible. Yes, that does mean that load/save is technically possible. No, you cannot have it! What about high scores? Currently Vectrex players who want to share their scores have to take a photo and post it online! We thought it would be cool if we could make use of Game Center to create a global leaderboard for each game. We had to figure out where in memory the Vectrex stores the hi-score (thankfully the same for each game!) and when it updates (not always the same!). Once we figured that out, it was pretty easy just to post the scores using GameKit. One of my personal favorite Vectrex games is Armor Attack. You control a Jeep in a war-torn landscape with enemy tanks and helicopters trying to blow you up: It’s cool as a one-player game, but what’s great about this game is that it has two-player co-op mode. We wanted to replicate that experience, but clearly it wasn’t really going to be realistic to have two people share an iPad, so we decided we would allow people to use their iPhone as an external controller. We use Bonjour to automatically search & attach iPhones to running Vectrex instances before being assigned by the user to be Player 1 or 2. Essentially you end up running the Vectrex app on an iPad, with P1 and P2 controlling it via iPhones… lots of fun. Then we thought – wouldn’t it be great to throw the game up to a big TV via AirPlay? So we did that too… Am I the only one who is champing at the bit after reading that? There are still some months to go before the work is done, but with Vectrex consoles in good condition becoming harder to find, and the prices going up, this could be the closest thing to owning the real thing. We'll let you know when we're able to put our hands on it.