Posts with «games» label

Laser Pointer and Arduino Make a Minimalistic Shooting Game

Video games are great and all, but sometimes you just want the thrill of manipulating actual objects in addition to watching action on a screen. This must have been the reason why Nintendo’s Duck Hunt became so popular despite the simplicity of its gameplay. Prolific hacker [mircemk] similarly made a computer-plus-physical game called “Laser Shooter“, which somehow reminds us of the good old NES game.

The game is based on an Arduino Nano, to which five LEDs as well as five photoresistors (LDRs) are connected. When the game is started, the LEDs light up at random and the player has a limited time to “shoot” the corresponding LDR with a laser pointer. This time limit is decreased as the game progresses, and the game is over once the player fails to hit the target on time. The “Game Over” message is accompanied by a sad tune, but luckily no giggling dog.

Complete schematics and code are available for anyone willing to try their hand at replicating or improving this game. And no, you can’t simply sweep your laser across the five LDRs all the time, because you lose if you shoot at the wrong target. For more laser pointer-based games, try this Laser Command clone or this laser tag badge system.

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.


The electronic components are an Arduino with an OLED screen and a buzzer, plus three servos to operate the mechanical parts. Lacking a 3D printer, [mircemk] cut the plastic parts from a 3 mm sheet of PVC, which seems to have worked surprisingly well. The game board consists of a small whiteboard on which the robot and the human can draw their O’s and X’s.

The mechanical structure of the robot looks a bit like a tiny human using both arms to draw with an enormous marker. When starting a game, the robot clears the whiteboard using a little eraser, then draws the standard 3×3 grid and makes its first move. The human then draws their move and uses a remote control to tell the robot what they did (no machine vision here), after which the game continues until there is either a winner or the game results in a draw.

Although it looks like the program’s playing strategy may need some fine-tuning, the mechanical part is well-designed and the arms’ motions are quick and steady. We love the celebratory “cheering” at the end of a game, which TICO does whether it won or not.

The robot’s basic design is inspired by the Plotclock, which uses a similar setup to draw the time. We’ve seen other tic-tac-toe ‘bots before, as well as some clever electronic implementations of the game.

Hack a Day 28 Sep 00:00

Apple Arcade is getting an exclusive Lego Star Wars game

Lego Star Wars: The Skywalker Saga won't arrive until next spring, but another game from the franchise is coming soon — and it's an Apple Arcade exclusive. Lego Star Wars Battles is a real-time strategy game that pits players against each other in one-on-one showdowns.

You'll amass a collection of upgradable characters, troops and vehicles from all eras of the Star Wars universe. You'll be able to pit porgs against Boba Fett, for instance. Don't expect to stick to one side of the Force — you'll have a deck of light side and dark side armies, with different play styles for each. You'll have a number of abilities at your disposal too, such as Darth Vader’s Force Slam and Luke Skywalker’s Force Push.

TT Games Brighton/Warner Bros. Games/Lucasfilm Games

Battlefields will feature Lego towers that you'll build, defend, attack and use to claim territory. The locations include some familiar environments, including Hoth, Naboo and Endor.

TT Games Brighton is developing Lego Star Wars Battles, while Warner Bros. Games is the publisher. It won't be the first Lego game to hit Apple Arcade, though. Lego Brawls and Lego Builder's Journey both landed on the service in 2019. The latter was ported to PC and Nintendo Switch in June.

[Emily]’s Eerie Educational Electric Eyeball Entertains

Like many of us, [Emily’s Electric Oddities] has had a lot of time for projects over the past year or so, including one that had been kicking around since late 2018. It all started at the Hackaday Superconference, when [Emily] encountered the Adafruit Hallowing board in the swag bag. Since that time, [Emily] has wanted to display the example code eyeball movement on a CRT, but didn’t really know how to go about it. Spoiler alert: it works now.

See? It’s educational.

Eventually, [Emily] learned about the TV out library for Arduino and got everything working properly — the eyeball would move around with the joystick, blink when the button is pressed, and the pupil would respond visually to changes in ambient light. The only problem was that the animation moved at a lousy four frames per second. Well, until she got Hackaday’s own [Roger Cheng] involved.

