A robot playing tic-tac-toe against a human

TICO Robot Plays Tic-Tac-Toe By Drawing On A Tiny Whiteboard

Tic-tac-toe (or “Noughts and Crosses”) is a game simple enough to implement in any computer system: indeed it’s often used in beginner’s programming courses. A more challenging project, and arguably more interesting and useful, is to make some kind of hardware that can play it in real life. [mircemk] built a simple yet elegant machine that can play tic-tac-toe against a human player in a way that looks quite similar to the way humans play against one another: by drawing.

The robot’s design and programming were developed at PlayRobotics, who named the project TICO. The mechanical parts are available as STL files, to be printed by any 3D printer, and a comprehensive manual explains how to assemble and program the whole thing. Since it’s all open source, anyone can build it from scratch and modify it to their liking. The pictures show the original design by PlayRobotics, while the video (embedded after the break) shows [mircemk]’s version, which includes a wooden frame that gives it a bit more presence.

Continue reading “TICO Robot Plays Tic-Tac-Toe By Drawing On A Tiny Whiteboard”

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”

Interactive Clips For Game Boy: Sit Back And Watch Or Take Control

How often does this happen to you? You find yourself describing something that happened in a game to someone, and they’re not sure they know what part of the map you’re talking about, or they’ve never gotten that far. Wouldn’t it be cool to make a bookmark in a video game so you can jump right to the beginning of the action and show your friend what you mean using the actual game?

That’s the idea behind [Joël Franusic] and [Adam Smith]’s fantastic Playable Quotes for Game Boy — clip-making that creates a 4-D nugget of gameplay that can either be viewed as a video, or played live within the bounds of the clip. The system is built on a modified version of the PyBoy emulator.

Game Boy game ROM -- complete and partial
Left: the full game ROM. Right: a bookmarked slice of the game ROM with the rest set to zero.

Basically, a Playable Quote is made up of a save state and all that entails, plus a slice of the game’s ROM that includes just enough game data to recreate an interactive clip. Everything is zipped up and steganographically encoded into a PNG file. Here’s a Tetris quote you can play (or watch) right now — you might recognize it from the post thumbnail. You’ll find the others on the games site, which allows people to create and share and build on each other’s work.

There’s so much more that can be done with this type of immersive and interactive tool outside the realm of games, and we’re excited to see where this leads and what people do with it.

Haven’t heard of PyBoy before? Let us introduce you.

Trigger assembly for PS5 controller in palm of hand

How The PS5’s Genuinely Clever Adaptive Triggers Work

Sony’s Playstation 5 console and its DualSense controllers aren’t exactly new, but the triggers of the controllers have a genuinely interesting design that is worth examining. The analog triggers on the PS5 controllers are generally described as having “variable resistance”, but it turns out that’s not the whole story. Not only is the trigger capable of variable resistance when being pressed, but it can also push back in variable ways and with varying amounts of force. How it works is pretty clever.

Trigger assembly being moved in palm of handThe feedback for the trigger assembly is handled by a lever, a geared wheel, and a worm gear on an electric motor. Under normal circumstances, nothing interferes with the trigger at all and it works like a normal analog trigger. But when the motor moves the lever into place, trigger movement now has to overcome the added interference with a mechanical disadvantage. The amount of resistance felt can be increased a surprising amount by having the motor actively apply additional force to counter the trigger’s movement.

That’s not all, either. The motor can also actively move the lever into (or out of) position, which means that pulling the trigger not only has the ability to feel smooth, mushy, or stiff in different places, but it can also actively push back. This feedback can be introduced (or removed) at any arbitrary point along the trigger’s range of motion. A trigger pull can therefore feel like it has a sharp breakpoint, a rough travel, a hard stop, an active recoil, or any combination of those at any time.

It’s a little hard to describe, but you can get a better idea of it all works in practice by watching part of this teardown by [TronicsFix] (video cued to about 9:17 where the trigger teardown begins.) It’s also embedded below, so give it a peek.

A small amount of force applied in the right place can produce outsized results, but a force feedback project doesn’t have to be subtle. One can always shake things up by mounting a whole bunch of solenoids onto a mouse.

Continue reading “How The PS5’s Genuinely Clever Adaptive Triggers Work”

Putting Thousands Of Minecraft Players On The Same Server

Multi-threading was the common go-to technique for extracting more performance from a machine for several years. These days it’s all about horizontal scaling or adding more virtual machines to a pool of workers. The Minecraft server is still stuck in the past in some ways as it supports neither multi-threading nor horizontal scaling. [Jackson Roberts] decided to change all that by hacking Minecraft to support thousands of players rather than dozens.

