#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2009
    Posts
    2
    Rep Power
    0

    Binary Number game


    I want to develop a game, in which a single binary number will be displayed on the screen. The user has to just enter the length of binary number ( I mean to say that the number of digits, for instance if he enters 4, the number should be like 1011, etc) and the length of time (in sec) for which the number should be displayed on the screen.
    Can anyone kindly suggest what to do for this and how to proceed ?

    Thanks in advance.
  2. #2
  3. No Profile Picture
    Turning coffee into code
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2005
    Location
    UT Austin, TX
    Posts
    164
    Rep Power
    94
    What programming languages do you know? This is a very simple problem. The trick here is avoiding overhead. If you already know Python, then it could be the shortest path. If you know C but not Python, then the overhead of learning Python for this would probably take longer than just doing it in C.

    About the only things you need:
    * Basic console IO (or for HTML/JavaScript, IO to a few controls on the page)
    * Access to a timer or the system clock
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2009
    Posts
    2
    Rep Power
    0
    Originally Posted by 280Z28
    What programming languages do you know? This is a very simple problem. The trick here is avoiding overhead. If you already know Python, then it could be the shortest path. If you know C but not Python, then the overhead of learning Python for this would probably take longer than just doing it in C.

    About the only things you need:
    * Basic console IO (or for HTML/JavaScript, IO to a few controls on the page)
    * Access to a timer or the system clock
    Well, I know a bit of Java and I had worked on C, but it was before 2 years. So, can you just let me know how to start and in what language ?
  6. #4
  7. Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2004
    Location
    Switzerland
    Posts
    1,152
    Rep Power
    1902
    Well, aside from putting together the UI (Swing classes in Java) you'd need a separate thread to time the display of the number.

    I assume that the point of the game is to quickly read the number and input the correct decimal representation of it, right?

    So I'd personally start with a game where you have unlimited time to convert the number. When you've got that you can add a Thread to hide it again after a certain time.
    - Hugh of Borg

    The first thing young borg are taught: Keep away from Microsoft software!

IMN logo majestic logo threadwatch logo seochat tools logo