Build A Tiny Arcade Game In Minutes – UDEMIE

Tiny Arcade Game - Attiny85 Build
Tiny Arcade Game - Attiny85 Build

Hello, wonderful people!

We’ve recently ventured into the world of microcontrollers, specifically the 8-bit ATtiny85, and it has been an exhilarating experience for us!

In this Instructable, we’ll guide you step by step on how to build your very own tiny arcade game. You’ll have the opportunity to play seven different games, and we’ve also designed a custom keyring-style mini PCB to house the components.

For those who are new to ATtiny microcontrollers, let us introduce you to this small yet powerful device. The ATtiny85 is an integrated, 8-pin IC, similar to the Arduino but with fewer IO pins, smaller memory, and a more compact form factor. Don’t let its size fool you; the ATtiny85 microcontroller can perform a myriad of functions on a single IC once it has been programmed. In this project, we’ll be programming it with some classic arcade games.

If you’re a beginner, don’t worry! We’ve designed this project with you in mind. As long as you have basic soldering skills and a computer, you should have no trouble building your own tiny arcade game. We’ve used through-hole components and off-the-shelf parts that you can easily and affordably purchase from Ali-Express or your preferred electronics supplier. We’ve included links to all the necessary parts in the next step.

You will also need to learn how to program the ATtiny85. To simplify this process, we’ve published an Instructable on programming the ATtiny85, which you can find in step 3. This project includes everything you need to create your own arcade game.

The available games include classic arcade hits like Frogger, Space Attack, Breakout, Snake, Pong, and others. It’s truly astonishing that we can fit entire games into one of these tiny ICs!

We started this project by playing around with the basics of microcontrollers and quickly realized how much fun and educational it could be. Our journey has been filled with excitement, learning, and a few challenges along the way, but we’re thrilled to share this experience with you.

The keyring-style mini PCB we designed is not only functional but also stylish, making it a great conversation starter and a unique piece to show off your DIY skills.

Check out the video we’ve included to see the games in action. We hope this project inspires you to dive into the world of microcontrollers and create something amazing.

So, without further ado, let’s get building!

Supplies

Supplies
Supplies
Supplies

The following parts list is for the Mini Arcade components. Step 2 has all of the information needed to program the ATtiny.

You will get 5 PCB’s when you have them printed so you may as well ensure that you order enough parts to build 5!

Parts:

  1. PCB – See next step on how to get them printed
  2. ATtiny85 X 1 – Ali Express. Tip – Buy them in lots of 5 – it’s cheaper and you can always use them in more games. Make sure you buy ‘through hole’ IC’s
  3. OLED Display Module (SSD1306) – Ali Express Buy the single colour ones. Mine are white OLED but you can get them in blue as well.
  4. Buzzer (speaker) – Ali Express. I used the low profile ones like this Ali Express
  5. Resistors – metal film 1% – Ali Express
  6. 10K X 2
  7. 1K X 1
  8. 6.8K X 1
  9. Momentary Tactile Push Button X 3 – Ali Express.
  10. Micro on/off switch vertical – Ali Express you can also use these types as well – Ali Express
  11. CR2032 battery holder X 1 – Ali Express
  12. CR2032 Battery – Ali Express

Step 1: The PCB & Schematic

The PCB & Schematic
The PCB & Schematic
The PCB & Schematic

Firstly, all the files you need to get the circuit board printed can be found in our Google Drive.. We’ve included the Eagle files for both the schematic and the board, allowing you to modify and experiment with them if you wish.

You’ll need to send the Gerber files to a PCB manufacturer like JLCPCB (Not affiliated) who will print the boards for you. Jump into my Google Drive link, download the Gerber file to your computer and then send them off to your PCB manufacturer of choice. Make sure you keep it zipped.

we’ve put together an Instructable on how to get your broads printed which you can find here.

NOTE: The manufacture will include an order number on the PCB. However, you can ‘specify a location’ once the Gerber files have been loaded. Click ‘specify a location’ when the board has been loaded and the manufacturer will add it to the back where I have indicated.

Step 2: Adding the Components to the PCB

Adding the Components to the PCB
Adding the Components to the PCB

The component list is quite low and as mentioned, I’ve only used through hole components (no SMD) so it’s super simple to solder everything in place. Note that the PCB is double sided and the battery holder and on/off switch is added to the back of the PCB. The order that you add the components is important. If you add the OLED module before the battery holder you won’t be able to get to the solder points for the battery holder so pay attention to the following steps

STEPS:

  1. As usual it’s best to start with the lowest profile components which in this case is the resistors. These have been added to the PCB so they are hidden by the OLED module and also act as supports for the module. Solder these in place.
  2. Next solder the tactile switches into place
  3. You can now solder the programmed IC into place. If you add a IC socket you can always easily remove the ATtiny and re-program it with other games. It also allows you to remove the ATtiny if something goes wrong with the programming. I like to test the ATtiny first via a breadboard to make sure it is working correctly before soldering it into place.
  4. Now solder the buzzer (speaker) into place.
  5. Before you solder the OLED module, flip the PCB and solder into place the battery holder and on/off switch.
  6. Now you can solder the OLED into place.
  7. Add a battery to the back and turn on the game to make sure everything works.

