SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript Game question

    Hi. I need to create a simple (I hope) game and I'd like to do it w/ Javascript, if possible. Here's the gist - I've got a list of 6 people. The object of the game is to find out which person you're most like. There are five questions w/ 6 answers each. Based on how you answer the five questions, the results would tell you which of the 6 people you're most like. I got the idea from here: http://disney.go.com/princess/html/main_iframe.html - if you navigate to the games section, then the "Which Disney Princess Are You?" game. I would love to do this in Flash, but I don't know it well enough, so I'm trying javascript - a much more basic version of the link above, I know. Any suggestions would be welcome. Thanks!

    ~lahddah

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,147
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)

    js game

    Hi lahddah, welcome to the forums,
    Keep in mind that javascript is client side. Users could look at the script and "cheat". Probably not that big of a concern if this is purely for entertainment.
    Anyway, it should be easy enough to do a Q? A: 5 points B: 10 points etc.
    add your "score" If you got between this and that then.... type of thing. Just give the form selects (or radios) numeric values add them together and test in if's.

  3. #3
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,808
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  4. #4
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, felgall and Mittineague! felgall, that turned out to be EXACTLY what I was looking for! It took a while for me to respond as I wanted to customize everything and make sure it still worked. It does....never actually thought that JS would be able to do that in just that manner. Thank you, again, for your suggestions!

    ~lahddah


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
  •