Abusing SQL To Play DOOM

Most laypeople who encounter SQL think of it purely as a tool for managing large datasets. While that is certainly what it was designed for, SQL is still a programming language at its core. It includes many of the features found in general-purpose languages like C or Python, and although it wasn’t built for general-purpose work, it can handle a surprising range of tasks that programmers might not expect to use it for. To demonstrate its capabilities, and perhaps to show off their skills with SQL, a group at CedarDB ported the original DOOM to this language.

The project stores the WAD data (essentially everything except the engine) in a series of tables, which was fairly straightforward compared to the rest of the project. Where it gets more complicated is managing the timing that ties the game to 35 fps, and of course rendering the images. Their rendering process takes up 1300 lines of SQL across 89 common table expressions (CTEs) which is certainly advanced for this language. The rest of the project is another 4000 lines of SQL, with a bit of Python to handle the keyboard inputs, timing, and display of the generated bitmap.

Perhaps counterintuitively, DOOM might be the perfect game to run on SQL. It was built in an era before dedicated graphics cards and isn’t truly 3D, meaning that the programmers had to do a lot of tricks to get it to look as if it is 3D. This results in a lot of data transformations uniquely suited to SQL. It’s almost like DOOM‘s original renderer was built by someone with extensive SQL knowledge in the first place. For those looking to try this out, the source code for the project is available on a GitHub page, and for some other unique implementations of DOOM there’s also this version built in regular expressions and this one in Microsoft Word.

Bike Trainers As Video Game Controllers

While we’ve largely settled on analog sticks and digital buttons for controlling video games, there’s all sorts of projects to create truly esoteric controllers that allow playing games in unique ways. This one from [sukolupo] lets you use data from standard bike trainers to get your virtual character moving.

Called Deck de France, it maps the data coming from one of the supported bike trainers to a virtual controller which can then be “plugged in” to a Linux system, in this case a Steam Deck mounted to the trainer’s handlebars. Although a bike trainer doesn’t have the same number of inputs as a modern gaming controller, it does have enough to play games like Rocket League. As you might expect, it’s also perfect for biking titles such as the Tour de France series.

As far as unique controllers for video games go, this one is surely up in the rankings with a real trombone or a controller purpose-built for riding virtual horses. It’s also a great way for those who are getting a bit bored of riding their trainers to breathe some new life into their exercise routine. We’ve also seen some open-source alternatives for modern bike trainer software as well, which is another great way to get excited about exercise equipment too.

Restoring A 3DO Blaster Card From The Early 90s

Before the modern trifecta of video game giants came to dominate the market around two decades ago, the world was awash in video game consoles. Many of these retro platforms have largely been forgotten outside of the enthusiast communities, and an average gamer today might not have ever heard of brands like ColecoVision or TurboGrafx. Among these unusual, rare, or forgotten systems was the 3DO which wasn’t strictly a console but rather a specification that manufacturers could use to make consoles on their own. But even more unusual was that this standard could be used to build 3DO-compatible expansion cards for PCs as well.

In this video, [The Retro Collective] received one of these boards to add to their museum, but like much retro hardware of this era it wasn’t working exactly like it would have out-of-the-box. After adding it to one of their period-correct 386 machines of the time, they found that it would only work properly with weight applied at one of the corners. This led to the discovery of some disconnected pins on the PCB, and a repair of that and some other issues brought the card back to life again.

The video also discusses the platform itself and shows how it would connect to a PC from that time. The PC would have needed a Sound Blaster card, a CD ROM drive with a particular proprietary interface, and a few other hardware requirements, but with everything up and working the player would have a console that theoretically competed with the original Playstation or Nintendo 64. It also illustrates an alternative path video games might have taken where expansion cards added console compatibility to any modern PC, but unfortunately the 3DO never really caught on.

Continue reading “Restoring A 3DO Blaster Card From The Early 90s” →

Driving Sim Handbrake Based On Load Cell

Simulator-style video games are designed to scale in complexity, allowing players to engage at anything from a casual level to highly detailed, realistic simulation. Microsoft Flight Simulator, for example, can be played with a keyboard and mouse, a controller, or a huge, expensive simulator designed to replicate a specific airplane in every detail. Driving simulators are similar, and [CNCDan] has been hard at work on his DIY immersive driving sim rig, with this hand brake as his latest addition.

