Neural Networks Using Doom Level Creator Like It’s 1993

Readers of a certain vintage will remember the glee of building your own levels for DOOM. There was something magical about carefully crafting a level and then dialing up your friends for a death match session on the new map. Now computers scientists are getting in on that fun in a new way. Researchers from Politecnico di Milano are using artificial intelligence to create new levels for the classic DOOM shooter (PDF whitepaper).

While procedural level generation has been around for decades, recent advances in machine learning to generate game content (usually levels) are different because they don’t use a human-defined algorithm. Instead, they generate new content by using existing, human-generated levels as a model. In effect they learn from what great game designers have already done and apply those lesson to new level generation. The screenshot shown above is an example of an AI generated level and the gameplay can be seen in the video below.

The idea of an AI generating levels is simple in concept but difficult in execution. The researchers used Generative Adversarial Networks (GANs) to analyze existing DOOM maps and then generate new maps similar to the originals. GANs are a type of neural network which learns from training data and then generates similar data. They considered two types of GANs when generating new levels: one that just used the appearance of the training maps, and another that used both the appearance and metrics such as the number of rooms, perimeter length, etc. If you’d like a better understanding of GANs, [Steven Dufresne] covered it in his guide to the evolving world of neural networks.

While both networks used in this project produce good levels, the one that included other metrics resulted in higher quality levels. However, while the AI-generated levels appeared similar at a high level to human-generated levels, many of the little details that humans tend to include were omitted. This is partially due to a lack of good metrics to describe levels and AI-generated data.

Example DOOM maps generated by AI. Each row is one map, and each image is one aspect of the map (floor, height, things, and walls, from left to right)

We can only guess that these researcher’s next step is to use similar techniques to create an entire game (levels, characters, and music) via AI. After all, how hard can it be?? Joking aside, we would love to see you take this concept and run with it. We’re dying to play through some gnarly levels whipped up by the AI from Hackaday readers!

Continue reading “Neural Networks Using Doom Level Creator Like It’s 1993”

Playing Pong With Micro:bits!

Where would the world be today without Pong, perhaps a lot less fun? For people like [Linker3000] the game is an inspiration toward teaching the next generation of hackers to build and play their own version using Micro:bits as controllers!

Aiming for doing all manner of diligence, [Linker3000] says the code can simply be uploaded to an Arduino — foregoing throwing together a circuit of your own — if you want to jump right into things. For the workshop environment, this setup uses composite video outputs — but this shouldn’t be an issue as most TVs still retain these inputs.

Once built — or sketch uploaded — the Micro:bit paddles can be connected to the ATmega328p and played like an old-school controller, but [Linker3000] has enabled Bluetooth control of the paddles’ A and B buttons via the Bitty app. Additionally — if wires really aren’t your thing and Bluetooth is too new-school for such an old game — a second Micro:bit can control the wired paddle using their built-in radio, provided they’re configured accordingly.

On top of Pong, there are also squash and soccer game modes! Check out the demo after the break.

Continue reading “Playing Pong With Micro:bits!”

Game-Ception: Pokemon Red Playable Inside Minecraft

If you’ve ever wanted to take a dive into and visualize a game’s code, this could be a seminal example in a literal sense. After twenty-one months of effort, the entire Pokemon Red game is now playable inside Minecraft.

[Mr. Squishy] is the mad genius behind this project, laboriously re-coding the game literally block by block. A texture pack is needed for the specific sprites, but otherwise it is playable without mods. It’s not immediately apparent when loading in to the level, but chip your way through the floor of the stadium and you are confronted by something awe-inspiring: sprawling constructions, like great soaring cliffs, comprising approximately 357,000 command blocks — equating to the same in lines of code. Every animation, tracked stat, attack and their effects, the various pokemon and their properties, and so on are rendered in the game’s physical space for you to wander through.

Beneath that are levels of maps, positional data, properties of those areas, NPCs, and a clever glitch that [Mr. Squishy] used to keep everything loaded at once.

Continue reading “Game-Ception: Pokemon Red Playable Inside Minecraft”

It Looks Like A Nintendo, But It’s Running A Pi: A Gamer’s Long-Sought Dream Handheld

