Results 1 to 16 of 16

Thread: "2048" game in hardware

  1. #1

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    "2048" game in hardware

    Hi guys,

    A while back I posted about my latest work-in-progress. Thought I'd talk about it here just to get a little feedback.

    I hope to make a very simple hand-held game based on the popular "2048" game (see here).

    In essence it will be a small circuit board with a 4x4 grid of RGB lights and a set of 4 buttons. Instead of numbers, I'll be using colours on a spectrum from red (low value) to green (high value).

    My driving goal is a low price for the kit. A secondary goal is a small size - perhaps something that might fit on a keyring.

    Annoyingly, my laptop blew up a week or two ago so I'm unable to work on the circuit design at the moment, I'll upload some images of the design as soon as I'm back on my feet. For the time being I'm just writing the firmware for the game on my raspi and will have to port it over to the microcontroller later on in the project.

    I think I can get away with an Atmel ATTiny85 chip as the brains of the game. I have previously used this chip to drive an array of 16 Neopixels to good effect. hopefully if I recycle that LED driver code I can also cram in the game logic for 2048!

    Sorry for the lack of detail at this time. I hope to rectify that soon.

    In the mean time, play this until you lose your mind...
    http://gabrielecirulli.github.io/2048/
    I don't live here any more.

  2. #2
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: "2048" game in hardware

    I am excited to see how it will work. Send me one for free for... testing purposes...

    Basically the 4 buttons will just be left, right, up, down?

    Buy a new computer and get this show on the road!

  3. #3

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: "2048" game in hardware

    Yep, 4 buttons for the directions. Super simple really A friend has promised to build me a computer for cheap so I'm hoping to be up and running this week some time.

    The PCB design is at most 6 hours work total (go Diptrace!), after a few more hours for sourcing the components it'll be done. I'll just send it out to the manufacturer without even prototyping it, it's a pretty basic design. Maybe a month turnaround, which gives me a long time to get the code written 100%.
    I don't live here any more.

  4. #4
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: "2048" game in hardware

    Haven't heard of Diptrace... I have been using Fritzing to design my boards, although I haven't had one created yet. I am going to try that program out when I have a chance.

    If the game works on a breadboard and you replicate it identically it should work fine without a prototype. Will probably save you a lot of money by not just ordering one PCB. Be sure to post your process as you go along. I wanna see how it comes along

  5. #5
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,582

    Re: "2048" game in hardware

    Quote Originally Posted by wossname View Post
    ...
    In the mean time, play this until you lose your mind...
    http://gabrielecirulli.github.io/2048/
    Stupid game... stayed up 'til 5 in the morning playing the #@#$#% thing.

  6. #6
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: "2048" game in hardware

    Quote Originally Posted by passel View Post
    Stupid game... stayed up 'til 5 in the morning playing the #@#$#% thing.
    There are a few strategies to playing the game. The main strategy is to try to keep the largest number tile in one of the corners and not let it go anywhere else. Sometimes thats no possible. But you want to attempt to only move tiles toward that corner. Makes it easier to combined several tiles at once.

  7. #7
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,582

    Re: "2048" game in hardware

    Quote Originally Posted by wossname View Post
    ...In essence it will be a small circuit board with a 4x4 grid of RGB lights and a set of 4 buttons. Instead of numbers, I'll be using colours on a spectrum from red (low value) to green (high value).
    ...
    I haven't played with RGB lights, but the need for 11 distinguishable colors (10 if you don't count the winning value) and the user being able to identify the "magnitude" seems like it might make it frustrating/tiring to play.
    Have you written a quick prototype version you can run in windows to test what 11 colors you want to use and the playability of the game using those colors?

  8. #8
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: "2048" game in hardware

    Making a prototype in windows would be useless since you can display millions of colors with today's displays. I assume he has created an actual prototype or at least a breadboard model that shows the colors.

    That actually brings up a good point... In 2048, its possible to get to 4096. Will it be impossible to add two green boxes together?

  9. #9
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: "2048" game in hardware

    Brings up another question. Are you going to make it possible to reprogram the chip to add your own firmware?

  10. #10

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: "2048" game in hardware

    In answer to your questions...

    Yes, the chip will be re-programmable in-situ. I'll leave some pads on there for you to add a programming connector (or solder on some jump wires). The original source will be available on my website.

    As with the web-based game I'll allow you to continue after you've "won". There will probably be a fancy animation when you hit 2048 for a few seconds and then it'll resume where you left it.

    I think it will be possible to get up to 30 or more visually distinct colours by also varying the brightness of the cells as well as the colour and perhaps having the larger value cells flashing or pulsating somehow. Depends if I've got any RAM left in the chip (it's pretty limited from the get-go).
    I don't live here any more.

  11. #11
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: "2048" game in hardware

    Great! Looking forward to this game.

    As far as RAM goes... I ran out of RAM a few times with my simple Thermometer / display device. STRINGs take up A LOT of space, not sure if you were aware. Stick to character arrays, they save space.

  12. #12

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: "2048" game in hardware

    I don't live here any more.

  13. #13
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: "2048" game in hardware

    Looks good woss!

  14. #14

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: "2048" game in hardware

    I don't live here any more.

  15. #15

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: "2048" game in hardware

    I don't live here any more.

  16. #16
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: "2048" game in hardware

    Such stoked. Much happy. Very excite. Wow.


    But really, looks great

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width