For this build, [CNCDan] is going with a lever-style handbrake which is common in motorsports like drifting and rallying. He has already built a set of custom pedals, so this design borrows heavily from them. That means that the sensor is a load cell, which takes input force from a lever connected to it with a spring mechanism. The signal is sent to an Arduino for processing, which is set up to send data over USB like any joystick or controller. In this case, he’s using an Arduino that was already handling inputs from his custom shifter, so he only needed to use another input and add some code to get his handbrake added into his sim.

[CNCDan] built a version of this out of laser-cut metal parts, but also has a fully 3D printable one available as well. Plenty of his other videos about his driving rig are available as well, from the pedal assembly we mentioned earlier to the force-feedback steering wheel. It’s an impressive set of hardware with a feel that replicates racing about as faithfully as a simulator could. Interestingly, we’ve also seen this process in reverse as well where a real car was used instead as a video game controller.

Continue reading “Driving Sim Handbrake Based On Load Cell” →

Pong Cloned By Neural Network

Although not the first video game ever produced, Pong was the first to achieve commercial success and has had a tremendous influence on our culture as a whole. In Pong’s time, its popularity ushered in the arcade era that would last for more than two decades. Today, it retains a similar popularity partially for approachability: gameplay is relatively simple, has hardwired logic, and provides insights about the state of computer science at the time. For these reasons, [Nick Bild] has decided to recreate this arcade classic, but not in a traditional way. He’s trained a neural network to become the game instead.

Continue reading “Pong Cloned By Neural Network” →

PS1 logo on the top screen of a white DS

Running An Entire PS1 Emulator In A DS Cartridge

Gaming on a Nintendo DS can bring back great memories of long car trips from the past. But looking back, we remember wishing to play more than the DS could ever hope to handle. [fami] looks into the SuperCard DSTWO in her recent video, a solution to our past sorrows.

Able to play anything from the very games designed for the DS to emulated PS1 games, the DSTWO is more than capable of surpassing the abilities of the DS itself. More impressively, all games are run directly from the cartridge itself rather than on the DS’s hardware. While this emulated console within a handheld is impressive, it is far from simple to get running.

The DSTWO runs with an Ingenic JZ4732 as the CPU, completely different from any native architecture of the DS. Pair this with the unhelpful SDK made for the cartridge, and the aging hardware is held together by the community development behind any improvements. This is aided by the CPU similarities of another widely modded game console, the Dingoo A320.

When not having a fit, and after going through hours of troubleshooting, you might find the DSTWO running a game of SimCity 2000 or even Spyro the Dragon inside a DS. Even with the difficulties of use, the fact that these games run at all is impressive. If you want to try the DSTWO emulation yourself, check out the forums.

This is far from the only example of extreme care going into emulation. Here at Hackaday, we have covered similarly impressive projects such as this completely DIY handheld made for any retro game emulation you throw at it.

Continue reading “Running An Entire PS1 Emulator In A DS Cartridge” →

Behind The Bally Home Computer System

Although we might all fundamentally recognize that gaming consoles are just specialized computers, we generally treat them, culturally and physically, differently than we do desktops or laptops. But there was a time in the not-too-distant past where the line between home computer and video game console was a lot more blurred than it is today. Even before Microsoft entered the scene, companies like Atari and Commodore were building both types of computer, often with overlapping hardware and capabilities. But they weren’t the only games in town. This video takes a look at the Bally Home Computer System, which was a predecessor of many of the more recognized computers and gaming systems of the 80s.

At the time, Bally as a company was much more widely known in the pinball industry, but they seemed to have a bit of foresight that the computers used in arcades would eventually transition to the home in some way. The premise of this console was to essentially start out as a video game system that could expand into a much more full-featured computer with add-ons. In addition to game cartridges it came with a BASIC interpreter cartridge which could be used for programming. It was also based on the Z80 microprocessor which was used in other popular PCs of the time, so in theory it could have been a commercial success but it was never able to find itself at the top of the PC pack.

Although it maintains a bit of a cult following, it’s a limited system even by the standards of the day, as the video’s creator [Vintage Geek] demonstrates. The controllers are fairly cumbersome, and programming in BASIC is extremely tedious without a full keyboard available. But it did make clever use of the technology at the time even if it was never a commercial success. Its graphics capabilities were ahead of other competing systems and would inspire subsequent designs in later systems. It’s also not the last time that a video game system that was a commercial failure would develop a following lasting far longer than anyone would have predicted.

Continue reading “Behind The Bally Home Computer System” →