[Christopher Foote] didn’t play quite as many games as he wanted to as a child. After years of catching up using the RetroPie and the PiGRRL 2, it was when he first picked up a Switch’s joy-cons that inspiration struck. Behold: the PiSwitch!

Realizing they operated on Bluetooth tech, [Foote] spent a fair chunk of time getting the joy-cons to properly pair to the Raspberry Pi 3 and function as one controller. Once done, he relied on Linux Joystick Mapper to manage the keybindings with some extra legwork besides to get the analog sticks working properly.

To make this console mobile, he’s packed a 6600mAh battery and Adafruit Powerboost 1000c into the device, added a second headphone jack and speaker for commuting and home enjoyment, and a Pi V2 camera module. A 3D printed case, encapsulating these components and a seven-inch touchscreen, also allows the joy-cons to be detached — though he plans on updating its design in the future.

The PiSwitch boots into a custom UI  that lets you select different services — RetroPie, Kodi, Debian, and the terminal — while the joy-cons seamlessly function together or individually regardless of the activity. Check out the quick intro tour for this project after the break!

Continue reading “It Looks Like A Nintendo, But It’s Running A Pi: A Gamer’s Long-Sought Dream Handheld”

What Is This, A Controller For Ants?!

What’s the smallest controller you’ve ever used? [BitBuilt] forum user [Madmorda] picked up a cool little GameCube controller keychain with semi-working buttons at her local GameStop. As makers are wont to do, she figured she could turn it into a working controller and — well — the rest is history.

This miniaturized controller’s original buttons were essentially one piece of plastic and all the buttons would depress at once — same goes for the D-pad. Likewise, the original joystick and C-stick lacked springs and wouldn’t return to a neutral position after fidgeting with them. To get the ball rolling, [Madmorda] picked up a GC+ board — a custom GameCube controller board — just small enough to fit this project, eleven hard tact switches for the various buttons, and two squishy tact switches to replicate the original controller’s L and R button semi-analog, semi-digital functionality.

Continue reading “What Is This, A Controller For Ants?!”

Play A Few Games of Smash Brothers On The Go With A Portable Wii

How would you approach a build that required you to hack apart a perfectly good console motherboard? With aplomb and a strong finish. [jefflongo] from [BitBuilt.net] — a forum dedicated to making consoles portable — has finished just such a task, unveiling his version of a portable Wii to the world.

While this bears the general appearance of a portable GameCube, it’s what inside that counts. A heavily modified   Wii motherboard — to reduce size — forms this portable’s backbone, and it includes two infrared LEDs on its faceplate for Wii Remotes.  A single player can use the built-in controller, but [jefflongo] has included four GameCube controller ports for maximum multiplayer mayhem. Although he’ll likely plan on taking advantage of the built-in AV Out port to play on a TV and charge port for those extended gaming sessions, four 3400mAh batteries — with an estimated four hour battery life — should keep him satisfied on the go until he can recharge.

While the electronics display an impressive amount of work, but the final piece is a sight to behold. Check out the demo video after the break!

Continue reading “Play A Few Games of Smash Brothers On The Go With A Portable Wii”

Turn a Car Into a Game Controller

The CAN bus has become a staple of automotive engineering since it was introduced in the late ’80s, but in parallel with the spread of electronic devices almost every single piece of equipment inside a car has been put on the CAN bus. While there are opinions on whether or not this is a good thing, the reality is that enough data is gathered on this bus to turn an unmodified modern car into a video game controller with just a little bit of code.

The core of [Scott]’s project is a laptop and a Python program that scrapes information about the car from the car’s CAN bus, including positions of the pedals and the steering wheel. This information can be accessed by plugging an adapter into the OBD-II port (a standard for all cars made after 1995). From there, the laptop parses the CAN data into keyboard and mouse commands for your video game of choice.

This is an interesting investigation into the nitty-gritty of the CAN bus, but also a less dangerous demonstration of all of the data available from the car than some other cases we’ve seen. At least [Scott]’s Mazda (presumably) lacks any wireless attack vectors!

Continue reading “Turn a Car Into a Game Controller”