Researching Factorio…For Science

Science has affirmatively answered a lot of questions that, looking back, could be seen as bizarre to have asked in the first place. Questions like “can this moldy cheese cure disease” or “can this rock perform math if we give it some electricity.”  Among the more recent of this list is the question of whether or not the video game Factorio, in which the player constructs an elaborate factory, can be used as the basis for other academic work. As [Kenneth Reid] discusses in this talk, it most certainly can.

If you haven’t played the game, it’s a sort of real-time strategy (RTS) game where the player gathers materials to construct a factory while defending it from enemies. On the surface it might seem similar to Age of Empires or Starcraft, but its complexity is taken to extremes not found in other RTS games. The complexity hides nuance, and [Kenneth] points out that it’s an excellent simulator to study real-world problems such as vehicle routing problems, decision making, artificial intelligence, bin packing problems, and production planning, among a whole slew of other interesting areas of potential research.

[Kenneth] and his partners on this project also developed some software tools with interacting with a Factorio game without having to actually play it directly. The game includes an API which the team used to develop tools so that other researchers can use it as a basis for simulations and studies. There was a research paper published as well for more in-depth reading on the topic. We shouldn’t be too surprised that a game can be used in incredibly productive ways like this, either. Here’s another example of a toy being used to train engineers working in industrial automation.

Continue reading “Researching Factorio…For Science”

Playdate Handheld Turned Typewriter

The Playdate is an interesting gaming system. It’s a handheld, has a black and white screen, and superficially reminds us a little bit of the original Game Boy, right down to the button layout. But the fact that it has a second controller that pops out of the side, that this controller is a crank, and that the whole system was made by the same people that made Untitled Goose Game, makes us quite intrigued. Apparently it has made an impact on others, too, because this project turns the gaming system into a typewriter.

The Playdate doesn’t have native support for USB accessories unless it’s plugged into this custom 3D printed dock. Inside of the dock is a Teensy 4.1 which handles some translation between the keyboard and the console. Once the dock is taken care of the text editor needs to be side-loaded to the device as well. The word processor has the ability to move the cursor around, insert and delete text, and the project’s creator, [t0mg], plans to add more features in future versions like support for multiple files, changing the font, and a few other things as well.

For anyone interested in recreating this project, all of the printable files, the text editor, and the schematics are all available in the GitHub repo. It’s an impressive project for a less well-known console that we haven’t seen many other hacks for, unless you count this one-off Arduboy project which took some major inspiration from the Playdate’s crank controller.

Electric Guitar Shocks You For Missing A Note

Rocksmith is a popular video game that works like Guitar Hero, but with a real guitar. You have to play well and hit the right notes, or the game penalizes your score. [Lightwing] took the stakes up a notch, though, adding a system that shocks the player every time they fail.

To achieve this, it was necessary to detect when the player missed a note. Initial attempts involved using Tensor Flow AI to detect the game state from the screen, but it was unreliable. Instead, the game’s memory was read to achieve detection. When the player misses a note, a certain section of memory changes, and a script reads the change in game state. It then sends a signal to an Arduino which triggers the stun gun’s fire button, which shocks the player holding the guitar.

As you might expect, the documentation for this project includes a video which involves plenty of gratuitous electric shocks when [Lightwing] makes mistakes. Fair warning — there’s plenty of colorful language when the stun gun fires. Generally, a powerful shock ends with screams a dropped guitar, and too much fear to continue.

It’s painful enough that it’s probably not a useful teaching tool for learning the guitar. We’ve seen similar shocking builds before, too, like this simple wire game.

Continue reading “Electric Guitar Shocks You For Missing A Note”

Mouse Finds New Home In Pinball Machine

Restoring pinball machines is an excellent hobby, and can even be more than that as we see businesses like bars and museums focusing on them as a main attraction. There’s all kinds of intrigue to be found, from esoteric mechanical systems to classic electronics and unique artwork. For those building new pinball machines, though, one way to bypass a lot of the hassle of finding antiquated parts is to build a digital machine with an analog feel, like this machine which repurposes a computer mouse in an interesting way.

One of the important design considerations with a more modern system like this is to preserve the mechanical components that the player interacts with, in this case the plunger. This pinball machine is really just a large screen driven by a computer, but the plunger is a spring-loaded one from an old analog machine. Attached to the end of the plunger inside the cabinet is a cloth strap which passes underneath an old optical mouse. When the plunger is pulled and released, the mouse registers the position of the plunger and sends that information to the computer controlling the pinball display.

