Bringing The Quake Flicker To Life With A Hacked Light

If you ever feel a pang of shame because you’ve been reusing the same snippets of code in your projects for years, don’t. Even the big names do it, as evidenced by the fact that code written to govern flickering lights back in 1996 for Quake is still being used in AAA titles like 2020’s Half-Life: Alyx. In honor of this iconic example of digital buck-passing, [Rodrigo Feliciano] thought he’d port the code in question over to the Arduino and recreate the effect in real-life.

Since the Quake engine has been released under the GPLv2, it’s easy to pull up the relevant section of the code to see how the lighting was configured. Interestingly, lighting patterns were implemented as strings, where the letters from a to z referenced how bright the light should appear. So for example, a strobe light that goes between minimum and maximum brightness would be written as “aaaaaaaazzzzzzzz”, while a flickering light could be represented with the string nmonqnmomnmomomno“.

An emergency light provided the LEDs and enclosure.

This ended up being very easy to implement on the Arduino in just a few lines, as [Rodrigo] simply had to assign each letter in the string a numerical value between 0 and 255 using map, and then use the resulting number to set the LED brightness with analogWrite.

With the code written, [Rodrigo] then had to put the hardware together. He stripped down a basic emergency light to get an array of white LEDs and a handy enclosure. He also wired up a simple transistor circuit on a scrap of perfboard so the Arduino Pro Mini could control all the LEDs from a single GPIO pin. Combined with a long USB cable to power it, and he’s got a perfect desk accessory for late-night gaming sessions.

In the video below you can see the final result, which [Rodrigo] has even synced up to footage from the classic 1996 shooter. The light makes for an interesting conversation piece, but we think the logical next step is to work this technique into an ambilight-like system to really make it feel like you’re wandering down those dimly lit corridors.

Continue reading “Bringing The Quake Flicker To Life With A Hacked Light”

Porting Quake To An IPod Classic Is No Easy Task

We didn’t think we’d see another hack involving the aging iPod Classic here on Hackaday again, yet [Franklin Wei] surprises us with a brand new port of Quake for the sixth-generation iPod released some thirteen years ago. Is Quake the new 90s FPS that’ll get put into every device hackers can get their hands on?

The port works on top of RockBox, a custom firmware for the iPod and other portable media players. This isn’t the first game on the device. A source port of Doom has been available for years. [Franklin] decided to use Simple DirectMedia Layer (SDL) to make his job easier. That doesn’t mean this was an easy task though, as [Franklin] describes very interesting bugs that kept him from finishing his work for about two years.

The first problem was that the GCC compiler he was using was apparently not optimizing time-critical sound mixing routines. [Franklin] decided enough was enough and dug into ARM assembly to re-write those parts of the code by hand. He managed to squeeze out a speed increase of about 60%. Even better, he ran into a prime example of a bug that would get triggered by a very specific sound sample length running through his code. Thankfully, with all of that sorted, the port is now released and we can all enjoy cramping our hands around tiny screens to frag some low-poly monsters.

If you need to repair your sixth-generation iPod before you can do that though, no need to worry since they seem to not be so hard to service by yourself. And if the battery life and disk space aren’t quite what they used to be, there’s also the option to bulk it up for winter. Check out the Quake port in action after the break.

Continue reading “Porting Quake To An IPod Classic Is No Easy Task”

Peering Inside The GPU Black Box

Researchers at Binghamton University have built their own graphics processor unit (GPU) that can be flashed into an FGPA. While “graphics” is in the name, this GPU design aims to provide a general-purpose computing peripheral, a GPGPU testbed. Of course, that doesn’t mean that you can’t play Quake (slowly) on it.

The Binghamton crew’s design is not only open, but easily modifiable. It’s a GPGPU where you not only know what’s going on inside the silicon, but also have open-source drivers and interfaces. As Prof. [Timothy Miller] says,

 It was bad for the open-source community that GPU manufacturers had all decided to keep their chip specifications secret. That prevented open source developers from writing software that could utilize that hardware. With contributions from the ‘open hardware’ community, we can incorporate more creative ideas and produce an increasingly better tool.

That’s where you come in. [Jeff Bush], a member of the team, has a great blog with a detailed walk-through of a known GPU design. All of the Verilog and C++ code is up on [Jeff]’s GitHub, including documentation.

If you’re interested in the deep magic that goes on inside GPUs, here’s a great way to peek inside the black box.

