Arduino Video Game for the Neighbourhood

// November 18th, 2013 // arduino

My house/office has a store window and I try to make use of it as much as possible. I had some projections etc. in there before, but now I wanted to make something interactive. We have a lot of loitering youth and many people passing by. To appeal to a wide audience, I thought it would be nice to make an old fashion arcade box like thing.

It’s now on the street for one day and people really seem to like it. Age or background doesn’t make a difference.

To make it a little bit more challenging,  I thought it would be fun to try to run the hole thing on an Arduino without an external computer. Just to see how much power it actually has. And while I was at it, I decided to try to make everything myself. So I also made my own led screen, with his own “display driver” and display list, a 8-bit sound library, and of course the game itself.

The only thing I didn’t make was the background music for the game, that was composed by the lovely Annegreet Sledsens: Thanks sweety!  You can hear it in the video.

The led screen is very bright which made it very hard to film and photograph with my cheap camera. Even after some photoshopping, I couldn’t  make it look as good as in real life. So if you’re in the neighbourhood (Antwerp Belgium, Provinciestraat 60, behind the Zoo), feel free to come check it out and play a game with the locals!

Here the video and some more pics:




The Game



I needed something that would appeal to a large audience (the people in my street) and something was fun to play .
So I took the good old gaming cliché, where the world gets invaded by aliens and you have to fight your way to the end boss, save the world and the human race . With my minimal resolution of 16*90 pixels, I didn’t have much other choice than making it pixel-art style.

The game has 3 modes, a single-player and a multiplayer brawling/fighting the aliens mode, and an extra fighting mode where the 2 players can battle with each other.

Every mode has just one level, but since it is just a casual “play on your way to work” kind of game, I thought it would be more then ok.

some screen-shots:

The game-mode selection:

Two players fighting the the final boss:

The girl kicking the boys ass in fighting mode:

Game over!



Development



To make the development easy and fast, I cross developed the game as a Cinder c++ app  and an Arduino app, that way i didn’t had to upload the whole thing on an Arduino every time I wanted to test something.

I didn’t use any external memory, so I had to store everything on the Arduino.  I made a small app that generates c++ classes from bitmaps with some gamma correction for the led screen. I used indexed colours to save some of that precious SRAM. For driving the leds, I modified the Adafruit neopixel lib, to support alpha-blending and make it a little bit faster for my specific case.

I don’t really have much experience with generating sound and music. So the 8-bit sound was quite challenging. I’m happy with the result, but my oscilloscope broke during development of a more advanced sound lib, so its quite simple for now. But I really enjoyed  myself working on the sound aspect. I have a feeling that my next project is going to be something sound/music related ;)

I’m not going to elaborate too much on the rest of the code. But you’re free to check the source code yourself  (warning: its messy).

The full source code and game assets on Github (Code-> MIT, Assets-> CC attribution)


The Hardware



Like I said, I made my own led display.

I used strips of  WS2812 LEDs, those are individually-addressable RGB LEDs. The lay in a 16*90 grid (=1440 leds)

I added a laser cut raster over the leds to make the pixels square and put a layer of plexi to diffuse the light some more.

Beneath the leds is the main Arduino Due and the power source. This is the Arduino that drives the display and runs the game. Those leds suck a lot of power , so I had to add a 60A 5V power supply.

The screen/main arduino is connected with the arcade box through a simple tx-rx serial line, which was fast enough to send the button commands.

the arcade box is just some painted MDF with a steel frame inside, and a steel plate on-top (it has to be a little bit solid if i leave it outside ;) )
The Arduino in the arcade box generates the sound and music and handles the raw button/joystick input.

If your interested,  the full “schematic” of the project:

Its pretty straight forward.: Pulldowns for the buttons and joystick, the led connections and a pot for the screen brightness and a tx-rx line between the two Arduinos.

on top of that there is a DC coupling for the speaker which is connected to the Arduino DAC . But I still have to put some kind of amplifier between the arduino and the speakers. The sound is hard to hear because of the street noise.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

22 Responses to “Arduino Video Game for the Neighbourhood”

  1. Thijs Bernolet says:

    Very very nice! Congrats! Will make a detour next time I’m in antwerp :)

  2. Simo Endre says:

    Such a great idea to give for people a way to joy the time during to office or share some short moments of joy when walking on street. You are an ingenious person and this little toy only confirm again your large area of interest. Respect!

  3. Mark says:

    Ha nice to see how far you took it with the arduino board! Very cool!
    Do the controls resist the rain?

  4. Kris says:

    Hi Mark,
    Some rain should be fine, but I don’t recommend to keep it a hole day in pouring rain

  5. [...] Kris shared on his blog all the documentation to make your own version, check it out! [...]

  6. [...] Temmerman, a freelance creative developer based in Belgium, recently published a blog post detailing the design of an Arduino-based video game that he created for his neighbors to [...]

  7. Antonio Rodriguez says:

    This is awesome. I am planning on playing with those leds myself. Could you tell me what material you used for the raster?

  8. Kris says:

    Hi Antonio,
    It’s just a 9mm MDF plate (I painted it black on the top and white on the inside)
    cheers

  9. mrpatoh says:

    Its such a great piece of Gaming-art. Nice design…. appealing to the passers-by.
    Although, The pixel side is very small.

  10. Pedro Madeira says:

    Thanks for your share and congrats on your project!
    :)

  11. plaetzchen says:

    Very nice indeed and thank you for making it open source. Any idea for next step? I just thought it could be fun to make the controller a mobile ready website. No rain problems, no need to watch for the controller box, no cables.

  12. frob says:

    This looks great! Any hints on where to get the joysticks and buttons ?

    thank you

  13. Kris says:

    hi frob, got them from ebay
    search for arcade buttons/joystick

  14. Timothy says:

    Dude,
    That is awesome! Pure genius!
    I don’t live in Belgium anymore, otherwise I’d come visit :)

  15. [...] even cooler, Kris has posted detailed instructions on how to built it yourself, along with the source code for the game on [...]

  16. [...] For more detailed information including schematics see the full post on neuroproductions.be [...]

  17. [...] Temmerman cross-developed the game as an Arduino app and a Cinder c++ app, and all the memory is stored on the Arduino. More details on how he developed the software and hardware can be found on the project page. [...]

  18. [...] code is fully open source of course and available on Github. Head over to his project page to find out exactly how he made [...]

  19. [...] Arduino Video Game for the Neighbourhood | Neuro Productions. [...]

  20. [...] however, likes to utilize his window as an interactive part of his house, as he explains on his own website, so he decided to create a game that everyone would understand and like and turn his window an [...]

  21. Kieran Nolan says:

    This is really excellent, and thank you for sharing how you made it

  22. Smarri says:

    Hi, did you write more documentation about how to use the code in the files?

Leave a Reply