[Roger] was able to streamline the code to align with [Emily]’s dreams, and then it was on to our favorite part of this build — the cabinet design. Since the TV out library is limited to black and white output without shades of gray, Emily took design cues from the late 70s/early 80s, particularly the yellow and wood of the classic PONG cabinet. We love it!

Is Your Pet Eye the worst video game ever, as [Emily] proclaims it to be? Not a chance, and we’re pretty sure that the title still rests with Desert Bus, anyway. Even though the game only lasts until the eye gets tired and goes to sleep, it’s way more fun than Your Pet Rock. Don’t miss the infomercial/explanation/demonstration video after the break. If one video is just not enough, learn more about [Emily’s] philosophy of building weird projects from the Supercon talk she presented. It’s also worth mentioning that this one fits right into the Reinvented Retro contest.

Why are eyeballs so compelling? We can’t say for sure, but boy, this eyeball web cam sure is disconcerting.

Thanks for the tip, [Jake_of_All_Trades]!

Hack a Day 31 May 21:01

Four Servo Fingers Play Simon Better Than You Ever Could

Remember Simon? We sure do. Simon — as in “Simon says…” — from the leading edge of electronic games in the 1970s, which used four buttons, colored lights, and simple tones as the basis for a memory game. Players had to remember the specific sequence of lights and replay the pattern in order to advance to the next round. It was surprisingly addictive, at least for the era.

For those who never quite got into the Simon groove, fear not — the classic game has now been fully automated. While there were plenty of approaches that could have taken to interfacing to the game, [ido roseman] went with the obvious — and best, in our opinion — technique and simulated a human player’s finger presses with servo-controlled arms. Each arm carries a light-dependent resistor that registers the light coming from the key it’s poised above; the sequence of lights is sensed and recorded by an Arduino, which then drives the servo fingers’ replay attack. The fingers aren’t exactly snappy in their response, which might cause problems — if we recall correctly, Simon is somewhat picky about the speed with which the keys are pressed, at least at higher levels of play.

On the whole, we really like this one, not least for the nostalgia factor. We’ve had a lot of recreations of Simon over the years, including a Dance Dance Revolution version, but few attempts to automate it. And a crazy idea: wouldn’t it be fun to replace the replay attack with a machine learning system that figures out how to play Simon by randomly pressing keys and observing the results?

Hack a Day 11 May 00:00
arduino  cds  game  games  ldr  memory  replay  simon  

Planetary Escape (-Room in a Box)

The trick to a fun escape room is layers. For [doktorinjh]’s Spacecase, you start with an enigmatic aluminum briefcase and a NASA drawstring backpack. A gamemaster reads the intro speech to set the mood, and you’re ready to start your escape from the planet. The first layer is the backpack with puzzles you need to solve to get into the briefcase. In there, you discover a hidden compartment and enough sci-fi references to put goofy smiles on our faces. We love to see tools reused as they are in one early puzzle, you use a UV LED to reveal a hidden message, but that light also illuminates puzzle clues later.

All the tech in Spacecase makes it a wonder of mixed media. The physical layer has laser engraved wood featuring the font from the 1975 NASA logo, buttons, knobs, LEDs, toggle switches, and a servo. Beneath the visible faceplate is an RGB sensor, audio player, speaker, and at the center is an Arduino MEGA. We’d love to get our hands on Spacecase for a game, and we’re inspired to pull out all the stops and build games with our personal touches. Maybe something with a mousetrap.

This isn’t the first escape room hardware we’ve seen and [doktorinjh] similarly made a bomb diffusing game.

Handheld Farkle Really Sparkles

Farkle is a classic dice game that only requires 6 dice and a way to write down scores based on the numbers rolled. Even so, this type of game isn’t inherently portable — it would be fairly difficult to play on a road trip, for instance. [Sunyecz22] decided that Farkle would make an excellent electronic game and got to work designing his first PCB.