Step 3: Programming the ATtiny85

Programming the ATtiny85
Programming the ATtiny85

When I first started to investigate and learn how to program the ATtiny I was totally confused! The tutorials that I found on line didn’t give a complete step by step guide and I had to work my way through a number of them to finally work out how to do it. Luckily for you I’ve recently put together an Instructable on exactly how to do this and it really isn’t that hard.

You will however need to get yourself an Arduino Uno which you’ll need to program the ATtiny. Again, I want to reiterate that this really isn’t hard to do and if you follow the Instructable below you will be able to program your ATtiny with any of the games included in this Instructable

How to Program ATtiny with an Arduino

Once you know how to program an ATtiny, you are ready to install one of the games onto it.

Step 4: Programming a Game on the ATtiny85 – Step 1

Programming a Game on the ATtiny85 - Step 1
Programming a Game on the ATtiny85 - Step 1

Now that you know how to program the ATtiny, it’s time to try and add one of the games I have included. All of the games can be found in my Google Drive in the ‘Tiny Arcade – Games’ folder and have been fully tested and work perfectly.

You will need to add a library to the Arduino. This couldn’t be easier. As a matter of fact, Arduino have included a number of libraries that you just need to install directly from Arduino IDE. The library is needed so the ATtiny can drive the OLED screen

STEPS:

  1. In Arduino IDE go to Sketch / Include Libraries / Manage Libraries
  2. Type the following in the search bar – ssd1306xled which will bring up the sketch and then hit install.
  3. That’s it! You have now added the library for the OLED module and there is nothing further to so.
  4. Now you can open the sketch for whatever game you want to program to the ATtiny and upload it via Arduino.
  5. Just click onto the sketch which will open Arduino and follow the steps above to load the game to the ATtiny.

Step 5: Programming a Game on the ATtiny85 – Step 2

Programming a Game on the ATtiny85 - Step 2
Programming a Game on the ATtiny85 - Step 2
Programming a Game on the ATtiny85 - Step 2

Now that you have added the sdd1306xled library – you need to change a couple things under Tools to make suree everything works ok. If you don’t do this then you might find that the games restart constantly.

STEPS:

  1. In the game sketch that you have opened go to: Tools / Override Clock Source and click on ‘Internal Oscillator 8Mhz
  2. Next go to: Tools / Processor speed and click on 8Mhz Internal Ocsillator
  3. Lastly, go to: Tools / Brown Out Detection Level and click 1.8V. Actually not 100% sure you need to do this but it won’t hurt
  4. Now you can upload the sketch into the ATtiny85.

Step 6: Playing the Game

Playing the Game
Playing the Game
Playing the Game

Most of the games are quite simple to play so you don’t really need instructions on how to play them. I have included the instructions on how to play in the next step.

I haven’t included Pacman or Tetris in this build. They are available but Pacman needs some additional steps and I didn’t want to confuse anyone. Tetris uses a different style OLED so that’s for another build.

If you are looking for other games then just do a search on Google for ATtiny85 games and see what you can find. Make sure you test them on a breadboard first before committing them to a PCB.

A lot of the games only use 2 buttons but I have included 3 (left, jump, right) so you can play multiple games on the one board

That’s it! Build a bunch more using the other games and give them away to your friends and family.

Step 7: Game Instructions

Game Instructions
Game Instructions
Game Instructions

Bat Bonanza

Bat bonanza is a clone of the classic pong

  1. Pressing and releasing the left button cycles through modes, including two-player games and one-player modes with varying degrees of difficulty.
  2. Also, from standby, press and hold the left button to reset all settings

Breakout

  1. Use the left and right buttons to control the paddle at the bottom of the screen

Frogger

  1. Use the left & right buttons move the frog across the screen
  2. The middle button moves the frog forward
  3. From standby, press and hold left button to turn sound on and off
  4. From standby, press and hold left button with the right button held to reset high score

Run Dude run

  1. LEFT and RIGHT buttons move the little dude. Just don’t let any missiles hit you!

Snake

  1. Classic snake game which only uses the left button to control the snake

Space Attack

  1. LEFT and RIGHT buttons move the spaceship
  2. Middle button to fire
  3. From standby, press and hold left button to turn sound on and off
  4. Press and hold left button with the right button held to reset high score

UFO & Stacker – 2 games on one ATtiny

  1. To play Stacker – press and release left button
  2. To play UFO – with the right button held, press and release left button
  3. To turn sound on and off – press and HOLD left button
  4. To reset high scores to zero – whilst HOLDING the right button, press and HOLD the left button

Puzzles and Games Contest

Leave a Reply

Your email address will not be published. Required fields are marked *