Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

27117 Posts in 1549 Topics- by 1996 Members - Latest Member: thegoodboy03

May 25, 2013, 07:14:29 AM
Team Meat ForumsSuper Meat BoyTech SupportTechnical question (Team Meat, please advise)
Pages: [1]
Print
Author Topic: Technical question (Team Meat, please advise)  (Read 366 times)
EmmaWatsonsBF
Level 1
*
Posts: 108



View Profile
« on: February 27, 2011, 09:46:56 PM »

If the game runs at 60 fps, how do you measure times in hundredths of a second? (furthermore, the smbstats program indicates that it measure thousandths of a second!)

Thanks for responding here, as I would rather not have a twitter account.

I know you're at GDC, so I'll probably bump this in a week.
Logged

roboticaust
Level 3
***
Posts: 319


The game is about meat parkour, not standing still


View Profile
« Reply #1 on: February 27, 2011, 10:09:23 PM »

If I'm not mistaken, a frame is .016 (the 6 of course a repeating number).  Best guess is they use a float point for time and add onto it every frame in the game loop.  Float points are 8 digit precision, however numbers before the decimal do count towards this.  So odds are, they use a + 0.0166666 and anything beyond the 8th digit gets dropped.  So if it's 10.______, there's only 6 digits after the decimal rather than the 7 above.  Submissions are then cut to 3 digits upon ending the level.  Reason for this is that programming always rounds down unless you build a function to do so.  So like the above, when it drops a digit from the float, you lose all the data at that point.  This is probably why 3 digits are used since that third digit would always be rounded down on (from the point where the data is shaved off).  However a function to compare that third digit for an accurate 2 digit rounding is more than possible and probably likely for that matter.  So for all intensive purposes, the third digit is just to properly round the second digit.

Overly nerdy explanation, but there's your answer.  The third digit is to successfully round to an accurate 2 digit notation we currently see in game.
Logged

EmmaWatsonsBF
Level 1
*
Posts: 108



View Profile
« Reply #2 on: February 27, 2011, 10:56:49 PM »

There are levels where the leaderboard times are (for example) 7.55, 7.56, 7.57, 7.58. Each 0.1 apart. If it were measuring strictly by 0.01666 increments, wouldn't it skip one of these numbers in rounding?

If the 3rd digit is just for rounding, wouldn't they all be they same in each case (rounding up or rounding down)? (I'm no longer at my Meat Boy computer to check).

Here's an example. My 1-1 time (the only one I can remember right now) is 0.887; 53.22 frames.
53 frames = 0.883333
54 frames = 0.900000

If the third digit is for rounding, then my time is 0.89, which is still in between frames.

So how does the game know I got to the end 1/5 of the way through frame 53 and 54?
Logged

roboticaust
Level 3
***
Posts: 319


The game is about meat parkour, not standing still


View Profile
« Reply #3 on: February 27, 2011, 11:22:57 PM »

There are levels where the leaderboard times are (for example) 7.55, 7.56, 7.57, 7.58. Each 0.1 apart. If it were measuring strictly by 0.01666 increments, wouldn't it skip one of these numbers in rounding?

If the 3rd digit is just for rounding, wouldn't they all be they same in each case (rounding up or rounding down)? (I'm no longer at my Meat Boy computer to check).

Here's an example. My 1-1 time (the only one I can remember right now) is 0.887; 53.22 frames.
53 frames = 0.883333
54 frames = 0.900000

If the third digit is for rounding, then my time is 0.89, which is still in between frames.

So how does the game know I got to the end 1/5 of the way through frame 53 and 54?

I'm not the expert on all things Meat Boy source code.  I was assuming based on prior programming knowledge.  Could be some kind of corrective math to keep time reliable (as in .01666666 wasn't staying accurate).  Could also be doing the timer inside the game loop without a sync on it, although that is kinda strange.  However the third digit logic is more than likely right on the money.  When you trim or try rounding in programming, it instantly drops it down.  For instance, 3.856 rounded to the 2nd digit in programming would be 3.85 (the 6 drops).  Building a function to handle rounding is the way to go.  Hell, gdi+ might even have one that I'm unaware of.  But if you're passing numbers through a function to round them, you would need to standardize them first.  Which is what I'm assuming that digit is for.

Another suggestion I've seen around is that the third digit acts like a leaderboard tie-breaker.  However, I've seen that's not the case from repeatedly tying my times and not having it update the character icon any (when given that stupid meat boy icon glitch from running to fast then taking a break so it will submit properly).  I've also witnessed the leaderboards change positions for players at the same 2 digit time.  So if the 3rd digit isn't for leaderboards, it must be for something technical like accurately rounding off 2 digit times.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by padexx