fexed / Pinball-on-Android

Android port of 3D Pinball Space Cadet
MIT License
678 stars 14 forks source link

Score is always 0 #59

Closed KoalaBear84 closed 1 year ago

KoalaBear84 commented 2 years ago

With the new version the score uploaded to the scoreboard is always 0.

Locally the highscore also stays at 0, so it's not the posting online which is the issue.

Probably just a bug in the new code?

Samsung Galaxy S22+ Android 12, patch level August 1 Language is English

zachpepsin commented 2 years ago

I encountered this a couple times after beating a previous high score. Locally, the high score is not updating either.

soccerboys2008 commented 2 years ago

i think i just found the cause,

NOTE: i play without cheats

i decided to do some looking around through the apps data using root and found these binary files in /data/data/com.fexed.cpacecadetpinball/cache/volley

binary files.zip

as you can see the 'score' for 'rank' is 0 but the 'score' for 'cheatRank' is set to something

so i decided to turn on random cheats to see if that made a difference, and the score was saved and rank was updated

you can also see the change in this file

binary file.zip

NOTE: the username in all the binary files was changed to REDACTED, just because

TLDR: you need to use at least 1 cheat for you score to be saved and your rank to update, the cheatRank and rank seem to swapped. also i wanted to help find the bug cause it was getting on my nerves

p.s. in the meantime im just using screenshots

KoalaBear84 commented 2 years ago

It should be the other way around. Also play without cheats.

soccerboys2008 commented 2 years ago

yes i should, and i believe it was a simple mistake. i work with python with aspirations of getting into kotlin. similar things have happened in my programs.

honestly i wanted to find the bug because i wanted my scores to be saved, and the faster its found, the faster its fixed

soccerboys2008 commented 2 years ago

also as a side note something will need to be done with all the scores on the leaderboard. as only people who use cheats get there score saved.

maybe a cheats leaderboard and the scores can all be migrated, idk thats up for the developer to decide

fexed commented 1 year ago

Should be fixed in v2.3, yes an error on my side put only the high score made with cheats in the leaderboard so we will probably clean that