Since the server is single-threaded, having more than 100 players on a single server can slow it to a crawl. Some mods try to optimize and speed up the existing server but [Jackson] wanted more. An early proof of concept was to slice the world into separate servers, each holding 64×64 chunks (chunks are what Minecraft defines as a 16x256x16 volume of the world). When crossing a boundary, entities such as players and zombies were transferred from one server to another. While workable, the demo had issues such as parts of the world being inaccessible if a server went down. The boundaries were also jarring as you had to reconnect and couldn’t see players outside your server.

Instead of splitting the world, [Jackson] took the approach to split the players and have some backing store for persisting and broadcasting changes. A proxy sits in front of several Minecraft servers, which each have a connection to a WorldQL server (a spatial database based on Postgres). Each server reports the player’s location to the WorldQL server and receives updates for their loaded locations. When a server comes online, it catches up with the changes stored in WorldQL and starts syncing, allowing servers to auto-scale. There are still a few core game mechanics that aren’t quite ready for prime-time such as NPCs and Redstone, but the progress so far is remarkable.

The code for the Minecraft plugin is up on GitHub, but more is coming in the future. So if you’re interested in something a little more vanilla, why not marvel at the completely playable Pokemon Red inside vanilla Minecraft?

Streetfighter 2 placed on table top display with separate arcade control box

Game Like It’s 2021 On A McDonald’s Touchscreen Table

Some of you around the world may have come across these Android-based gaming tables installed in your local fast-food outlet, and may even have been lucky enough to paw at one that was actually working at the time.

Originally based on an ancient mini PC, with a 1080p flat panel LCD and a touch overlay, they would have been mind-blowing for small children back in the day, but nowadays we expect somewhat more. YouTuber [BigRig Creates] got his hands on one, in a less than pleasant condition, but after a lot of soap and water, it was stripped down and the original controller junked in favour of a modern mini PC. To be clear, there isn’t much left beyond the casing and display from the original hardware, but we don’t care, as a lot of attention was paid to the software side of things to get it to triple-booting into Windows 10, Android x86 and Linux running emulation station, covering all those table-gaming urges you may have.

Internally, there is a fair amount of room for improvement on the wiring side of things, and [BigRig] is quick to admit that, but that’s what this learning game is all about. Now, many of you will choke on the very idea of playing games on a table system like this, after all, it’s pretty obvious this will be really hard on the back and neck. But, it does offer the easy option to switch from landscape to portrait orientation, simply by walking around the side, so it does have an upside. Also you’ve got a handy place to dump your beer and the takeaway when it arrives, so maybe not such a bad thing to have in your apartment? And, yes, it does run Doom.

We were particularly amused by the custom boot logo as well as the slick custom art in emulation station. It’s attention to detail like this that makes a build a great one and a conversation piece at parties. Now if only he could sort out that wiring job.

Continue reading “Game Like It’s 2021 On A McDonald’s Touchscreen Table”

a render of the curved bartop arcade machine in fusion 360

Bartop Arcade Machine That Isn’t Afraid Of Change

Arcade machines have a distinct look and feel with large imposing cabinets and smaller bartop machines that try to keep the look and feel of a traditional upright arcade cabinet while taking up less space. An entirely new aesthetic has been given for this engineering marvel of a bartop arcade that [DIY Engineering] has made. Gone is the expansive angular box, and in its place are sleek and slender curves. The key piece that makes this build work is the curved monitor.

He started with a detailed design in Fusion360 that really focused on the tools and techniques that [DIY Engineering] knew would work. The backbone of the device was formed from wooden dowels around which 3d printed parts slid on. To the sides of the dowels, two pieces of acrylic are screwed on to act as an LED diffusor. To that acrylic, two pieces of CNC’d red oak are attached with two arcade buttons for pinball-style actuation. Over the top, cast acrylic was heated and then bent into the desired shape with the help of a two-part mold press. The screen slotted right in perfectly. Part of the display at the top was reserved for a marquee, and the look is extraordinary with the dark acrylic. Ten arcade buttons and an eight-way joystick offer an array of options for input.

Internally, a temperature-controlled fan and a Raspberry Pi are running the show. Controls are wired as GPIO and read by the Pi. So naturally, the games on the SD card tend to look best on a long vertical screen: vertical shooters and the like.

Arguably, the best thing about this project isn’t just the execution (which is fantastic) but the look behind the curtain at the process. So many potential problems were solved in the modeling stage, and fabrication went fairly smoothly as a result (or so we think youtube hides a multitude of sins). The results speak for themselves, and we think this is an enviable arcading machine. [DIY Engineering] has mentioned providing files in the future for you to build your own. If perhaps it seems a little intimidating, why not give a smaller 3D printable bartop a try?

Video after the break.

Continue reading “Bartop Arcade Machine That Isn’t Afraid Of Change”