This little game has everything you could want from a splash screen introduction to a handy scoring guide on the silkscreen. After choosing the number of players, the first player rolls using the momentary button and the electronic dice light up to indicate what was rolled. As long as the player rolled at least one scoring die, they can take the points by selecting the appropriate die/dice with the capsense pads, and either pass or keep going. The current player’s score is shown on the 7-segment, and the totals for each player are on the OLED screen at the bottom.

The brains of the operation is an Arduino Pro Mini. It controls two MAX7219s that drive the 42 LEDs plus the 7-segment display. A game like this is all in the code, and lucky for us, [Sunyecz22] made it available. We love how gorgeous the glossy 3D printed enclosure looks — between the glossy finish and the curved back, it looks very comfortable to hold. In the future, [Sunyecz22] plans to make a one player versus the computer mode. Check out the demo and walk-through video after the break.

The capsense modules are a great touch, but some people want a little more tactility in their handheld games. We say bring on the toggle switches.

Mind-Controlled Beer Pong Gets Easier as You Drink

Wouldn’t it be nice if beer pong could somehow get easier the more you drink? You know, so you can drink more? [Ty Palowski] has made it so with automated, mind-controlled beer pong.

[Ty] started by making a beer pong table that moves the cups back and forth at both ends. An Arduino Nano controls a stepper that controls a slider, and the cups move with the slider through the magic of magnets. The mind control part came cheaper than you might think. Back in 2009, Mattel released a game called Mind Flex that involves an EEG headset and using brain waves to guide a foam ball on a stream of air through a little obstacle course. These headsets are available for about $12 on ebay, or at least they were before this post went up.

[Ty] cracked open the headset added an HC-06 Bluetooth module to talk to the Arduino. It’s using a program called Brainwave OSC to get the raw data from the headset and break it into levels of concentration and relaxation. The Arduino program monitors the attention levels, and when a certain threshold of focus is reached, it moves the cups back and forth at a predetermined speed ranging from 1 to an impossible-looking 10. Check out the two videos after the break. The first one covers the making of the the automatic beer pong part, and the second is where [Ty] adds mind control.

We’ve seen a different headset — the hacker-friendly NeuroSky Mindwave — pop up a few times. Here’s one that’s been hacked to induce lucid dreaming.

Via r/duino

Slot Machine Has a Handle on Fun

For some reason, when slot machines went digital, they lost their best feature — the handle. Who wants to push a button on a slot machine, anyway? Might as well just play video poker. [John Bradnam] seems to agree, and has built an open-source three-color matrix slot machine complete with handle.

In this case, you’ll be losing all of your nickels to an Arduino Pro Mini. The handle is an upgrade to an earlier slot machine project that uses three 8×8 matrices and a custom driver board. When the spring-loaded handle is pulled, it strikes a micro switch to spins the reels and then snaps back into place. Between each pull, the current score is displayed across the matrix. There’s even a piezo buzzer for victory squawks. We only wish the button under the handle were of the clickier variety, just for the feels. Check out the short demo video after the break.

If you’re not a gambler, you could always turn your slot machine into a clock.

Cornhole Boards Play Victory Songs

How do you instantly make any game better? By lighting it up and playing at night. We would normally say ‘drinking’, but we’re pretty sure that drinking is already a prerequisite for cornhole — that’s the game where you toss bean bags at holes in angled boards.

[Hardware Unknown] loves cornhole, and was gifted a set of portable, folding boards that light up around the ring for nighttime action. These turned out to be the perfect basis for reactive boards that light up and play sound whenever points are scored. Both boards have a vibration sensor to detect bags hitting the top, and an IR break-beam sensor pair across the hole. An Arduino Nano reads from the sensors and controls an amplifier and a DF Player for sound.

Players get a point and a song for landing a bag on top of the board, and three points and a different song for making it in the hole. We love the Easter egg — anyone who manages to trip both the vibration sensor and the break-beam detector at the same time will be treated to the sound of a flock of honking geese. Check out the build journey after the break.

No good at cornhole? This one doesn’t let you miss.