Ultimate Oscilloscope Hack – Quake In Realtime

[Pekka] set himself up with quite the challenge – use an oscilloscope screen to display Quake in realtime – could it even be done? Old analog scope screens are just monochromatic CRTs but they are designed to draw waveforms, not render graphics.

Over the years Hackaday has tracked the evolution of scope-as-display hacks: Pong, Tetris, vector display and pre-rendered videos. Nothing that pushed boundaries quite like this.

[Pekka]’s solution starts off the same as many others, put the scope in X-Y mode and splice up your headphone cable – easy. He then had to figure out some way to create an audio signal that corresponded to the desire image. The famous “Youscope” example demos this, but that demo is pre-rendered. [Pekka] wanted to play Quake in realtime on the scope itself, not just watch a recording.

With only so much bandwidth available using a soundcard, [Pekka] figured he could draw a maximum of about a thousand lines on screen at a time. The first headache was that all of his audio cards had low-pass filters on them. No way around it, he adjusted his ceiling accordingly. ASIO and PortAudio were his tools of choice to create the audio on the fly from a queue of XY lines given.

To tell his audio engine what lines to draw, he solicited Darkplaces – an open source Quake rendering engine – and had it strip polygons down to the bare minimum. Then he had to whip out the digital hedge trimmers and continue pruning. This writeup really cannot do justice to all the ingenious tricks used to shove the most useful data possible through a headphone jack. If this kind of thing interests you at all, do yourself a favor and check out his well-illustrated project log.

In the end [Pekka] was not entirely happy with the results. The result is playable, but only just barely. The laptop struggles to keep it simple enough, the soundcard struggles to add enough detail and the scope struggles to display it all quickly enough. At the very least it sets the bar extraordinarily high for anyone looking to one-up him using this method. There is only so much water that can be squeezed from a rock.

See the video below of [Pekka] playing the first level of Quake.

Continue reading “Ultimate Oscilloscope Hack – Quake In Realtime”

Raspberry Pi Quake III Bounty Claimed


For the Raspberry Pi’s second birthday, the Raspi foundation gave us all a very cool gift. Broadcom released the full documentation for the graphics on one of their cellphone chips and offered up a $10k prize to the first person to port that code over to the graphics processor on the Pi and run Quake III. The prize has been claimed, forming the foundation for anyone wanting a completely documented video core on the Pi.

The person to claim this prize is one [Simon Hall], author of the DMA module that’s in the current Raspbian release. Even though Quake III already runs on the Pi, it does so with a closed source driver. [Simon]’s work opens up the VideoCore in the Pi to everyone, especially useful for anyone banging their heads against the limitations of the Pi platform.

You can get your hands on the new video drivers right now, simply by downloading and compiling all the sources. Be warned, though: recompiling everything takes around 12 hours. We’re expecting a Raspbian update soon.


Pan/Tilt Wheel Trainer Ends Up Being A Different Way To Play Quake

This is a special controller that [Gary Scott] built to help train camera operators. The pan and tilt controls on high-end movie cameras use wheels to pan and tilt smoothly. This rig can be built rather inexpensively and used to practice following a subject as you would with a camera. This is where the project takes a turn into familiar territory. [Gary] set up a system so that you can play the game Quake using this controller, with your feet doing the rest.

The pan/tilt controller uses two heads from an old VCR. They are mounted above the guts from an old ball-type mouse. A couple of rubber belts connect the heads to the two mouse bars that are normally rotated by the ball. This gives him control of where the Quake game is looking. But he still needed to be able to move, jump, change weapons. and shoot. So he built a second controller for his feet. It uses a CD and some switches as a joystick, and a set of buttons for the other controls. He actually rigged up solenoids to each of those foot switches to physically press keys on a keyboard. You really must see it for yourself. We’ve embedded his set of videos after the break.

Continue reading “Pan/Tilt Wheel Trainer Ends Up Being A Different Way To Play Quake”

OpenGL On The Didj

[Losinggeneration] managed to get a homebrew OpenGL application working on the Didj. It’s nice to see the community driven work advance on this device but something else also caught our attention from the forum post. Another poster pointed out that [losinggeneration] has files in one of his directories called “glquake-didj” and “glquake-didj.dbg”. We hope that means a working version of Quake is on the way for the hackable handheld.

[Thanks JJ Dasher]