User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: Hi-Score object (scores dropping by 1?)

  1. #1
    No Products Registered

    Join Date
    Jul 2006
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hi-Score object (scores dropping by 1?)

    First off, I have to say KUDOS to the folks at Clickteam. I just spent 10 days making a game prototype for my company and it honestly looks like a big team worked 2 or 3 months on it. (It's super polished.)

    Anyway, although the hi-score object worked GREAT all day yesterday, most of the scores today are being rounded DOWN by 1, and I can't figure out how this could happen. Anyone have any ideas? (I put the .ini files on our network at work -- sort of a cheap way to do an online leaderboard).

    There are ONLY 3 ways to score points:

    - Matches are worth 100 points
    - Clearing the screen is worth 500 points
    - There is a multiplier that starts at 1.0 and goes up by .1 during the game. (1.1, 1.2, 1.3, etc.)

    At the end of the game the animated Scoring Summary will show:

    POINTS: 5800
    MULT: 6.3x
    TOTAL: 36540

    But on the High Scores screen the total score looks like this: 36539 (rounded down by 1).

    Again, this wasn't happening at ALL yesterday, but today all new scores seems to be doing it. The new scores are over 32,000, if that makes a difference.

    Any thoughts? Has anyone seen this behavior before?

  2. #2
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hi-Score object (scores dropping by 1?)

    Is the number perhaps 36539.7, being rounded up in your display and down in the highscore object?

  3. #3
    No Products Registered

    Join Date
    Jul 2006
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hi-Score object (scores dropping by 1?)

    Yeah, that was my first thought, too. But the scores are ONLY 100 and 500. And the multiplier is always in 10ths. So the final score should be in multiples of 10.

    Is there a reason why the Hi-Score object would round down while my global value(s) would round up?

  4. #4
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hi-Score object (scores dropping by 1?)

    Except floating point numbers aren't accurate unless the fraction part is a number divided by a power of 2 (e.g. 1/2, 1/4, 3/4, 73/256, etc). Tenths can't be represented accurately, the closest it can get it will be something like 102/1024 (which is slightly below 1/10).

    EDIT:
    Quote Originally Posted by JohnC
    Is there a reason why the Hi-Score object would round down while my global value(s) would round up?
    The default way of rounding in a computer is to truncate (chop off the fraction part), i.e. always round down. The counter you're using for display probably explicitly asks for a round-to-closest.

  5. #5
    No Products Registered

    Join Date
    Jul 2006
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hi-Score object (scores dropping by 1?)

    Thank you for the help, Dynasoft!

    During the game I am updating two global values: "PlayerScore" and "Multiplier". There are only 3 events that affect the score:

    PlayerScore = PlayerScore + 100
    PlayerScore = PlayerScore + 500
    Multiplier = Multiplier + 0.1

    The Scoring Summary converts PlayerScore * Multiplier to a string.

    The High Score screen is set using the same line. (PlayerScore * Multiplier). If MMF2 has a Ceiling command I'll try that to see if it fixes the problem. If not, I'm still at a loss...

  6. #6
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hi-Score object (scores dropping by 1?)

    Yes, it should be just ceil().

  7. #7
    No Products Registered

    Join Date
    Jul 2006
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hi-Score object (scores dropping by 1?)

    I finally got around to testing this earlier tonight and "ceil" is making some of my HighScores 1 *higher* than they should be. Then I tried "int" and the scores are 1 lower.

    Has anyone else had this kind of problem?

    Per my comment above, there are only 3 events that affect the score and multiplier (both Global Values):

    PlayerScore = PlayerScore + 100
    PlayerScore = PlayerScore + 500
    Multiplier = Multiplier + 0.1

    The final score (PlayerScore * Multiplier) is displayed correctly on the game screen, and the summary screen. But this line:

    Insert hiscore int(PlayerScore*Multiplier) and Name

    Is occasionally producing a number that is one lower than it should be. My wife's score tonight was 45,500 but it showed up as 45,499 on the High Scores screen.

    Any idea why this is happening? It has me completely stumped.

  8. #8
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,729
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Re: Hi-Score object (scores dropping by 1?)

    Sounds like the game is ending before the high score has a chance to register.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  9. #9
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export Module
    Skyhunter's Avatar
    Join Date
    Jan 2007
    Location
    Croatia
    Posts
    451
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hi-Score object (scores dropping by 1?)

    Try this:

    ((PlayerScore*1.0) * Multiplier))

  10. #10
    No Products Registered

    Join Date
    Jul 2006
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hi-Score object (scores dropping by 1?)

    Thanks for the suggestion, Skyhunter. But that didn't work either.

    I just finished a game and I wrote down all the scores. At the end of the game it clearly shows that I earned 10250 points and a 6.3 multiplier.

    The Scoring Summary frame comes up next and it shows 10250 points, 6.3 multiplier and a total score of 64575 (points * multiplier).

    On the next frame, I send points * multiplier to the High Score object but then it shows in the high scores list as 64574. (Had I used: ceil(playerscore * multiplier) I'm pretty sure it would have appeared as 64576. (Based on an earlier test.)

    This is obviously a bug in the High Scores object but I don't know why I seem to be the only one having the problem. The only thing I can think of is that I'm storing the .ini file on our network at work (so it acts as a sort of online high score table for everyone playing), but I don't know why that would throw the scores off by 1.


Page 1 of 2 1 2 LastLast

Similar Threads

  1. Hi-Score Object for single player with multiple scores and text
    By 1234cb in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 9th June 2013, 09:08 AM
  2. [ How to ] open source tuto -> Gradient scores effect / Effet de score gradient
    By Sevennemesis in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 16th February 2013, 08:42 PM
  3. Mochi Scores: retrieve only #1 score and name
    By MJK in forum SWF/Flash Export Module Version 2.0
    Replies: 0
    Last Post: 9th June 2011, 05:39 PM
  4. Dropping a bouncing object
    By Digitalic in forum Multimedia Fusion 2 - Technical Support
    Replies: 19
    Last Post: 25th May 2010, 01:11 PM

Posting Permissions

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