Results 1 to 5 of 5

Thread: Simple game written in JavaScript

  1. #1
    Join Date
    Feb 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Simple game written in JavaScript

    Just starting out with JS...

    I'm sure there's ways to shorten this down, but I'm fairly pleased with it

    http://www.jetshack.com/ecgame.htm

    Any suggestions / pointers would be welcome...

  2. #2
    Join Date
    Sep 2005
    Posts
    882
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    Alert boxes are very annoying. Try writing out information to the screen. Also, why does it switch to black?

  3. #3
    Join Date
    Feb 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by blm126 View Post
    Alert boxes are very annoying.
    I agree

    Quote Originally Posted by blm126 View Post
    Try writing out information to the screen.
    Haven't learned how yet... I think that's two chapters ahead of where I'm at now. As soon as I learn how I will... Well probably not to that script as it was just an example of where I was at at that point....

    Quote Originally Posted by blm126 View Post
    Also, why does it switch to black?
    seemed like the easiest way to hide the instructions.

    I've started a new script, need to add a timer to it. It's a clone of a "Digitor" machine...

    Choose a type of math problem then you're presented with 10 of those problems. the score is kept and then presented after the final question is answered.

    generates 2 random numbers (currently with a max value of 12)

    addition problems were straight forward
    subtraction problems are tested to make sure that the first number is larger than the second number so that there aren't any negative answers.
    multiplication problems were straight forward.
    division problems - multiplied the 2 random numbers together to get the dividend then use the dividend and one of the 2 random numbers in the problem. This makes sure that you end up with simple integers.



  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I agree about the black, and the alerts, though I can understand using alerts. The black is just confusing. uh... what do I do now? Etc.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Feb 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    It's getting better...

    www.jetshack.com/digitor2.04.htm

Bookmarks

Posting Permissions

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