We really appreciate a KISS-style design like this in general. Mice are a proven, reliable technology and the metal components of the plunger are unlikely to ever wear out, which means that at least this part of the new pinball machine is unlikely to need much maintenance over the lifespan of the cabinet itself. For other ways of preserving the original feel of old machines, take a look at this build which incorporates all kinds of tricks within a MAME cabinet.

CRT TV screen showing a Super Mario Bros main screen with "Social Media Bros" written on the title screen instead. There's a NES console to the right of it, with a perfboard on top of it, wires going into the console port.

ConnectedNES Brings Twitter Into Super Mario Bros World

Back in 2016, artist and video game historian [Rachel Weil (HXLNT)] was hanging out with her friend and hacking on console stuff, as friends do. [Rachel] was galvanized by the idea of having an iconic game like Super Mario Bros be interrupted by push notifications, and set out to bring a Twitter feed to her NES gaming experience. What she ended up with is ConnectedNES — a charming combination of a custom Twitter modem and a hacked Super Mario Bros ROM, creating a social media experience you have to see for yourself.

The technical side is as immaculate as the visuals. Data is transferred to the NES through the controller port using a Particle Photon that’s emulating a NES controller, and everything is encased in an adorable shell made out of yarn needlework.

The Photon currently taps into the Twitter feed through a proxy server run locally, and listens for tweets with specific keywords, relaying them to the ROM through mimicking controller port inputs. The ROM, now bearing the name Social Media Bros, went through some careful assembly trimming work. In particular, [Rachel] had to sacrifice Green Mario to the bit bucket gods.

Playing this game has to be quite the experience. Thankfully, source code for everything — the proxy server, the Photon firmware and the NES ROM — is on GitHub for all of us NES enthusiasts to hack at. If simply reading the feed is not enough, you can send tweets from your NES as well.

Minimal Tic Tac Toe Business Card

The PCB business card has long been a way for the aspiring electronics engineer to set themself apart from their peers. Handing out a card that is also a two player game is a great way to secure a couple minutes of a recruiter’s time, so [Ryan Chan] designed a business card that, in addition to his contact information, also has a complete Tic-Tac-Toe game built in.

[Ryan] decided that an OLED display was too expensive for something to hand out and an LED matrix too thick, so he decided to keep it simple and use an array of 18 LEDs—9 in each of two colors laid out in a familiar 3×3 grid. An ATmega328p running the Arduino bootloader serves as the brains of the operation. To achieve a truly minimal design [Ryan] uses a single SMD pushbutton for control: a short press moves your selection, a longer press finalizes your move, and a several-second press switches the game to a single-player mode, complete with AI.

If you’d like to design a Tic-Tac-Toe business card for yourself, [Ryan] was kind enough to upload the schematics and code for his card. If you’re still pondering what kind of PCB business card best represents you, it’s worth checking out cards with an updatable ePaper display or a tiny Tetris game.

Continue reading “Minimal Tic Tac Toe Business Card”

DIY Haptic-Enabled VR Gun Hits All The Targets

This VR Haptic Gun by [Robert Enriquez] is the result of hacking together different off-the-shelf products and tying it all together with an ESP32 development board. The result? A gun frame that integrates a VR controller (meaning it can be tracked and used in VR) and provides mild force feedback thanks to a motor that moves with each shot.

But that’s not all! Using the WiFi capabilities of the ESP32 board, the gun also responds to signals sent by a piece of software intended to drive commercial haptics hardware. That software hooks into the VR game and sends signals over the network telling the gun what’s happening, and [Robert]’s firmware acts on those signals. In short, every time [Robert] fires the gun in VR, the one in his hand recoils in synchronization with the game events. The effect is mild, but when it comes to tactile feedback, a little can go a long way.

The fact that this kind of experimentation is easily and affordably within the reach of hobbyists is wonderful, and VR certainly has plenty of room for amateurs to break new ground, as we’ve seen with projects like low-cost haptic VR gloves.

[Robert] walks through every phase of his gun’s design, explaining how he made various square pegs fit into round holes, and provides links to parts and resources in the project’s GitHub repository. There’s a video tour embedded below the page break, but if you want to jump straight to a demonstration in Valve’s Half-Life: Alyx, here’s a link to test firing at 10:19 in.

There are a number of improvements waiting to be done, but [Robert] definitely understands the value of getting something working, even if it’s a bit rough. After all, nothing fills out a to-do list or surfaces hidden problems like a prototype. Watch everything in detail in the video tour, embedded below.

Continue reading “DIY Haptic-Enabled VR Gun Hits All The Targets”