Slashdot Mirror


Quake On an Oscilloscope

An anonymous reader writes: Developer Pekka Väänänen has posted a fascinating report on how he got Quake running on an oscilloscope (video link). Obviously, the graphic details gets stripped down to basic lines, but even then, you need to cull any useless or unseen geometry to make things run smoothly. He says, "To cull the duplicates a std::unordered_set of the C++ standard library is used. The indices of the triangle edges are saved in pairs, packed in a single uint64_t, the lower index being first. The set is cleared between each object, so the same line could still be drawn twice or more if the same vertices are stored in different meshes. Before saving a line for end-of-the-frame-submit, its indices in the mesh are checked against the set, and discarded if already saved this frame. At the end of each frame all saved lines are checked against the depth buffer of the rendered scene. If a line lies completely behind the depth buffer, it can be safely discarded because it shouldn't be visible."

16 of 71 comments (clear)

  1. Looks a lot like... by fibonacci8 · · Score: 3, Insightful

    Any game at all on the Vectrex.

    --
    Inheritance is the sincerest form of nepotism.
  2. He didn't get it running on an oscilloscope... by Anonymous Coward · · Score: 5, Informative

    He's displaying it on an oscilloscope. Still cool, though.

    1. Re:He didn't get it running on an oscilloscope... by Darinbob · · Score: 2

      As an undergrad, we had to do Breakout in assembly, but displayed on an analog oscilloscope. Kind of fun. Simple, but the point was to learn about interfacing to devices not the assembler or programming style.

  3. Vector Graphics by danomatika · · Score: 5, Insightful

    The irony is that it's only taken 40+ years to get to display resolutions for raster graphics to approximate vector graphics.

    Not to say this isn't cool. I like that the youtube video is basically the following chain: raster Quake -> custom vector renderer -> vector scope -> raster camera capture -> raster video upload -> raster youtube video stream -> you eyes

    In *no way* is the video as cool as that scope in real life!

    1. Re:Vector Graphics by dbIII · · Score: 4, Interesting

      The irony is that it's only taken 40+ years to get to display resolutions for raster graphics to approximate vector graphics.

      It's what we've been prepared to put up with. If more people had bought those monster resolution IBM LCDs in the 1990s then economies of scale would have resulted in 4k screens earlier. It wasn't a technological barrier, it was a progression driven by tooling for whatever would sell. That's why we had the step backwards in resolution for a decade+ and I only gave up on CRTs a couple of years ago when 1600x1200 LCD prices dropped from the stratosphere.
      Back to vectors - that old Star Wars video game still seems to impress kids despite their phone hardware outperforming it 100 to 1.

  4. How many Mhz for Nethack? by freelunch · · Score: 2

    Please vectorize my dog. Thx.

  5. Nice by Dan+East · · Score: 5, Informative

    That is by far the geekiest thing I've seen in a long time. As someone who has also ported Quake to run on hardware it wasn't designed for, my hat's off to you.

    --
    Better known as 318230.
    1. Re:Nice by 50000BTU_barbecue · · Score: 4, Interesting

      How about a song that makes pictures?

      https://www.youtube.com/watch?...

      --
      Mostly random stuff.
  6. Beautifully steam-punky by blind+biker · · Score: 4, Interesting

    In an alternative steampunk universe, this is how graphical displays MIGHT work.

    --
    "The agriculture ministry is not in charge of Gundam" - Japanese ministry official.
  7. Doesn't Count by Nova+Express · · Score: 2

    He didn't find all the secrets...

    --
    Lawrence Person (lawrencepersonh@gmailh.com (remove all "h"s to mail)

    http://www.lawrenceperson.com/

  8. Easier by several other methods by Bing+Tsher+E · · Score: 2

    First off, In the late 90's Tektronix made a series of digital oscilloscopes that ran an embedded version of Windows 98.

    But really, the easiest way to get Quake running on an oscilloscope is to take the raster signals from an analog CRT controller (like, for instance, a VGA card) and use the vertical and horizontal signals to properly drive the X and Y axis, and feed the video into the Z axis. Like, duh. Why would you vectorize it?

  9. Nice by Intrepid+imaginaut · · Score: 2

    More of this!

  10. IBM LCD by ArchieBunker · · Score: 2

    The IBM T221 cost $17,999 when it was released. I can't imagine anyone outside a research lab or government agency buying one back then.

    --
    Only the State obtains its revenue by coercion. - Murray Rothbard
  11. Has he not heard of the Z (blanking) axis? by NixieBunny · · Score: 2

    A decent vector oscilloscope display uses the Z blanking input to turn off the beam when not drawing a line. I see no mention of this in the writeup, and consequently there are ghost lines all over the screen. It would look a whole lot nicer if the Z input were put to use.

    --
    The determined Real Programmer can write Fortran programs in any language.
    1. Re:Has he not heard of the Z (blanking) axis? by Mr.CRC · · Score: 2

      Because it's just using a crummy sound card, initially AC coupled, then some hacked DC coupled one.

      This would be much more interesting with 20-50x the bandwidth, which a scope like this could deal with easily. That would require a good data acquisition (DAQ) card with high sampling rate D/A converters.

      Some low-end analog CRT scopes (like my 20MHz B&K) don't include Z axis inputs. I'm contemplating hacking one on to mine, and also building a generic set of deflection amplifiers to use old electrostatic CRTs for "fun" vector scopes, but with serious video bandwidth of 5-15MHz not the 50-100kHz shit that's typical.

      High-res. vector display requires high video bandwidth on all 3 axes, unlike raster which only needs MHz bandwidth for the video, 10s of kHz for horizontal, and 100s of Hz for vertical.

  12. Where is my upvote button? by caffiend666 · · Score: 2

    Where is my upvote button? Why can't I fucking upvote this?

    --
    Here's to losing my Karma Bonus again....