FFVII's Strangest Glitch Finally Solved

  Рет қаралды 61,952

4-8Productions

4-8Productions

Күн бұрын

Пікірлер: 260
@Aldrasio
@Aldrasio Жыл бұрын
Using 4 bytes to store a number that is read into 2 bytes, as an ASCII string, in base 10, with no null terminator, is probably the most psychotic method I've ever heard for storing a number. I'm shocked it even works as well as it does.
@priwncess
@priwncess Жыл бұрын
Lmaooo this
@StarGazerTom1991
@StarGazerTom1991 9 ай бұрын
It honestly hurt my brain. I just have no idea why they'd do something like this. It doesn't make sense. It's so strange.
@inthefade
@inthefade 8 ай бұрын
It is the Rube-Goldberg machine of data storage. There is something beautiful about it.
@absoluterwahnsinn2389
@absoluterwahnsinn2389 7 ай бұрын
Pls explain in non-nerd terms
@MegaZeta
@MegaZeta 6 ай бұрын
@@absoluterwahnsinn2389 On its face, it's like if you knew how to write the number "1,000" and what it meant, but you opted to write it as one thousand separate tally marks. Now, there's a good reason why you'd use tally marks in a specific situation (tallying 1,000 objects) and maybe this happened for a good reason too, but that's one analogy.
@NikkiTaLance
@NikkiTaLance Жыл бұрын
Me before watching video: "An upside down model usually indicates a negative scale; I bet this is an overflow glitch." After watching video: "Holy crap we're lucky this game ever functioned..."
@IntegerOfDoom
@IntegerOfDoom Жыл бұрын
I thought SM64 was jank.
@madisonevans7950
@madisonevans7950 9 ай бұрын
its the same feeling I get when I play The Sims 2. That game was built on hope and payer type coding lmao
@Hyuduro
@Hyuduro 11 күн бұрын
Pokémon Red/Blue: "First time?"
@ericbowers5968
@ericbowers5968 Жыл бұрын
I've gotta say, I've missed your glitch and in depth game mechanics videos. I'd say you're in my top 5 content creators but I'm not as much into long play vids so I haven't watched as much as I used to but I so make sure to like and comment on all your vids I can. Keep up the good work man.
@4-8Productions
@4-8Productions Жыл бұрын
I'm not sure why you said you miss my in-depth and glitch videos, I just uploaded my biggest In-Depth project ever with the Cloud In-Depth only a few weeks ago, and the next In-Depth is in the works! We have been working on it daily together as a community over on the Twitch channel. At any rate, I really appreciate the love and support you've given me over the years, and it is great to have you around!
@4-8Productions
@4-8Productions Жыл бұрын
Oh you know after reading that comment again, maybe you were talking more about just in-depth mechanic videos in particular? That's really nice to hear, I would like to try to delve more into the mechanical side of games as a separate thing, but to be honest there is only so much FFVII can still give. But whenever it does give, I'll do my best to explain everything I know!
@ericbowers5968
@ericbowers5968 Жыл бұрын
@4-8Productions Awesome. I did watch the Cloud one. I'll make sure to find the rest of them. Tbh KZbin has been sabotaging my notifications, so I guess they fell through the cracks. And yes, I was talking more about game mechanics like materia interaction, Stat functions, and ways to break games. Keep up the awesome work.
@ericbowers5968
@ericbowers5968 Жыл бұрын
@4-8Productions FF7 is indeed still living and breathing. I actually just started a perfect file run because my old PS mem card got corrupted while playing FFT. So I have to replay all the ps1 FFs, lol what a drag. Take care and keep up the great work.
@sciverzero8197
@sciverzero8197 Жыл бұрын
@@4-8Productions I don't know if its of any interest to you to look into things that aren't speedrun useful, but maybe a video about how chocobo races are handled, or how chocobo breeding actually works in code... I know you're not really the code guy as much as mav and some others, but if you'd like a suggestion for mechanical videos... any of the things that have RNG and _implied_ interactions with items (chocobo breeding and nuts and greens for example) could stand to be demystified for those of us not as many years deep in the speedrun scene.
@sciverzero8197
@sciverzero8197 Жыл бұрын
I knew this game was made of chewing gum and string but I didn't realize _any_ of the code was THAT bad. It is actually difficult to find a worse way to store a number, and if you do, its something that's so ridiculous that it is clearly intended to be bad design. That said, I bet this code dates back to the PS1 version, but never happens on that version because the PS1 doesn't have dynamic memory allocation like modern PC games.
@GrantedBunion
@GrantedBunion Жыл бұрын
you know a FF game gonna be GOAT'd when it's glitchy af
@priwncess
@priwncess Жыл бұрын
@@GrantedBunion True dis
@hooah
@hooah Жыл бұрын
wait WHAT
@Stuntzii1
@Stuntzii1 Жыл бұрын
this game came out b4 u were born ugh
@SWISS-1337
@SWISS-1337 Жыл бұрын
This is exactly the reason I subscribed to you death, other than the awesome mod play throughs that is. Thanks for everything.
@4-8Productions
@4-8Productions Жыл бұрын
Thanks!
@SWISS-1337
@SWISS-1337 Жыл бұрын
@@4-8Productions the least I can do with all the amazing content you've given us.
@adriandelacroix
@adriandelacroix Жыл бұрын
It’s great to see this figured out after so long; and thanks for explaining it to those of us without backgrounds in computer science or game development in such a concise, understandable manner. All I could think was that those are the materia Scarlet was really looking for. Imagine if they launched that at meteor. Sephiroth would’ve been speechless.
@ranibro
@ranibro Жыл бұрын
Not only upside down, he's probably inside out as well, sm64 has a pretty similar glitch with the fly guy.
@inthefade
@inthefade 8 ай бұрын
He's just inverted along all three axes.
@Puremindgames
@Puremindgames Жыл бұрын
FFVII, the gift that keeps on giving, hopfuly one day I am blessed and found worthy of viewing big Cloud.
@olafthebear2327
@olafthebear2327 Жыл бұрын
There were certainly some decisions made in this game's development. It's honestly a miracle this game runs as well as it does, let alone at all, and proves this is truly the best timeline. I love this game
@TheBronf
@TheBronf Жыл бұрын
it was released by being hold together by duck tape. during development they were acutely worried they wouldn't be able to release it. its why the debug room is still in the game because they thought removing it would screw the game over.
@MMasterDE
@MMasterDE Жыл бұрын
I'm thinking, if this is only present in the PC version, that it's a porting issue, and is related to avoid issues with endianness.
@Kono_Dio-Da
@Kono_Dio-Da Жыл бұрын
​@@MMasterDEProbably because of how differently PCs store memory compared to a PS1
@jayewrite1256
@jayewrite1256 4 ай бұрын
@@TheBronfI thought I remembered someone saying the game was held together by duck tape and bubble gum. Honestly I like how old game developers managed to develop solutions to there problems when developing games, but now with modern games the glitches have not only gotten worse but now there just features not problems.
@rt1517
@rt1517 Жыл бұрын
This is not an exotic storage. They just stored the size in a null/zero terminated ascii string. The number in the images from death are actually hexadecimal. And in ascii, 5 is 0x35 (the 0x prefix means hexadecimal), 1 is 0x31 and 2 is 0x32. In C: puts("\x35\x31\x32"); is exactly like: puts("512"); The only strange thing is that they store numbers in ascii string. There are two drawbacks. The first one is that they need to convert the string back to a number to be able to use it. The second one is that it takes more memory. Here they use 4 bytes and they can only store a number from 0 to 999, while a C unsigned short int is usually 2 bytes and can contain a number from 0 to 65,535.
@MaciejTrebacz
@MaciejTrebacz Жыл бұрын
Yeah maybe the wording was not ideal here, it’s not exotic or weird, it’s just the wrong tool for the job. If you need to store a number that will later be used to do math, you should store it as a number, not as an ASCII string, that’s just dumb. And then what’s even dumber is they wrote a custom, botched string to number function that, along with the fact they forgot to add null termination resulted in this bug.
@MachFiveFalcon
@MachFiveFalcon Жыл бұрын
Thank you and m4v3k for continuing to breathe new life into this classic! So grateful to have fans like you who keep making FFVII content.
@flyannfan11
@flyannfan11 Жыл бұрын
As a software engineer, I agree with the guy who said this is the worst thing he’s ever seen 😂. Idk why they made storing and reading the size so complicated hahaha. Also great explanation, I gotta try this in my current playthrough when I get to Corel lol
@MMasterDE
@MMasterDE Жыл бұрын
This was probably due to a bad porting job, and it exists to avoid endianness issues. However, the algorithm to read the numbers is just dumb.
@NuevaBestia
@NuevaBestia Жыл бұрын
They say they left the debug room in the game because the game was so broken right before launch they were afraid that if they took it out, something would break. I think we finally know why. Why on earth did they do it this way and how in the WORLD was the PS1 able to handle such inefficiency?????
@swordofkings128
@swordofkings128 Жыл бұрын
Idk doesn't seem like reading/writing 4 bytes of memory (even doing so each cycle) would slow down a room where there's only a handful of character models max on a 2d background. As for why it was done that way, maybe it was a good fit for how they designed the rest of the code? And it was so rare it never came up and as they say, "if it ain't broke don't fix it."
@kahlzun
@kahlzun Жыл бұрын
ff7 was kinda groundbreaking in its 3d design; noone had really tried to do what they were doing. Some of the stuff they tried worked, some didnt. The whole thing is held together with stickytape and paper mache.
@lilox3690
@lilox3690 Жыл бұрын
​@@kahlzunEven with all that, it's still one of my most beloved games I've played. Remake is on that list too but it's mostly for the music instead of the gameplay, not to say there's anything necessarily *bad* about it or the direction they took the story.
@mikeshaver-miller745
@mikeshaver-miller745 Жыл бұрын
FF7 is built on top of several game engines. The field module, the battle module, the menu module, the overworld module, and the minigame module are the ones I can think of off hand. If I had to guess, they probably encoded a LOT of information as simple ascii because so much of it would need to be passed back and forth between modules. In the case of the field module, since you can go back and forth between a location and the battle module, you probably have to pass your initial location, rotation and dimensions to the battle module and back again to keep your place on the field module. The game would not be playable if you had to teleport back to the beginning of a large field area every time you battled. As for why you wouldn't just pass a scale value, that would mean that every time you went from battle to field, you'd have to do math just to determine where something was and how big it was supposed to be. Better to just store the raw numbers then.
@Ephemeral_Sins
@Ephemeral_Sins Жыл бұрын
Because this only works on the PC version, ps1 doesnt have that memory allocation. The ps1 probably only remembers the first 4 numbers because those are the only ones available to it. But of course a PC can hold much more data, also a reason why there were so many terrible PC ports back then. The games were never originally meant to be on PC and why some were buggy messes.
@strat5520
@strat5520 Жыл бұрын
As a programmer I love in depth info like this. First ran across your channel when you had just a few subs and were kind of struggling. Happy to see your near 100k now. If you keep making indepth programming vids like this youll fill a much needed niche. I can say for certain ill be watching! Also, I wonder if the algorithm isnt looking for the Null terminator as it iterates over the memory
@MaciejTrebacz
@MaciejTrebacz Жыл бұрын
Nope, it's not just looking for null terminator, it actually has a lookup table of characters to determine whether the current byte is a number, which sounds super complicated for a simple algorithm like this.
@yoshilikescandy4020
@yoshilikescandy4020 Жыл бұрын
I love how after so long, you all are still finding out stuff about this game
@PWBS-yc6xi
@PWBS-yc6xi 10 ай бұрын
Thank you so much! This happened to me once and I was so confused and I couldn’t find anyone explaining how it happened
@yumyumeatemup
@yumyumeatemup Жыл бұрын
Very cool finally seeing this showcased. I legit had this happen to me once and had NO EARTHLY clue how it happened to me LMAO! Now I know its not that big of a deal and my game file wasnt corrupted or something dire!
@letao12
@letao12 Жыл бұрын
If I may defend the algorithm a bit (I don't mind losing all credibility haha), this seems like a fairly common bug and isn't too egregiously stupid. First of all, as you mentioned, the value is stored as a string in ASCII. I don't know why they store it like that but OK, that's just the format it came in. It's inefficient but there's nothing particularly wrong with that. All ASCII strings are supposed to end with a 00 byte, and it's standard practice to keep reading strings until you hit a 00. They improved this a bit knowing it can only be a number, so they end on anything outside of 30-39 instead of only 00. This is a fairly typical implementation. The only thing that went wrong was a mismatched assumption. Probably the people who built the fields put a 4-byte limit on the model size string, but thought they had room for 4 digits and didn't have to end it with 00. Then the people who wrote the 3D model code assumed it would be a regular ASCII string which always ends with 00 and didn't bother checking the 4-byte limit. Both are reasonable (and common) ways to do it, but the two teams needed to be consistent which they weren't. Finally, this could be something that did work reliably on the PS due to how memory was managed on the console, where the assumption that the string would always end after 4 bytes did hold up. But because memory is allocated differently on PC, and nobody was aware of such an inconspicuous underlying assumption when porting the game, it introduced this new bug.
@MaciejTrebacz
@MaciejTrebacz Жыл бұрын
This video made some simplifications to make it more understandable, in reality the code to convert the string to number is really, really over engineered. It actually uses a lookup table to determine whether it’s looking at a number or not. To me it looks like it was written by a novice programmer who never did such a task and instead of doing any research they just banged together some tools they knew until they had something that kind of worked 😅
@letao12
@letao12 Жыл бұрын
@@MaciejTrebacz Ah I see. That's less justifiable lol. I wonder if that was due to the mixture of text encodings used in the game. Maybe some parts are ASCII-esque but not entirely, or it was subject to change, so they used a lookup table to ensure whatever encoding always gets converted correctly.
@Owyn_Merrilin
@Owyn_Merrilin Жыл бұрын
@@letao12 The PS1 version definitely wasn't standard ASCII, or even Shift-JIS. So that's almost definitely part of why it was programmed this way. I wonder if this is essentially part of a big number implementation? Just because the character field models never go over 1024 in size doesn't mean it's not part of some larger system that requires sizes bigger than you can fit in a uint_32.
@patrickmiller2222
@patrickmiller2222 Жыл бұрын
I had this happen to me in Corel on my first playthrough and have been curious about it ever since. Interesting stuff!
@AurumKHK
@AurumKHK Жыл бұрын
8:40 I played through the game for the first time earlier this year and encountered this glitch here. I streamed what was happening to my friends through discord and they had never seen it before so it's cool to know all this now!
@chitlitlah
@chitlitlah Жыл бұрын
FF7 is my favorite game and I love these videos. It's interesting to see under the hood of this bizarrely programmed game.
@4-8Productions
@4-8Productions Жыл бұрын
Thanks!
@ajenkinsff7xfiles899
@ajenkinsff7xfiles899 Жыл бұрын
ff7 will never give up all it secrets in over 25 years.
@dennispalmer6928
@dennispalmer6928 Жыл бұрын
So, they store the ASCII digits of the number with a null terminator. It would have saved memory by simply using 2 bytes to store the binary number. Based on what you said about the underflow, the system probably only handles signed 16-bit integers anyway which have a max value of 32,767.
@kyunasan
@kyunasan Жыл бұрын
Saw m4v3k checking about this on stream, I was wondering if you would make a video about it, I'm glad you did! It was a really interesting glitch to understand!
@prisma.
@prisma. 6 ай бұрын
the fact this game works at all is a genuine miracle
@MixMasterLar
@MixMasterLar Жыл бұрын
I think I've only ever heard you mention this, never seen it! Great vid dude
@GamingVids1984
@GamingVids1984 Жыл бұрын
The minute you started talking about it I knew it was going to have to do with random memory being used in an unintended way. That's almost always the way these things work.
@Classic_DionysuS
@Classic_DionysuS Жыл бұрын
Always learning something new about FF7. Amazing. Thanks Death
@Jeff-cn9up
@Jeff-cn9up 8 ай бұрын
Why would you EVER code that as "grab bytes until you get one that starts with something other than 3"? It's nuts. You KNOW the maximum number for that field and that it will always be a positive number, so you code it normally and simply grab two bytes every time.
@drmisunderstood3999
@drmisunderstood3999 3 ай бұрын
Finally, an explanation. I had this happen to my playthrough once and never understood it. Now it makes sense.
@platinumdynamite
@platinumdynamite Жыл бұрын
I get so much joy out of you sharing your love of this game.
@4-8Productions
@4-8Productions Жыл бұрын
Thanks!
@cidhighwindgunz9833
@cidhighwindgunz9833 Жыл бұрын
For real this is probably the best and most reliable FF7 content in recent years
@codyarceneaux7106
@codyarceneaux7106 Жыл бұрын
Kinda got behind watching twitch, but I never miss a YT vid. Good work on it, man! I absolutely love your content, and you’re by far the best FF7 content creator I know of.
@ArcaneEther
@ArcaneEther Жыл бұрын
Going by the memory explanation given, this glitch should also trigger on any map where Cloud's model is defaulted to 2,048. I bet you could trigger this glitch by loading in/out of rooms with the Debug Room. Maybe try this when Cloud is inside the Submarine? I recall the "camera" being zoomed in a bit close there.
@somebloke.
@somebloke. Жыл бұрын
Rumor has it the guy who made this code went on to number the kingdom hearts games
@lightningshy5287
@lightningshy5287 Жыл бұрын
I’m so glad I’m not the only person who ever noticed this. I remember taking a screenshot back in 2015 but somehow I lost it 😂
@sircrashtonii9718
@sircrashtonii9718 Жыл бұрын
This is one of the funniest things I've seen in a long time. I literally burst out laughing when I realized how bad the algorithm is!
@omniwinds
@omniwinds Жыл бұрын
This game has endless secrets and quirks and I am here for all of them
@mikeshaver-miller745
@mikeshaver-miller745 Жыл бұрын
This probably has to do with the field module passing data to the battle module, then the menu module and back again. Timer is constantly changing between battles; so too is Gil count and XP. If you're max level, this should stop. In theory though, shouldn't different party members change the math? I don’t think they all have the same XP values. Could it be step count related? You should reset it after each battle. My last thought is, could it be a fault in the initialization code for the modules?
@MrStrikecentral
@MrStrikecentral Жыл бұрын
I've never even heard of this glitch before. Very interesting...
@TheStrahl
@TheStrahl Жыл бұрын
Oh wow, It's not everyday I see something new in FF7.
@josh1234567892
@josh1234567892 Жыл бұрын
Videos like this are always a fun watch for a CS student :)
@anthonybertuzzi9686
@anthonybertuzzi9686 Жыл бұрын
Why does FF7 years later still shrouded in mystery..... This game will always feel like there's something else to discover
@NGPlusVideos
@NGPlusVideos Жыл бұрын
11:15 "Trying everything on everything". Ah, the Broken Sword method.
@Puremindgames
@Puremindgames Жыл бұрын
It's the best method, it never fails.
@tomathysimons6531
@tomathysimons6531 Жыл бұрын
almost 100k subs that's insane i'm glad that i am able to be subbed before it
@Ilzmur
@Ilzmur Жыл бұрын
Sooo, upside down gigantimax cloud% when 😅 So goofy glitch and good that we have now more details in this. Keep up the good work.
@streetguru9350
@streetguru9350 Жыл бұрын
It'll be 2050 and we'll still be making discoveries about this game.
@paulb800
@paulb800 Жыл бұрын
Might be nothing, but could it be related to the demos of the game that were released? The first reactor and Mt Nibel reactor areas were both areas used in demos of the game. I guess that doesn't explain Bugenhagen's observatory though.
@4-8Productions
@4-8Productions Жыл бұрын
Interesting thought!
@mrteabag59
@mrteabag59 Жыл бұрын
Alternate timeline confirmed, Aeris Aerith / Cloud Upside Down Massive Cloud
@tttpppbbbaaa
@tttpppbbbaaa Жыл бұрын
want to know if this work with cid amd tifa besides just cloud?
@pcrizz
@pcrizz 3 ай бұрын
I think the upside down glitch may also occur early game Midgard Slums, I think before the first church scene or slightly there after. In that case it may have just been the cursor pointer finger upside down because I don't think I could see Cloud due to camera shenanigans. Come to think of it maybe that was just something else, because I see you still have a normal finger cursor while Cloud is massive.
@stevemarshall8873
@stevemarshall8873 Жыл бұрын
Hey, thanks for all your videos. I have learnt stuff I never knew existed in my all time favourite game. can I ask, I have the Ochu trainer because I want to speed up FPS, but I can't friggin edit the values like you do. How do you even do that?
@4-8Productions
@4-8Productions Жыл бұрын
Hit F1, then the numbers should be green, type in the new number, right click, update. 👍
@inthefade
@inthefade 8 ай бұрын
Why does this work on the PC version and not the original console? Does it just crash on the original version?
@wuztron
@wuztron 4 ай бұрын
It doesn't happen at all with PS1 to my knowledge. It's an issue that arises because of the port to PC and how PCs allocate memory.
@rbeng1095
@rbeng1095 Жыл бұрын
i think death broke it lol but yh this was very insightful i didnt know why this happened when i watched one of your stream this was a good watch and explaination
@seanpeacock4290
@seanpeacock4290 Жыл бұрын
The previous FF game FF6 in Japan and FF3 in America, where on the SNES and FF7 might have been started while the negotiations were ongoing with Square, Nintendo, and Sony. Square might not have known what console architecture the game would be released under. The dynamic could have been a way to make it easier to port to multiple systems depending on who would host the game. It was also their first 3D game so there might be some jankie code as a result of not knowing what problems could arise from being in a 3D engine. But even their 2D games had some weird glitches and bugs.
@scragar
@scragar Жыл бұрын
Just to point out the normal approach when you don't know how many bytes you'll need for your number is to have one or more bytes to keep the size. Basically 512 would be 2(because we need 2 bytes for the size as it's above 255), 2(because 2*256 = 512), 0(for the remainder). This prevents any potential issues because you're always storing how many bytes you need rather than looking at the values of bytes to tell when you end. Also given the game only ever uses powers of two for scaling it may be more efficient to just store the power, 1024 is just 2^10, 512 is 2^9; storing 10 and 9 respectively and just doing a left shift by the number for the scaling would be a lot safer/efficient.
@Jabrils
@Jabrils Жыл бұрын
this is beautiful
@2cents968
@2cents968 Жыл бұрын
Great find! Hey, I revisited Bloodstained again recently and I once again couldn't help but think Zangetsu is your doppelganger. Has anyone else pointed this out? Maybe the character designer is an 4-8 viewer?
@kenshinthebattousai3
@kenshinthebattousai3 Жыл бұрын
math with Death is the best. Got my geek on for sure 1024 bits man!!!
@DePhoegonIsle
@DePhoegonIsle Жыл бұрын
That's adorable. though all they would have to have done is leave in a trailing 00, but I mean it's an interesting lesson for programming overlooked side effects.
@penta5421
@penta5421 Жыл бұрын
No way lmao, I remember getting this glitch like 5 years ago just casually playing the game. It happened at the screen just past the North Corel reactor
@user-vu3kt7ss5q
@user-vu3kt7ss5q Жыл бұрын
Bro you reminded me that i saw this glitch when i first ever played through this game. I was 7 and it happened at bugenhagen. My brother didnt believe me!
@petersen523
@petersen523 Жыл бұрын
this happened to me! changing the resolution worked at the time - and it was always on the same room (the one from your ss)
@brainfreeze91
@brainfreeze91 Жыл бұрын
I didn't even understand what you were talking about at first. I immediately understood it as "oh, those are hex numbers. That makes sense they would read numbers there". But when it clicked that they were literally just taking the decimal 30 range and reading the ones digit there, I mean that is just so dumb! I know consoles back in the day did hacky stuff in order to fit more on the disc/cartridge. But I can't imagine that this would even improve anything at all? It's just a weird obfuscated way to read numbers.
@danielhale1
@danielhale1 2 ай бұрын
Pokemon Red & Blue are my go-to "this game is gloriously broken" examples, but I love hearing about the madness underlying FF7's polish. That number encoding system just feels wrong to me. It's the sort of thing I'd have done in my late teens when I was first learning c++ coding and didn't know the right ways (bitwise operations come to mind). Considering how many sacrifices the team had to make, how many hoops they had to jump through just to optimize the game to fit and work, it's weird that they'd have such a weirdly inefficient and convoluted way to store 512 at the start of a model.
@insanecurity
@insanecurity Жыл бұрын
This happened to me the first time I played FFVII Steam version, I had no idea it was considered a “rare” glitch lol :D
@Forr0n
@Forr0n Жыл бұрын
So my hunch it has to do with bad Memory management, or as i wrote under the part in question of the Pincer Mod play trough, "garbage collection". I thought it was a simple error in handling signed and unsigned integers, wich wouldn't be a surprise. I had never imagined such a bad/warped/inefficient way of storing the value of the model size. It hasn't even a advantage over the standard way of storing values and will use more time/resources. Please correct me if i am mistaken. Thank you for telling us how and why this happens. This question bugged me for years.
@MaciejTrebacz
@MaciejTrebacz Жыл бұрын
Yeah there’s absolutely zero reason to store the model size as string given this is meant to be used to do math later. They blew it on several different layers.
@TheBronf
@TheBronf Жыл бұрын
i didnt even know this was a thing. i never encountered it. the only glitch i remember activating was the cut scene in the junon elevator of the fishing village that kept showing cloud giving the black materia to sephiroth.
@patrickbo2045
@patrickbo2045 Жыл бұрын
Yea mate I had that trigger in Bugenhagen's observatory once, confused the heck out of me!
@TheMAZZTer
@TheMAZZTer Жыл бұрын
16:07 makes sense since that is an ASCII string that represents a number. There are valid scenarios where you want to take a number that is displayed as a text string and pull the displayed number as a real number. The code is likely bog standard code for pulling a number from a string. The way you describe it is how that sort of thing is done, it's a very standard function. parseInt() in JavaScript and int.Parse() in ..NET both work the same as what you described. It's likely the text was typed in by a developer somewhere and it was just dumped into the game as-is. Given it only uses four bytes and they could have saved a whopping two bytes for each model it really isn't a big deal all things considered. Then the game itself had the responsibility to parse out the strings. Of course they failed to protect against buffer overflow, a very basic bug.
@SeanFarFlung
@SeanFarFlung Жыл бұрын
Would this work also when you are cid or tifa running around while Cloud is sick?
@MaciejTrebacz
@MaciejTrebacz Жыл бұрын
In theory yes, although we couldn’t get it to work during testing. But on Marshbag’s channel I saw him getting Tifa upside down in Bugens observatory.
@maggiehenstorf5168
@maggiehenstorf5168 8 ай бұрын
Good videos I would love to see you do would be on Important Missable Item Locations/How To Get Them and all the ways Get Each Type of Chocobo, not just the 15 minute way for the speed runners.
@the_real_vdegenne
@the_real_vdegenne 4 ай бұрын
im not sure to understand. When you allocate a variable in C language you don't need to specify its type, just the length. or am i missing something?
@gustavedelior3683
@gustavedelior3683 Жыл бұрын
So when I came upon this glitch I thought it was somehow related to the northern crater scene at the end of disk one where cloud is on the ceiling before crystalized sephiroth drops down all being triggered by the extremely wonky code
@Stunprefo
@Stunprefo Жыл бұрын
This glitch happened to me before, I have it clipped but it happened with no back and forth. In the Coral spot.
@mrlucasftw42
@mrlucasftw42 8 ай бұрын
My FMVs used to play upside down in this game for some reason - way back in the day on PC
@MajoradeMayhem
@MajoradeMayhem 5 ай бұрын
I am a very novice programmer. My code is horrible. But my jaw dropped when I saw how they coded this. That is insanity. What materia were they smoking?
@BaldorfBreakdowns
@BaldorfBreakdowns Жыл бұрын
So the 3 junk slots after 1024 are always the same when this happens? Or does any number over 1024 cause max underflow, therefore, no variations? Also, why doesn't this happen on other platforms?
@letao12
@letao12 Жыл бұрын
On PS there is no dynamically allocated memory AFAIK, since the console has a well-known memory capacity and they can pre-allocate everything in the right place. Dynamic allocation is only used on PC because the amount of available memory can't be predicted. I would think it's possible to get other random values that overflow to different amounts. Realistically it depends on what the memory was previously used for, and that might have some patterns that force it to be always a similar size.
@4-8Productions
@4-8Productions Жыл бұрын
They can be different, but I think the underflow always ends up in about the same amount. So I don't think you'll be getting drastically different sizes of Cloud.
@cs8712
@cs8712 Жыл бұрын
@@4-8Productions Is the underflow point at 65536? Like if you generated just a single "3X" value in the 5th column, you could end up with a value like 10249, so wouldn't that give you a big cloud that isn't upside down?
@BaldorfBreakdowns
@BaldorfBreakdowns Жыл бұрын
@@4-8Productions Appreciate the response, thanks!
@snowxcrowe
@snowxcrowe Жыл бұрын
This is great! A very fun glitch.
@neezduts69420
@neezduts69420 Жыл бұрын
I'd completely forgotten about this happened to me until this video
@antsinflowers
@antsinflowers Жыл бұрын
Will there ever be a final glitch?
@McSquidification
@McSquidification Жыл бұрын
Given this explanation, wouldn't we occasionally see only a single number starting with 3 added to the end, resulting in a roughly 10x scaled model that isn't too high to underflow? or is the max value small enough that even one extra digit is enough?
@carlbowen7965
@carlbowen7965 6 ай бұрын
I wonder if the same can be done to Cid when he temporarily becomes leader?
@Bubbles41412
@Bubbles41412 8 ай бұрын
I got it to trigger on the avalanche screen with 95% consistency on my casual playthrough, it triggered immediately when i returned to the avalanche screen after the cutscene and was triggered like 1/20 times (the only time it didn't trigger after 1 try is right after a battle cancelled it on the avalanche screen). I got recordings :3
@Bubbles41412
@Bubbles41412 8 ай бұрын
sorry i typoed it triggered 19/20 times, 1/20 times it didnt trigger ^^
@komickid999
@komickid999 Жыл бұрын
I’ve experienced this glitch before. I believe I was playing on the steam version. It was on the screen behind Coral where Barret looses his hand.
@komickid999
@komickid999 Жыл бұрын
Lol, as I wrote that I looked up and you were already demonstrating that screen in video.
@MeykTaruka
@MeykTaruka Жыл бұрын
The Bugenhagen one happened to me on Playstation 4 (?) I played on PS5. Is there a PS5 version, or was it the same as for PS4?
@MaciejTrebacz
@MaciejTrebacz Жыл бұрын
Pretty sure PS4 & PS5 are the same version, and they're based on the Steam version so it makes sense that the bug happens there as well, although I personally never seen it. Thanks for the report!
@legacytag
@legacytag Жыл бұрын
Despite them being two different genres, a lot of people like to compare Ocarina of Time and FF7 a lot since they were the two big adventure type games for each platform And man...Both of these games are equally comparable in the fact that they are glitchy disasters in the best of ways :'3
@AntonBalfe
@AntonBalfe Жыл бұрын
Cloud must have taken a super mushroom from the super smash Bros game back with him into FF7
@elliottkittel7444
@elliottkittel7444 Жыл бұрын
Great work!
@CreativeDestruction0
@CreativeDestruction0 Жыл бұрын
Very cool! Does this happen with Tifa/Cid, and can it work on any other versions?
@The_One_In_Black
@The_One_In_Black Жыл бұрын
This makes me think that the glitch could also happen in the Lifestream, unless the multiple Clouds are handled differently from normal Cloud.
@graemebrett8249
@graemebrett8249 Жыл бұрын
Based on the way the memory is stored, when the model size is 512 it'll always still write the 4 bytes so [35][31][32][00] so the code extract numbers from memory would always stop at [00] That is assuming that it does in fact always write the 4 bytes of memory even for numbers that only require the 3.
@steak9194
@steak9194 Жыл бұрын
loved this, bro - more please
@tfuenke
@tfuenke Жыл бұрын
I never get tired of this game
@asarand
@asarand Жыл бұрын
I'm afraid you are misunderstanding something. It's not that the program sees a 3 and grabs the number after it. The ASCII value for the numbers 0 through 9 is 30 through 39. The program is grabbing the byte and reading it as a number. The reason for the glitch is because those following bytes that are inadvertently numbers are being read. The fix would have been to make sure that it never read past the fourth byte.
@MaciejTrebacz
@MaciejTrebacz Жыл бұрын
The video simplifies this a bit but this is roughly what happens. In reality it’s even more silly because they actually are using a lookup table to determine whether a value is a number or not lol.
@asarand
@asarand Жыл бұрын
@@MaciejTrebacz I am not a professional programmer, but I can tell you that having to use a look up table to determine if the byte you read is a number or not is ridiculous. All you need is a simple if then test: if var>=0 and var
@kieran8266
@kieran8266 Жыл бұрын
Are we sure this is an accident? Aren't all of these scenes where the background can do some kind of FMV motion at one point in the game? That might be connected to why the models were scaled differently in these areas.
@BabinSquared
@BabinSquared Жыл бұрын
Chat: Pay attention, this is how you become tall The reality: Cloud becomes so short that he becomes negative tall
@starfrost6816
@starfrost6816 Жыл бұрын
if one number is stored cloud becomes very big but the right way up?
@Dave_Znothere
@Dave_Znothere Жыл бұрын
Missed it live but I’m here now
@Juice_Tortuga
@Juice_Tortuga Жыл бұрын
@4-8Productions, I’m not sure if it would be helpful but I was watching a ff7 run and I saw this happen to someone a couple of months ago (the Corel area one specifically), I had never seen it before and I am pretty sure she didn’t follow quite that set of circumstances for that to have occurred - might be insightful in regards to finding other / easier ways to make it happen? If interested, I can look for the video again.
@chibinya
@chibinya Жыл бұрын
What if there's only one 3 in the next byte? Then the model would be 10x as big instead of 1000x like in your example. Is that enough to overflow?
@uniflare
@uniflare Жыл бұрын
This isn't the whole picture. You are right that the models should vary in size each time, if only a little. I expect there is a clamp on an unsigned short, that then is reinterpreted as a signed short, which would become it's half negative. But even then, the number would need to be 65536 or bigger (so minimum 2 extra digits). This would result in a maximum inverted scale every time. But without seeing the algorithm, I can't be sure of course, but I suspect something else is making the bug (when it does appear) so consistent, like the allocator strategy.
FFVII - Aeris Elevator Glitch [4-8Live]
18:48
4-8Productions
Рет қаралды 87 М.
HUGE FFVII MATERIA DUPLICATION GLITCH FOUND
1:14:43
4-8Productions
Рет қаралды 152 М.
Will A Basketball Boat Hold My Weight?
00:30
MrBeast
Рет қаралды 94 МЛН
What's in the clown's bag? #clown #angel #bunnypolice
00:19
超人夫妇
Рет қаралды 21 МЛН
🕊️Valera🕊️
00:34
DO$HIK
Рет қаралды 10 МЛН
How One Man Completely Broke Chrono Trigger Speedrunning
25:06
DoctorSwellman
Рет қаралды 75 М.
The FF4 Glitch That Squaresoft Made Canon
19:35
DoctorSwellman
Рет қаралды 336 М.
Osu!'s Biggest Cheater Was Finally Caught
20:36
Karl Jobst
Рет қаралды 1,5 МЛН
The Curious Case of Sephiroth
19:27
Final Fantasy Union
Рет қаралды 87 М.
Off Camera Secrets | Final Fantasy VII - Boundary Break
13:39
Can You Beat Dark Souls While Poopwalking the Whole Time?
47:15
splee5556
Рет қаралды 458 М.
FFVII - Glitches and Oddities
24:42
4-8Productions
Рет қаралды 1,4 МЛН
Final Fantasy VII's Ultimate Glitch - The Wrong Warp
25:05
4-8Productions
Рет қаралды 196 М.
Will A Basketball Boat Hold My Weight?
00:30
MrBeast
Рет қаралды 94 МЛН