What's up with the Pokémon BDSP calculator? - Reverse engineering and code review

  Рет қаралды 261,644

pimanrules

pimanrules

Күн бұрын

Turns out it is actually possible for me to make a video in less than a year, I just need to be nerd sniped thoroughly enough.
Some links that may be of interest to you:
‪@mattparker2‬ 's original video: • How commas broke the P...
Calculator demo: poketch.pimanrul.es/
Calculator source: github.com/jsettlem/bdsp-poke...
My Twitter: / pimanrules
Music by ‪@DJMykah‬
Timestamps
0:00 - Intro
1:41 - Reverse engineering the source code
7:25 - Playing with our calculator demo
9:56 - Explaining the issue
10:43 - First code example
14:11 - Second code example
16:53 - Outro

Пікірлер: 724
@EmpyreanRagnarok
@EmpyreanRagnarok Жыл бұрын
"We all know what language the pokemon games were programmed in." "Japanese." "Unity." "Oh right."
@Brahvim
@Brahvim Жыл бұрын
...more like C#, but Unity as a Game Engine existing on many platforms, ..uhh, yeah.
@nightshark1156
@nightshark1156 Жыл бұрын
Had the exact same thought xD
@KonekoArvi
@KonekoArvi Жыл бұрын
Had the same thought.. And I'm a programmer. I am ashamed of myself... LOL
@WannabeMarysue
@WannabeMarysue Жыл бұрын
no, that's just how math works in germany
@rubengoldman5830
@rubengoldman5830 Жыл бұрын
incredible username
@littlekingbaku5092
@littlekingbaku5092 Жыл бұрын
Dopio
@gerbentime4175
@gerbentime4175 Жыл бұрын
It's how math works in the entirety of Europe. Source: I'm Dutch.
@princier_7215
@princier_7215 Жыл бұрын
@@gerbentime4175 I can confirm Source: I'm british
@Qvartz_Lite
@Qvartz_Lite Жыл бұрын
BMW owners: "Makes sense"
@birdofclay9581
@birdofclay9581 Жыл бұрын
The worst part: Based on what I remember and what I could find about it, the calculator did actually function correctly in all regional versions of Diamond, Pearl and Platinum.
@ClassicBentobox
@ClassicBentobox Жыл бұрын
That was back when you were required to release finished games though.
@goldenhate6649
@goldenhate6649 Жыл бұрын
@@bigbadgammagnome Or in the case of tons of titles now, never gets fixed because they can't be bothered because they made their money and the game was 'good' enough that the whales will just buy the next one.
@ClassicBentobox
@ClassicBentobox Жыл бұрын
@@bigbadgammagnome I think for me, it’s about priority. I don’t care about an exploit like Backwards Long Jump in Mario 64, because the game is complete as a package with or without that. But BDSP in its vanilla form doesn’t have proper music. It’s missing important parts of the complete package. That’s where it’s an issue. The big issue is really that a day will come when the servers offering the patches will go down. And thus some games will live incomplete in their original form. It’s short sighted.
@sarowie
@sarowie Жыл бұрын
I know expensive software that has problems from this very problem class and the bugs remain for over a decade. Note the plural. The most stupid thing is, that the software "sometimes" uses comma and "sometimes" dot as canonical decimal separator and "sometimes" it accepts both and autoconvertes.
@D0Samp
@D0Samp Жыл бұрын
In particular, if the original source was written in C, localization was a feature that was likely either unused and/or not implemented in the standard C library or DS system code (neither has facilities for decimal floating point numbers either), so code similar to this never came even close to assuming to see decimal commas.
@58209
@58209 Жыл бұрын
thank you so much for including manual captions. youtube's auto captions would have absolutely mangled this script.
@Linventor
@Linventor Жыл бұрын
Yes. It's one of those things that doesn't often get much attention, but including captioning is always appreciated.
@competitively3315
@competitively3315 Жыл бұрын
Any KZfaqr who makes manual captions are based.
@Koutsie
@Koutsie Жыл бұрын
+1 !
@Nightcaat
@Nightcaat Жыл бұрын
+1 for manual captions 🧡
@reidleblanc3140
@reidleblanc3140 Жыл бұрын
I've had to unsub from people who keep captions off, upload auto captions months after posting, etc... I need them
@watsonwrote
@watsonwrote Жыл бұрын
My phone language is in French which uses the comma as a decimal instead of period, and I have ran into some weird issues on apps and websites that expect a period but the phone forces a comma. Makes me wonder how many other systems only function within the culture they were designed in
@ambozz3726
@ambozz3726 Жыл бұрын
French Canadian would not have these issues, I presume.
@Nuvcore
@Nuvcore Жыл бұрын
@@ambozz3726 French Canadian is wierd. We use commas for decimals, but it's definitely not everyone who does so. But technically, it should be commas, so we should have that issue.
@velvetbutterfly
@velvetbutterfly Жыл бұрын
English in Canada use periods or full stops as decimal points. And unlike Americans we don't use commas to denote new scales of numbers. Like, "1 000 000" is written without commas or any marks
@goldenhate6649
@goldenhate6649 Жыл бұрын
@@velvetbutterfly Though that does depend on whos doing the writing. Officially, we use commas. Unofficially, we are way to lazy to actual write them unless numbers get huge.
@prowhiskey2678
@prowhiskey2678 Жыл бұрын
As a programmer I am pretty confident 95+% of ict systems only work in their designed locale. So many things can go wrong, but mainly: - wrong translation. translation whose text does not fit in the designed space - number formatting - currency conversion - imperial/metric units - and most importantly timezones
@DarthAnimal
@DarthAnimal Жыл бұрын
This is why I feel so stupid as a programmer sometimes. Not because my code doesnt work, its never a big bug that destroys it, its always something dumb like miss parsing a decimal symbol
@neoqwerty
@neoqwerty Жыл бұрын
I'm just a minecraft datapack maker and I SWEAR commas are 94% of the reason why my stuff fails (with 3% being "it's not supported on your version, goober, you were using the latest release's docs and asked the game about a non-existent function") At this point I've gone past feeling stupid and I swear the commas are my archnemesis.
@fatsu
@fatsu Жыл бұрын
@@neoqwerty what about the other 3%?
@lord_khufu
@lord_khufu Жыл бұрын
@@neoqwerty yeah those damn json and their stupid commas lol
@jek__
@jek__ Жыл бұрын
@@fatsu Thats the space for problems we know must be there but we havent encountered yet
@kyucumbear
@kyucumbear Жыл бұрын
@@jek__ Or the problems we have encountered and can pinpoint to a specific location but don't know why they happen. I hate those.
@KrakatonMain
@KrakatonMain Жыл бұрын
Meanwhile, I have finally learned of the term "nerd sniping" and my god if this is not dangerous af for someone like me. I'm gonna have to be careful from now on
@wackyanimations3326
@wackyanimations3326 Жыл бұрын
wtf is nerd sniping
@masonbarber871
@masonbarber871 Жыл бұрын
@@wackyanimations3326 look up XKCD comic 356
@jek__
@jek__ Жыл бұрын
Isnt "nerd sniping" the same as "starting an interesting conversation"? Like whats the issue here, that if you start an interesting conversation with someone unaware while theyre standing in the middle of a road they might get hit by a car? lol
@incognitoburrito6020
@incognitoburrito6020 Жыл бұрын
@@jek__ No, nerd sniping is coming across a problem or question so interesting that you're compelled to suddenly stop what you're doing and drop everything to work on it--potentially to your detriment. I guess a conversation could nerd snipe you, but that hook could come from anywhere really. In the xkcd comic it comes from (you can pause when he brings up nerd sniping), the guy in the hat is holding up a sign that has a simple-looking (but actually very complicated) electrical problem on it, and the physicist crossing the road gets so distracted trying to solve it that they stop and get hit by a truck.
@AGoodWobble
@AGoodWobble Жыл бұрын
This reminds me of a really unfortunate week at my previous job as live-ops programmer at an indie game company. I needed to update our Unity version to function with several new plugins we planned to use for a game that I was supporting (side note: the game was made a couple years before I joined, and the developer went on temporary leave but then just never returned, so I was just solo supporting the project with no guidance from any devs who actually worked on the game). We QA'd without issue, but after the update the game started to crash for a small number of users, and we started to receive negative reviews almost daily. I spent nearly a week testing, reading error logs, adding and removing plugins, and could not for the life of me find the issue. Then, as the reviews rolled in, I was going over them and I realized that the negative reviews were written almost entirely in russian, french, spanish, and other such languages. I switched my device language, but the bug still didn't occur. Samsung has this amazing thing called "remote test lab" where you can test physical phones in different regions, and I used that to test our game on some Russian phones--lo and behold, a reproduction of the dreaded bug! Best feeling as a dev is finally getting a reproduction on a bug. As it turned out, updating Unity updated the version of C# .Net that Unity ran on, and .Net updated their spec for their `Single.Parse` function, which reads reads text into a number. Instead of using the build locale for `Single.Parse` by default, it would now use the device locale. So, when parsing some level data at runtime, it was throwing an error when parsing data formatted like "123,456.78" but only for people whose device locale was in certain regions (i.e. people who were in Canada but wrote French reviews weren't getting the error!). All I had to do was add a single `CultureInfo.InvariantCulture` to the `String.Parse` line of code, and everything was fixed.
@AGoodWobble
@AGoodWobble Жыл бұрын
Just watched the video-quelle suprise-it's the dot Net parser that caused the issue haha
@HappyBeezerStudios
@HappyBeezerStudios Жыл бұрын
I assume it was indeed set by device locale and not device language, because those can differ. I'm in Germany, and my phone is set to "English (Germany)" (for the simple reason that app translations often don't work right and it is easier to find documentation and support) So all the text is in English, the number and date formats are as in German, and the locale is set to Germany. In a similar way I use youtube with language set to English, but region to Germany.
@AGoodWobble
@AGoodWobble Жыл бұрын
@@HappyBeezerStudios Yep, we added testing several device locales to our full QA process afterwards!
@endlesswanderer1753
@endlesswanderer1753 Жыл бұрын
Back when I worked in QA, we would be given a stack of different region carts/a spindle of different region discs. These days, I figure you just flip back and forth through the regions on the Switch itself. Now, most people who QA aren't as anal as I or some of the others who worked with me were. We would sit there and prod something for hours trying to see if it could bend or crack. A tiny little calculator app that doesn't really matter? You'd think even the most dedicated QA tester wouldn't mess with it. ...but if you were in the game long enough, you'd know this was a common issue between regions due to the decimal point difference. The first thing you'd check wouldn't be '2+2? 4? Alright, it works.' No, it would be popping in that EU-GER cart then dividing something. Now, one thing I keep seeing people repeating is 'how didn't anyone at ILCA catch this?' The truth is, they probably did. Then the dev team labeled that shit as having least priority and never fixed it before shipping. Every game I worked on had major problems labeled as none issues and ignored until it bit them in the ass. The dev management treated us QA as the enemy almost. I straight up got told to my face 'Stop trying to ruin MY game!" by multiple dipshit managers over the years. And when you look through the comments here, it's no wonder QA testers don't last long. Dudes like me who worked QA over a decade were mostly psychos who hated ourselves enough to sit through getting shit on by the dev team, getting shit on by fans, getting shit on by reviewers, and not even being paid or credited like we worked on the game. Oh, and guess what? When layoffs came by, it was QA that was first to go a lot of the time. If you managed to survive your first game launch, you were likely to be let go at the end of it anyway cause you're disposable and some bright-eyed kid will gladly get paid worse than you to do your job and two other people's. Cause working in games is your dream, isn't it? You should feel lucky to do it.
@klobiforpresident2254
@klobiforpresident2254 Жыл бұрын
At my company we've recently slipped into an odd situation involving QA. The devs and QA/QC work together just fine (oddly enough). This time it's release management saying that if we schedule a hotfix window after a new update (for any one of our twenty to thirty big software packages) that's a defeatist attitude. In truth QA isn't magic and our software vendors simply don't have the manpower to work out all the bugs the testers and users will find before a release. Sometimes the issues are minor - "if we do things from this menu the application freezes for a minute but we can do it from the other menu and it goes just fine" - other times they're mayor - "whenever we process a customer onboarding form database errors happen". To see devs, operations, and QA/QC team up against release management is a sight to behold.
@chainswordcs
@chainswordcs Жыл бұрын
well said
@sharpieman2035
@sharpieman2035 Жыл бұрын
I don’t even work in game dev but I work on an understaffed team with many high priority bugs, and I can confirm that if we have a user report a bug like this we would mark it as low priority and probably never get around to fixing it.
@baddragonite
@baddragonite Жыл бұрын
Sorry it sounds like you had such a rough experience
@PointsofData
@PointsofData Жыл бұрын
When I first heard of the comma vs period issue with the calculator I was hoping someone would be enough of a nerd to dig through the files and figure out what was going on. Thanks!
@HappyBeezerStudios
@HappyBeezerStudios Жыл бұрын
The issue is even better when we look at how Excel parses numbers. In my locale commas are used as decimal separators and full stops are treated as seperators for dates. So if I copypaste a value like 23.07 it automatically assumes I mean 23rd of July in the current year and writes a value of 44765 into the cell (but displayed as 23.07. 2022). Because Excel does dates in days since the 0th Jan. 1900 and 23.07.2022 is 44765 days after then. And there is no way to disable this "feature", it always does it. So the only way to properly input 23.07 as number with decimal separator would be by manually typing in each digit or by formatting the cell as text (which turns it into a text string instead of a numeric vaule and causes the issue of not being able to do calculations with it). You can guess how troublesome it is to transfer large arrays of data between values with decimal points and decimal commas.
@1014p
@1014p Жыл бұрын
@@HappyBeezerStudiosEasy solution, stop using the period and comma incorrectly. There is zero good reasons to not make the change. Easy way to break a machine over there seems to be passing commonly formatted numbers.
@dameatofdavoid32
@dameatofdavoid32 Жыл бұрын
Honestly didn’t even know that the calculator was broken outside of the US and Japan but it makes a lot of sense why it was broken
@snintendog
@snintendog Жыл бұрын
Europe Ruins Everything by not following basic standards part 761
@AliceErishech
@AliceErishech Жыл бұрын
@@snintendog How did they even end up using a comma as a decimal point anyways? I mean it's literally called a decimal POINT. Commas are blatantly not points. That's just as stupid as us Americans sticking adamantly to our imperial measurements.
@chlorobyte_projects
@chlorobyte_projects Жыл бұрын
@@AliceErishech As a fellow programmer in Europe, I personally see the , as cursed and use . as much as I can.
@anda3487
@anda3487 Жыл бұрын
@@AliceErishech Surprise: its not called decimal point in german, but literally just comma. Its annoying that we dont have a unified system - But your reasoning isnt good lmao
@snintendog
@snintendog Жыл бұрын
@@AliceErishech Imperial Measurements are slowly falling away in the US in a lot of engineering and architecture so it's not as stubborn as you think. But as for the comma crap all I can see is the Need to be different all programing follow the UK Us Asian math system and it's literally 4th world countries that are doing this so why are we capitulating to them? (4th world country a country that Willingly gimps itself.)
@Zakar0
@Zakar0 Жыл бұрын
I'm not sure whether to be impressed or disgusted that a coding program sold for less than 20 dollars can automatically detect and warn about an issue that evaded the coder, UI dev, and beta tester(s) (though those were probably 0, or 1 for JP and 1 for EN only). Like, that borders on impressive just how overlooked it was.
@Gold_Yoshi
@Gold_Yoshi Жыл бұрын
Maybe only the EN and JP testers were the only one who tested the calculators, the rest may have decided "Oh! A calculator *1+1*. Well, it works! Time to never use this again, not that it matters! I trust that GameFreak (Edit: ILCA developed this rather than GameFreak, my bad) can build a basic calculator."
@KojoGotMojo
@KojoGotMojo Жыл бұрын
The biggest ever franchise in the world missed all of this and its only getting worse
@shinydragon69
@shinydragon69 Жыл бұрын
@@Gold_Yoshi Game Freak deserves all the hate, but BDSP was developed by ILCA, not Game Freak.
@Epsilonsama
@Epsilonsama Жыл бұрын
@@Gold_Yoshi The plugin is usually used by professionals developing stuff in Unity but ILCA were new as hell to coding and probably did not get that.
@KojoGotMojo
@KojoGotMojo Жыл бұрын
@shinydragon69 but game freak hired them to do their job, I blame gamefreak for giving them a task that couldn't be handle
@hershmysson
@hershmysson 11 ай бұрын
omg I always say that BDSP always looks like it is "baby's first unity project" but holy moly it's actually true, it baffles me how they couldn't go for the Let's go engine, if that game was made to the same level of care as the lets go games it would be so incredibly memorable.
@nadiaholmquist
@nadiaholmquist Жыл бұрын
Ah yes, locale dependent number parsing issues strike again. You'd be surprised how common this is. A year or so ago I reported a bug to Apple causing some UI elements to go missing on macOS with the framework we were using - the culprit was that any SVG image containing a decimal point would fail to parse in locales that use commas, because whoever wrote the parser for those in the OS forgot to specify the locale when parsing the numbers in the file.
@Winasaurus
@Winasaurus Жыл бұрын
I practice nerd sniping in work. It's the easiest way to get the more senior members of the team busy for a couple hours. "Hmm, it's weird that we have to do this manually, surely it wouldn't be too hard to at least automate ______, right?", then I can just do my work at my pace while he spends the next 5 hours in python debugging loops to automate a process that takes maybe 12 seconds.
@ThatGuyBobby
@ThatGuyBobby Жыл бұрын
"They don't actually know what language this game was written in" I thought it was obvious they wrote it in japanese
@manuelsputnik
@manuelsputnik Жыл бұрын
@@gregoryford2532 It would be kind of insane if they tried to use Japanese characters in source code? Could you imagine?
@ebbandfloatzel
@ebbandfloatzel Жыл бұрын
@@gregoryford2532 not normally one to point it out, but you missed the joke REALLY hard, lol.
@klobiforpresident2254
@klobiforpresident2254 Жыл бұрын
@@manuelsputnik A colleague of mine from Wuhan (who moved here for university and stayed ever since) privately learnt programming in BASIC. That must have been in the late eighties or early nineties. His school did offer some sort of programme to learn writing programmes. Their machines used a Z-80 and the BASIC they shipped with did indeed use Chinese characters. My colleague described it as "horrible". I'm confident a Japanese equivalent of such a thing exists.
@renakunisaki
@renakunisaki Жыл бұрын
Literally a CS101 project and they managed to do it this badly in a game from the highest grossing franchise ever.
@leohuangchunwang
@leohuangchunwang Жыл бұрын
@Lind Morn Gamefreak didn't even make this game, it was outsourced to a different company... Though honestly I wouldn't blame the devs for failing to catch the bug - the fact that the decimal point can be something other than a dot is not exactly a well-known fact outside of the countries that do use a comma, and I'm pretty sure any CS101 version of such a program would have far worse bugs (especially around floats) than this
@maverillion4610
@maverillion4610 Жыл бұрын
Look, no, this is the easiest project possible stop defending it. If there were bugs or would’ve been in implementing it into the poketech or the actual UI not it’s functionality. If someone cannot code a calculator’s functionality then go back to school cause you learn that in coding camp from middle school, this is just much more variable management, it’s also in C# one of the easier languages to use. I’ll nerd out a little as a cs grad. So for something like this program you don’t even need to pay $20 for a program, there are many packages and apis that will do it for you for free. Even if you don’t want to use those, since there are only 2 different types of numbering systems , and . You can write 2 methods let’s call printdot and printcomma, do all the original math normally, pass the answer into those methods depending on your region selected, and reconfigure the , into .. Now a issue that people might say is oh what if put the number in using . easy, write a third method called readdot and send it into the normal calc. The bigger thing people will bring up is, “they don’t have the time” no, they do, writing these 3, no 2 methods will take maybe 30 minutes at most, basically if they hired an extra highschool intern. So yeah, no excuses
@liam4736
@liam4736 Жыл бұрын
The code is fine except for a single fuckup that they missed. This is more of a QA issue than a coding one.
@alarii2582
@alarii2582 Жыл бұрын
@Lind Morn The Pokemon Company (The company that actually owns the rights to Pokemon) is owned 50% by Nintendo and 50% by GameFreak. They have access to more then enough money to actually make a good game if they wanted to.
@TempoKong
@TempoKong Жыл бұрын
@@maverillion4610 my brother in christ, this bug could be easily resolved if they actually had time to test the game and every single thing in it, which take more than 30 minutes
@someone.8878
@someone.8878 Жыл бұрын
imagine the broken calculator becoming an all-new arbitary code execution glitch
@Brahvim
@Brahvim Жыл бұрын
Yeah! And it'd never happen because modern technology is strong!
@mariocamspam72
@mariocamspam72 Жыл бұрын
Sadly the Switch has memory guards and rw protection and all, so no SNES-esque consequenceless access violations :(
@klobiforpresident2254
@klobiforpresident2254 Жыл бұрын
@@mariocamspam72 Speaking of access violations, didn't the original Crash Bandicoot override system memory? The past was, as the kids say, a whack place.
@null418
@null418 Жыл бұрын
@@klobiforpresident2254 how
@cd7677
@cd7677 Жыл бұрын
Man i love how casually programmer guys talk about using like 12 programs consecutively to see raw text and read it
@Cerberus1746
@Cerberus1746 Жыл бұрын
It's even better when they use a single one, one that they made. Or trying to understand how things work by just the raw binary memory dump. I did that once or twice and it's almost a couple hours to just figure out a single variable and make sure it's not a lie
@CrimsonAkato
@CrimsonAkato Жыл бұрын
not a programmer but this can be said about anything, for me it's with modding games and extracting 3D assets just casually using like 10 different programs to convert from 1 file apply fixes convert again transfer it's information convert to another then get a 2nd model from the fane I wanna mods copy that information place on the previous model do sone more jumping around between multiple programs and shove it into the game only for it to look horrible cuz u forget to add the diffusion materials shading and normal mappings xD . the amount of stuff I had to study and learn from mostly tutorials and reading years worth of forum pages xD . oh boi
@ninaadadhvaryu1603
@ninaadadhvaryu1603 6 ай бұрын
When he said "developed by NSA" I paused and said what the actual fuck
@MrCheeze
@MrCheeze Жыл бұрын
Not a crossover I expected, but one I'm very glad to see. It makes a lot of sense that the extra zeroes are caused by repeatedly divided by 10 and taking the lowest digit.
@evanbelcher
@evanbelcher Жыл бұрын
I'm mostly just surprised that they wrote this code by hand. I'm sure there's some open source code that handles all of this perfectly.
@Primu
@Primu Жыл бұрын
Knew as soon as you mentioned "region" that it'd be a locale issue with period/comma. Every newbie programmer's nightmare, surprised to see such an issue in such a highly regarded franchise though, I guess an extremely small portion of their budget is going to developers lol
@competitively3315
@competitively3315 Жыл бұрын
I didn’t know the calculator wasn’t correct. That’s absolutely hilarious lmao
@jmv333
@jmv333 Жыл бұрын
Cannot believe how fast your turnaround on a video like this! Overjoyed to get to watch a new video of yours like always :)
@pfqniet
@pfqniet Жыл бұрын
Thank you for indulging the nerd snipe and sharing your results, you've saved me from diving into this myself! Funny how something we consider so simple as a calculator is actually far more complicated than expected!
@Stingpie
@Stingpie Жыл бұрын
I cannot imagine the thought process behind this code. Why didn't they just turn the number into a string to send to sendnumimage? It would've been simpler, faster, and less buggy. This was either programmed by somebody who didn't know how to iterate over a string, or is some weird hold over from the GBA.
@HenryLoenwind
@HenryLoenwind Жыл бұрын
I guess they ran into some edge cases (e.g. integer part longer than 10 digits) and couldn't come up with a way to handle those in a sensible way.
@mariotheundying
@mariotheundying Жыл бұрын
DS*
@samuelthecamel
@samuelthecamel Жыл бұрын
@@HenryLoenwind then just render 10 digits starting from the left side if the string is longer than 10 digits, and check if the number's value is too high to display. Then write some code to remove the 0s at the end if there's a decimal point. Problem solved
@X-3K
@X-3K Жыл бұрын
he got paid per line
@urkerab
@urkerab Жыл бұрын
I imagine that there was no thought process behind this code; not only should the developer not have used the default culture, they should not have used the default format either, since they already knew how many digits they wanted. And they definitely should not have required so many conversions just for one number display routine.
@syntheticsaturn
@syntheticsaturn Жыл бұрын
from bulbapedia: "In Pokémon Brilliant Diamond and Shining Pearl, [the calculator] has been reported to exhibit wonky behavior."
@christophsiebert1213
@christophsiebert1213 Жыл бұрын
I thank you for this video. I use the exact same approach since february to do various unity reverse engineering projects and data mining. And I didn't know that I could also parse and use the header file in ghidra. This would have made so many things so much easier. Until now, I had to manually rename function parameters and figure out when a field of the current class instance was referenced. Great content, keep it up, and leave some of those information in the videos to maybe help others that stumble over your content. Have a great day :)
@97MiloProductions
@97MiloProductions Жыл бұрын
damn, i guess that was an oversight for different regions, still within the realm of buggy pokemon features, if im not mistaken both sword and shield and BDSP had their intended shiny increasing odd methods completely broken or coded in but not called, i sort of rememer reading that when they released
@TheRedSmarty
@TheRedSmarty Жыл бұрын
Sword and Shield's worked properly. It was just that no one understood how it was supposed to work. Increased Shiny odds for battling a certain number of that species were only applied to a small amount of that species rather than all, so everyone thought it was bugged and basically worthless but no: it was applied specifically to Pokémon with a brilliant aura, which also became more common in the same way, which was intended.
@MyGawd-
@MyGawd- Жыл бұрын
Sword and Shield worked properly, people assumed incorrectly when the game dropped
@chainswordcs
@chainswordcs Жыл бұрын
the shiny chance increase mechanics were bugged (seemingly not functioning fully as intended) in Let's Go Pikachu and Eevee. I can't do a deep dive, but a youtuber named jrose (iirc) covered the topic in a Shiny Living-Dex Challenge video. (Edit 1: it was actually Johnstone who made that video) And with Sword / Shield. Via datamining, I think it was concluded that the shiny pokemon with square-like shiny particles (a new variant) were intended to be rarer. But due to oversights, they were by far more common than the other type of particles. Don't quote me on that too hard, I forget the exact details, plus it was a while ago so that game received numerous updates. That info would've been datamined probably by someone like SciresM (Michael), Kaphotics, OatmealDome, or ShinyQuagsire. But I'm not certain who it was to discover that. Edit 2: Also, that would've been tweeted by one of them on Twitter. Not a formal blog post or something. I'm pretty sure it was discovered around launch, before the first DLC released (or was announced)
@mbcodes18
@mbcodes18 11 ай бұрын
​@@chainswordcsThe chances for the sparkles are (by intention) different depending on how you get the shiny. Sword's shinies are completely functional as intended.
@duck_corp
@duck_corp Жыл бұрын
Excellent video! You did a great job explaining everything to be understandable without overly bloating the details.
@whynotanyting
@whynotanyting Жыл бұрын
I want more videos like this, explaining exactly step-by-step what went wrong in the logic of the code
@Meta_data
@Meta_data Жыл бұрын
Seriously, well done on this video! Greatly informative and entertaining.
@RJP0409
@RJP0409 Жыл бұрын
A new piman video is always sure to be quality content
@anselmschueler
@anselmschueler Жыл бұрын
OK, I’m at 9:17 currently and I’m *betting* this has something to do with the fact that German uses the comma (,) as the decimal separator. Some locale-dependent parsing or formatting function is getting called and it’s not outputting what the rest of the code expects. EDIT: I was right, but wow, I’m surprised this code doesn’t crash
@xyannail4678
@xyannail4678 Жыл бұрын
German, more like Europe
@Swagpion
@Swagpion 11 ай бұрын
I find commans being used for thousands and periods for deciamals to be more consistent with language. Commas are used for short stops, while periods are used for long ones.
@scraps7624
@scraps7624 Жыл бұрын
Your work is just incredible, just mind blowing stuff
@RETIREglitch
@RETIREglitch Жыл бұрын
Great work! You probably already figured it out but... The repeated question marks occur when the displayed string is longer than the max displayable characters. Trying to perform maths on a value already above the 10 digit limit sets it to 0, hence some extra weirdness that was noted in the original video. This is all based on NDS research but I would assume it carries over to the unity remake, as it looks like identical behaviour and the devs reused a lot of the logic present in the NDS games.
@RETIREglitch
@RETIREglitch Жыл бұрын
One thing that did spark my interest in the original video was that for some people instead of repeated question marks it made the calculator disfunctional. In the original game, while not possible, if you could parse a very large integer into the calculator field you could overflow into the max_display and when that occurs it wouldn't update the calculator anymore due to some checks failing. I seriously doubt that would be possible as this is ofc C#... But interesting that it looks like the same behaviour.
@krumplin8992
@krumplin8992 Жыл бұрын
Something a modder said was that the entire backend code of BDSP was simply copy pasted from the DS games. This means that some things broke like the calculator because of the new regional functionality of C# but also that glitches from the DS games (suction cups fishing for instance) are still there. The lack of care is pretty disappointing
@julius4858
@julius4858 Жыл бұрын
Amazing, would love to see more of this stuff
@lukehaws4423
@lukehaws4423 Жыл бұрын
Truly impressed with this video, great content and you deserve more subscribers and likes. Commenting for the algorithm, good luck with your channel
@Sukadia
@Sukadia Жыл бұрын
the recommendation algorithm was good today. very satisfying being able to see this video just a day or two after matt's!
@chanm01
@chanm01 Жыл бұрын
Oh dude, you're the ranking the trainers guy? I'm glad you're still doing well. Hope I come across another one of your videos some day!
@peardude8979
@peardude8979 Жыл бұрын
I am very happy KZfaq recommended this to me, this is a great video! Learning about how games can be reversed engineered almost makes me want to try it, but I'm terrible at reading code so I'll stick to dumping games and getting their music files instead.
@TheOfficalAndI
@TheOfficalAndI Жыл бұрын
That's the quality I expect from 'modern' pokemon releases. What I am way more surprised about is how relatively easily you were able to actually get a chunk of extracted Code out of the game, in readable format :O
@velvetbutterfly
@velvetbutterfly Жыл бұрын
But it wasn't made by gamefreak, it was made by an outside party with a better track record
@KStarPR
@KStarPR Жыл бұрын
@@velvetbutterfly Ironically though that outside company with a better track record absolutely mangled the code & logic of GameFreak. BDSP and HOME have so many problems due to ILCA screwing up how Pokémon data is written and stored. You'd think they'd get help from GameFreak or at least study stuff from fans given that we can generate entire Pokémon from scratch in 3rd party programs.
@chrismanuel9768
@chrismanuel9768 Жыл бұрын
Company they outsourced to sucks.
@BenightedAlizar
@BenightedAlizar Жыл бұрын
Funny to see pros making a similar mistake to what I did before! I had to replace "ToString();" with "ToString(System.Globalization.CultureInfo.InvariantCulture);" in some of my code to make the commas/dots not change. Lucky that I was using two computers with different locales, otherwise I would have missed the bug.
@MrSpontanicus
@MrSpontanicus Жыл бұрын
Wow, great video. When I watched Matt's original video, I thought the problem is probably somehow related to the calculator parsing the locale dependent string representation of the number and then searching for a "." character specifically to split the number into an integer and decimal part. But I had no idea why it would do that instead of just displaying the string directly and after watching your video I still have no idea :D
@ProfessorRex
@ProfessorRex Жыл бұрын
I really enjoyed this video and dive into some of the broken code in the Pokémon games! There’s plenty of it & I’d love to see more some day! Thank you for making this video :D Keep up the astounding work!
@spirttomb
@spirttomb Жыл бұрын
I highly appreciate you not treating me like I'm stupid! This topic is so interesting. Great video!
@sagacious03
@sagacious03 Жыл бұрын
Okay analysis video! Thanks for uploading! Looking forward to the Crystal-based video! Thanks for uploading!
@muesli2kanal585
@muesli2kanal585 Жыл бұрын
i thought i get bored as hell, but even me as a programmer must say you made a intressting vid, nice work!
@alexanderdejesus4986
@alexanderdejesus4986 Жыл бұрын
Excited for the pokemon crystal ranking coming out
@TheManOfPeace999
@TheManOfPeace999 Жыл бұрын
Didn't even realize you were they guy that did the SMO videos. Fantastic content
@MishaKochubey
@MishaKochubey Жыл бұрын
Great video, great channel. Subscribed!
@normalichu
@normalichu Жыл бұрын
This reminds me that a game dev youtuber I follow had a similar problem. On one cutscene, the characters would teleport to coordinate "1.000", which worked well on some PC's, but caused the player to end out of bounds on other cases. It was due to the country you had your PC set on. Very interesting, honestly. This video goes more in depth, which is something I, as a junior programmer, find very nice.
@Brettlaken
@Brettlaken Жыл бұрын
I'm more impressed that this thing still gives the right answer sometimes. Aside from the locale thing it looks like they treated C# like assembly. Impressive how much you can overcomplicate a calculator.
@floramew
@floramew Жыл бұрын
Hah, saw that prior video too. I barely understand either the math or the coding, but it's fun to watch these kinds of videos regardless.
@xDakem
@xDakem Жыл бұрын
That's why I'm subbed to this channel.
@seeibe
@seeibe 6 ай бұрын
After seeing some content mills recycle your ideas into trash, I'm really reminded how outstanding your content is. Not only is there real substance, but the presentation and editing is top notch.
@apdj94
@apdj94 Жыл бұрын
Changing the operator mid calculation is the same way a lot of built in calculator apps work. You could reasonably call that a feature rather than a bug.
@tanglelover
@tanglelover Жыл бұрын
We have multiple shared recommended videos. Nice. Anyways, excellent video!
@HHHjb_
@HHHjb_ Жыл бұрын
Nice upload schedule
@ThatOneGuy8305
@ThatOneGuy8305 Жыл бұрын
It's incredible that I know nothing about game dev, have never used unity, and haven't looked at C++ code in five years and I knew the second you mentioned the problem was with certain regions that it was comma-related. Such a remarkably obvious oversight and the fact that nobody ever thought about it prior to release is jarring.
@crides0
@crides0 Жыл бұрын
So in order to display a number as images they formatted it, parsed it, and then custom formatted it.. Why???
@knownas2017
@knownas2017 Жыл бұрын
Maybe the guy who was working on it was like, "I get paid by the hour." lol
@HenryLoenwind
@HenryLoenwind Жыл бұрын
It's called "Lego Programming". People, who don't have experience in programming as a hobby, get trained at some college/university/etc. They learn to combine a number of building blocks in a way that satisfies the requirements of their courses, but gain no deeper insight. When confronted with real-life problems that have not been constructed by a teacher to be solvable with the blocks that got taught earlier, they have no idea how to handle that. So they add those building blocks together until the code works in the limited number of test cases they can think of.
@RonGrethel
@RonGrethel 10 ай бұрын
I went to a coding boot camp and got a job as a programmer about a year and a half ago. Your videos are making me better at my job😅
@IAmNotASandwich453
@IAmNotASandwich453 Жыл бұрын
Dang, havent even really started the Video yet but that infinite resistor grid nerd sniped me. 😂
@blikthepro972
@blikthepro972 Жыл бұрын
this is an example of why overcomplicating something can result to chaos
@PunishedFelix
@PunishedFelix Жыл бұрын
Man I love bugs like these they're so annoying but funny when you find them!
@garnet1918
@garnet1918 Жыл бұрын
Nice video!
@togden88
@togden88 Жыл бұрын
That suppressed laugh at 3:40 haha
@562.anthony2
@562.anthony2 Жыл бұрын
Lmao that intro, if you have your camera towards your dude like that while climbing a ladder it gets creepy like that too 😂
@xxim_just_jamxx
@xxim_just_jamxx Жыл бұрын
o shit he's back
@fuuryuuSKK
@fuuryuuSKK Жыл бұрын
Reminds me of a bugreport I saw a couple years back, where in the minecraft mod Astral Sorcery, a turkish player either got a crash or was missing an item. The culprit was that the upper/lowercase conversion functions in java are, again, locale specific with most regions having I/i paired, but turkish has I/ı and İ/i, which caused the failure.
@squelchedotter
@squelchedotter Жыл бұрын
I was hoping someone would do this!!!
@Jurarigo
@Jurarigo Жыл бұрын
Within the first minute, I knew exactly what happened. It actually happened to me in a mod from Vampire The Masquerade Redemption. The mod included a launcher that let you set some percentages of gameplay elements and they completely broke in my spanish PC. So the aesop is: pay attention to the goddamn locale when you're coding an app that is meant to be globally distributed.
@MaxOakland
@MaxOakland Жыл бұрын
This is crazy. I didn’t know any of this was possible
@Patashu
@Patashu Жыл бұрын
You could make a whole series out of decompiling Pokémon bugs
@jmtradacc
@jmtradacc Жыл бұрын
Babe, wake up. A new vídeo released
@bigtitgothgf
@bigtitgothgf Жыл бұрын
Fantastic
@depotheose7890
@depotheose7890 Жыл бұрын
as a german i see nothing wrong with that calculator. that's just how math works over here
@hiperion_1416
@hiperion_1416 Жыл бұрын
Going to save this, a little ago I gave up on a RE project because I couldn't use the header on ghidra
@Bobbias
@Bobbias Жыл бұрын
This could have been avoided several different ways. There should be no reason to convert it to a string at all, but if they're going to do it, they should at least search for the localized decimal separator (you can query your locale to find out which separator is valid) rather than hardcode a specific character :/
@invertedmind8937
@invertedmind8937 Жыл бұрын
it’s wild to me that you can just… do this. the tools are out there
@thetruemystic_
@thetruemystic_ Жыл бұрын
Genuinely had no idea pokemon was made in unity Can't believe errors like this slipped through
@HECKATE
@HECKATE Жыл бұрын
wasn't expecting Neon White to pop up as the example of a C# game to reverse engineer, but I'm glad to see it get mentioned since I spent a good load of time poking through it in dnSpyEx :)
@JayFolipurba
@JayFolipurba Жыл бұрын
The fact that the new pkmn games are made in unity means that thousands of people could do (and maybe even have done) a much better job with way fewer issues
@Trackjacket69
@Trackjacket69 Жыл бұрын
This was really rad even though I understand about half of everything being said
@cleverman383
@cleverman383 Жыл бұрын
As soon as you typed 1.2.3 * 2 and got 2 4 6, I realized the issue immediately
@TheHuesSciTech
@TheHuesSciTech Жыл бұрын
The funny thing is that the way SetNumImage is coded is an amazing portrait of a confused dev who is sort of reimplementing the modulo operator from scratch, rather just using the modulo operator. So even though that function is "correct" as far as I can tell, it could have been so much shorter and simpler: private void SetNumImage(UInt64 num, int digit, int dispIndex) { for (int place = 0; place < digit; place++) { var placeIndex = dispIndex + place; numImage[placeIndex].enabled = true; numImage[placeIndex].sprite = (CalcCode)(num % 10); num /= 10; } }
@pauljones9150
@pauljones9150 Жыл бұрын
Omg Pokemon crystal trainer matches is coming out!!!
@yoshyfoods
@yoshyfoods Жыл бұрын
I just now learned of this game being a unity engine based game. Honestly I cannot say I expected it to be one, but honestly I’m not suprised
@bulbyvr
@bulbyvr Жыл бұрын
I said under matts video that C# had a StringFormat thing that had region versions. I said that it could be that; had no idea it was written in unity
@evanhorn1909
@evanhorn1909 Жыл бұрын
the song in the second half is called Dragon's Den (From "Pokémon Gold & Silver") by DJMykah
@HappyBeezerStudios
@HappyBeezerStudios Жыл бұрын
My wild guess is decimal points and commas. Oh, and the International Bureau of Weights and Measures officially recommends using spaces for digit grouping (like with thousands). Same with the International Union of Pure and Applied Chemistry and the American Medical Association.
@aurastrike
@aurastrike Жыл бұрын
Man he confirmed he's doing Crystal for the ranking series! I hope you eventually earn enough from KZfaq that you can purchase a good computer specifically to run the simulations. That would be awesome for speeding things up!
@Brahvim
@Brahvim Жыл бұрын
KZfaq fetched me the perfect video today, I assume!
@ArcaneEther
@ArcaneEther Жыл бұрын
By extension, this explains the ScarVi bugs a bit. The games are just pumped out too quickly without sufficient bug checking.
@eideticex
@eideticex Жыл бұрын
On one hand, I really don't blame them too much for failing to grasp localization as that is a genuinely hard thing to wrap your head around. On the other hand I am dumbfounded by the fact they used strings to store numeric values.
@asiermaster
@asiermaster Жыл бұрын
Classics never die
@imablisy
@imablisy Жыл бұрын
I did have fun and did learn something
@GarbageAtSB
@GarbageAtSB Жыл бұрын
1:49 YOOOO ACE ATTORNEY IN YOUR LIBRARY
How commas broke the Pokémon calculator but fixed an exchange rate.
22:29
Are Brilliant Diamond and Shining Pearl THAT BAD?
18:30
PaPaSea
Рет қаралды 223 М.
Tom & Jerry !! 😂😂
00:59
Tibo InShape
Рет қаралды 57 МЛН
Sigma Girl Past #funny #sigma #viral
00:20
CRAZY GREAPA
Рет қаралды 25 МЛН
Please be kind🙏
00:34
ISSEI / いっせい
Рет қаралды 181 МЛН
Luck Decides My Future Again 🍀🍀🍀 #katebrush #shorts
00:19
Kate Brush
Рет қаралды 8 МЛН
i hacked aladdin to end the insanity.
8:10
Low Level Learning
Рет қаралды 174 М.
So I started decompiling LEGO Island...
21:19
MattKC
Рет қаралды 886 М.
What’s content creation in Resonite look like?
14:59
a bird named Decoy on the internet
Рет қаралды 9 М.
I made an entire OS that only runs Tetris
22:37
jdh
Рет қаралды 1,6 МЛН
computers suck at division (a painful discovery)
5:09
Low Level Learning
Рет қаралды 1,6 МЛН
Pokemon Blind and Deaf - Crystal (Johto)
29:37
Tongy Bacala
Рет қаралды 9 М.
My dumb thoughts on the Sinnoh remakes
10:37
CandyEvie
Рет қаралды 840 М.
УРОБОРОС ► Resident Evil 5 #7
1:9:11
Kuplinov ► Play
Рет қаралды 372 М.
НАСТОЯЩАЯ ЖИЗНЬ КОТА В ВР ( I Am Cat )
22:48
perpetuumworld
Рет қаралды 1,5 МЛН