1. #1

    Bug with capping "Maximum Distance" as primary score.

    Hey all,

    I'm just dropping in to report what I think is a bug with the trials evo editor and I wanted to see if anyone could check me on this. I discovered it when I was making my first distance based skill game Lakes and Ladders (linked in sig!!). The triggers and events that I chose to use were pretty much identical to how the hill climb tutorial in the 32 part series was done if you want a reference.

    In there, I defined a variable as my primary score and told it that it was a distance type variable. At some point while I was doing the editing I accidentally set the maximum for the distance variable to be 0.005 meters. While the "bar" display behaved and rendered normally when I used that mode (filling almost immediately), the numerical display of the score was capping at 5.000 meters. I changed the maximum to 0.011 meters and then the distance was capping at 11.000 meters. I then set the maximum to 20 meters... and while the bar display would cap at 20 meters, the number display would go past 20 meters and the value of the variable itself I don't believe was capped. I'm wondering if it was actually limited to 20,000 meters but I had no way to test that.

    To me it looks like, while the bar will render properly based on the percentage of the defined value maximum... it's having a floating point error going on when it actually comes to capping the variable. At worst, this could potentially ruin leaderboards.

    To test this further, I created a copy of the primary score into counter 1. Counter 1 was just a numerical display version of the primary score, which I left in bar display. ended up keeping both of these in the published version of the track.) While the progress bar was rendering sensibly enough*, I couldn't get the variable to actually cap at 416** meters unless I set the cap to 0.416 meters. Luckily, no one is ever going to make it that far in my skill game... but what I think would happen would be instead of capping properly, the leaderboard would be filled with scores like 416.153, 416.042, 416.234 - depending on how much distance a rider could travel between ticks - instead of capping everyone who finished the course at 416 and using time as the secondary score.


    If you guys have any questions or need clarifications I'll be happy to provide as much information as I can. I'm not exactly a master with the editor yet - but it sure seems like there is some unintended inconsistent behavior going on with how the maximum value is used on distance type variables that has to do with decimal places. Thanks, I'm curious to find out what you guys discover.


    *There's something else going on here too or maybe I'm not understanding the intended behavior... if you play lakes and ladders, the progress bar seems like it would hit 100% at around 50-ish meters even though the set cap is in the 400s. It looks better this way so I left it, but to my understanding 100% of the bar isn't supposed to hit until maximum score? Or does that have something to do with the medals instead?

    **I'm at work right now and don't have the track in front of me so 416 might not be the exact right number I capped it at. Could be 419, or 438. It's some low 400-ish number and it doesn't really matter for troubleshooting.
    Share this post

  2. #2
    Jarr3tt88's Avatar Senior Member
    Join Date
    Jan 2013
    Posts
    3,520

    Re: Bug with capping "Maximum Distance" as primary score.

    If you're doing a track based on distance, why would you cap it at all? Unless there is a definite end?

    The way to cap it is in the skill game settings under the primary and secondary score. If you set the max, that will be the max score can go. I usually go to an astronomical number, why cap the players? Unless there is a need to cap them.
    Share this post

  3. #3

    Re: Bug with capping "Maximum Distance" as primary score.

    Originally Posted by Jarr3tt88
    If you're doing a track based on distance, why would you cap it at all? Unless there is a definite end?

    The way to cap it is in the skill game settings under the primary and secondary score. If you set the max, that will be the max score can go. I usually go to an astronomical number, why cap the players? Unless there is a need to cap them.
    Because there is a definite end. If you finish the course, the secondary score (time) should be used. I don't know why that's weird to you, some of the official skill games are built that way.

    Did you read anything that I posted? The things you're talking about have nothing to do with the bug.
    Share this post

  4. #4
    Jarr3tt88's Avatar Senior Member
    Join Date
    Jan 2013
    Posts
    3,520

    Re: Bug with capping "Maximum Distance" as primary score.

    Originally Posted by Elipsis
    Originally Posted by Jarr3tt88
    If you're doing a track based on distance, why would you cap it at all? Unless there is a definite end?

    The way to cap it is in the skill game settings under the primary and secondary score. If you set the max, that will be the max score can go. I usually go to an astronomical number, why cap the players? Unless there is a need to cap them.
    Because there is a definite end. If you finish the course, the secondary score (time) should be used. I don't know why that's weird to you, some of the official skill games are built that way.

    Did you read anything that I posted? The things you're talking about have nothing to do with the bug.
    Yea I did read it. My question was rhetorical kind of...If you max your distance, it shouldn't go higher. max 20 stops counting at 20. Your data source WILL continue to increase, but won't show on the "counter" past the max you set it.

    Also if you don't want those decimal places like 315.45 or 245.77 then use just a standard datasource set to datasource instead of distance (call it distance) But if you DO want the decimals, like I said, it shouldn't go passed the max. Max is max, how can it go passed? lol
    Share this post

  5. #5

    Re: Bug with capping "Maximum Distance" as primary score.

    Originally Posted by Jarr3tt88
    Originally Posted by Elipsis
    Originally Posted by Jarr3tt88
    Also if you don't want those decimal places like 315.45 or 245.77 then use just a standard datasource set to datasource instead of distance (call it distance) But if you DO want the decimals, like I said, it shouldn't go passed the max. Max is max, how can it go passed? lol


    Yeah that's the bug. I was hoping someone could read the description of what I was doing and see if they can reproduce it.
    Share this post