Logo

[OpenITG] Calorie counter broken code

Register Log In Back To Forums

Post #1 · Posted at 2018-06-17 03:13:07pm 5.8 years ago

Offline Zowayix
Zowayix Avatar Member
1,144 Posts
Not Set
Reg. 2009-09-19

(If this isn't the right forum, if someone could point me to the right one that would be great. Thanks!)

I play ITG/SM/DDR primarily for the exercise, and just the other day I found out that OpenITG has a Fitness mode with a calorie counter. However, the numbers seemed to be way off after playing for a while, and after digging through the source code, I found this:

https://github.com/openitg/openitg/blob/7be537546ea1b8861a522b063233e67c1ff0137e/src/Player.cpp#L882

It looks like for a 100 lb player, the code is supposed to count a step as 0.029 calories and a jump as 0.193 calories. The numbers themselves look correct. However, the code tells the difference between a step and a jump by just looking at how many arrows are pressed down. This means that for the average stream where the player walks on the arrows, every step is counted as a jump. This causes the game to report more than 6x as many calories burned.

An easy way to reproduce this bug is to hold the left arrow, then tap the right arrow with the other foot a bunch of times. Each time you tap right, the game sees two arrows being pressed down and counts everything as a jump. If you do not hold down any arrows and then tap the right arrow with one foot, everything is correctly counted as a step.

Has anyone else experienced this bug before, and/or is there any Stepmania-based build out there that has this bug fixed?

Post #2 · Posted at 2018-06-17 06:04:23pm 5.8 years ago

Offline MadkaT
MadkaT Avatar Member
820 Posts
Not Set
Reg. 2009-11-24


Last updated: 2018-06-17 06:06pm
I think is just a reference value, Tongue the solution is to create a custom LUA function for this and just call it into OpenITG or any theme.

I think using the judgement commands and a step counter would be enough.
Register Log In Back To Forums

0 User(s) Viewing This Thread (Past 15 Minutes)

©2006-2024 Zenius -I- vanisher.com -5th style- IIPrivacy Policy
Web Server: 2% · Database: 4% · Server Time: 2024-04-24 08:10:17
This page took 0.003 seconds to execute.
Theme: starlight · Language: englishuk
Reset Theme & Language