Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: using multiple choice quiz to keep track of game score

  1. #1
    Join Date
    May 2014
    Posts
    203
    Thanks
    28
    Thanked 5 Times in 5 Posts

    Default using multiple choice quiz to keep track of game score

    Would it be possible to keep track of a game score during a turn based battle (like subtracting health pts if one option is chosen or adding pts if another is chosen) using something like a multiple choice quiz, where the option value either adds or subtracts some value? the score itself is determined by the option selected and is then represented by how many health pts or mana pts are deducted/added for 2 players, one of which is a npc monster and the other of which is a player character. each round (player attacks, monster attacks or player heals) can have a whole new quiz so values don't have to be continually passed from page to page, only the score, which is represented by two graphics (player health/mana and monster health).

    the upside is i can pass the score from one page to the next by modifying the graphics beforehand and just have the multiple choice display the relevant graphic that contains the health/mana (scores) of the 2 combatants, the downside is i have no idea how to do that with javascript. i'm assuming the script would have to display a graphical score instead of a number score.

    perhaps it could take a full health/mana bar graphic and a smaller graphic representing an empty/full unit of health and an empty/full unit of mana, and automate the entire process by applying the empty/full unit to the correct location on the full bar graphic, using z-indexing

    if damage done is never more than 1 unit per round it is easily assigned the multiple choice option value of -1 health unit.
    if heal is chosen and is never more than 2 mana per round, it is easily assigned the value of -2 mana units and +2 health units.
    the monster always deducts 1 unit from the player each round. but the player may not always deduct 1 unit from the monster, if they choose to heal instead.
    not sure how that could be depicted using multiple choice quiz options.
    Last edited by jundo12; 05-02-2017 at 07:48 PM.

  2. #2
    Join Date
    Mar 2010
    Location
    Florida
    Posts
    445
    Thanks
    6
    Thanked 43 Times in 41 Posts

    Default

    Assuming you aren't using a database...

    If you are allowed able to use php then I would do something like this ->
    main page that uses ajax (long polling to receive the information and one to send the information)
    Php that can handle the sending and receiving
    One folder that will queue the receiving information.
    Another folder that stores the current information (when that folder has something in its queue it should update the this folder and then send back the information eg long polling in a sense)

    Not sure how much information you know and how you want to store that information but there is part of what I got.
    -DW [Deadweight]
    Resolving your thread: First Post: => EDIT => Lower right: => GO ADVANCED => Top Advance Editor drop down: => PREFIX:Resolved

  3. #3
    Join Date
    May 2014
    Posts
    203
    Thanks
    28
    Thanked 5 Times in 5 Posts

    Default

    well frankly, i'm just an old html person. like i use to code websites by hand, typing out all the html statements including the header, footer, body statements. then css came along and i learned that, mostly, but javascript i'm sooooooo unfamilar with that i barely recognize what the statements mean. whereas php........i heard of it once. hehe. i know it's nigh on impossible to work with it on desktop without a desktop server script of some kind and that's where my info begins and ends. oh and i know it gets hacked alot if used to make a forum . lol

  4. #4
    Join Date
    May 2014
    Posts
    203
    Thanks
    28
    Thanked 5 Times in 5 Posts

    Default

    i was thinking if a multiple choice quiz can keep track of a score for a quiz, it could keep track of a score in a game. in both cases, the variables are determined by the participant and the person who made the quiz. the only modification would require the script to display the score at the end of each round as a graphic *with tinier graphics being added or taken away, depending on the score (whether you as the player picked option 1 (fight) or option 2 (heal). i tried to calculate how i could depict every possible option for 30+ rounds of battle and with 2 options and it's in the hundreds of individual possibilities. nuts crazy stuff

  5. #5
    Join Date
    Mar 2010
    Location
    Florida
    Posts
    445
    Thanks
    6
    Thanked 43 Times in 41 Posts

    Default

    Is this just a personal game for you or are you wanting other people to use this also?
    PHP will be harder to hack if you know what you are doing. I use xampp (https://www.apachefriends.org/download.html) for without a live server to code in php.
    -DW [Deadweight]
    Resolving your thread: First Post: => EDIT => Lower right: => GO ADVANCED => Top Advance Editor drop down: => PREFIX:Resolved

  6. #6
    Join Date
    May 2014
    Posts
    203
    Thanks
    28
    Thanked 5 Times in 5 Posts

    Default

    well its a game for people to play. i'm trying to make it so other people who aren't coders can just copy the scripts, add their own graphics and sound files, and make their own games (it's for people like me who aren't programmers/coders -- many artists and musicians who are so right brained, there's no way they could code but are imaginative and want to express it in game format but really can't cause they couldn't add up their grocery bill much less do algorithms for game codes). the problem is, it's currently a huge mess of all kinds of coding no-nos, like inline css, javascript and html together in same statement, styles scripts not in their own files, and so on. real coders would laugh their butts off at it, after getting over the haphazard mess it is.

    i just got a server to put it on and am preparing myself mentally for learning how to use filezilla. i'm accustomed to wsftp

  7. #7
    Join Date
    May 2014
    Posts
    203
    Thanks
    28
    Thanked 5 Times in 5 Posts

    Default

    its extremely graphic intensive. large images, full screen, many sound files, but works like a webpage (no loading screens), so i thought i would just put the front end of it on the net. it would start with the support page, then dive into the introduction, then the character creation page. once the charaacter is chosen they download the game with that character only to their desktop. otherwise, it would rival wow or guild wars, in sheer size and just be a silly website made into a game.

  8. #8
    Join Date
    May 2014
    Posts
    203
    Thanks
    28
    Thanked 5 Times in 5 Posts

    Default

    oopsie.
    Last edited by jundo12; 05-04-2017 at 03:59 AM.

  9. #9
    Join Date
    Mar 2010
    Location
    Florida
    Posts
    445
    Thanks
    6
    Thanked 43 Times in 41 Posts

    Default

    Sadly to write to a file you'll need ajax with php.
    Here is a tiny example:
    http://stackoverflow.com/questions/2...iles-with-ajax
    -DW [Deadweight]
    Resolving your thread: First Post: => EDIT => Lower right: => GO ADVANCED => Top Advance Editor drop down: => PREFIX:Resolved

  10. #10
    Join Date
    May 2014
    Posts
    203
    Thanks
    28
    Thanked 5 Times in 5 Posts

    Default

    oh i don't want it to create the pages. i can do that. i just want a script that'll keep track of the score for one round. then display the score as two graphics (1 graphic for player, 1 graphic for monster) each depicting health/mana bars. then i can copy the script and repeat it for each round

Similar Threads

  1. multiple choice form with combobox
    By the cute in forum Looking for such a script or service
    Replies: 1
    Last Post: 09-20-2012, 03:31 AM
  2. Quiz game in flash or HTML
    By dwarfer in forum Looking for such a script or service
    Replies: 3
    Last Post: 10-17-2007, 08:37 PM
  3. Simple Multiple Choice Quiz
    By nicklambuk in forum Submit a DHTML or CSS code
    Replies: 5
    Last Post: 04-13-2007, 11:38 PM
  4. Replies: 3
    Last Post: 10-26-2006, 10:28 AM
  5. Multiple Choice Scrollbox URL Launcher
    By julmado in forum HTML
    Replies: 4
    Last Post: 09-19-2005, 11:28 PM

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
  •