It was pretty fun digging in to another game like this. Cuphead is actually massive when you compare it to Iron Lung, so I couldn't show everything. Although, I did get some interesting questions about secret/unused bosses. Decided that was worth a little follow-up investigation, so I posted my findings here: twitter.com/entropy_phi/status/1551622312524488704
Anything will take a bit of learning to get started. The Subnautica modding guide is a good introduction to some common methods: mroshaw.github.io/Subnautica/
@@the_cheese_goddess It organized the code to look somewhat human-like, as opposed to most decompilers I know that generate assembly codes. I will check what you suggested, thank you.
Yeah, one time I was working on a game and released it on a custom webpage then got my got my laptop stolen. So I had to decompile it to keep updating it, but working on decompiled code doesn't make for a good experience.
Hey, sorry id this sint the right place but I love your vids, I listen to them while at work all the time, glad to see we fall down similar RU-vid rabbit holes.
How did they implement it? I'm currently looking at my game's timeScale system and looking to add more flexibility. I know you can do calculations with time differently with custom physics but was curious on other solutions.
Fun fact: The secret boss fight in the DLC is actually The Devil's unused 2nd phase where you're supposed to beat the Angel and Demon before you fight The Devil in his giant form, you can tell by the Angel and Demon's knockout animation where they go into the skeleton's eyes. The Devil's flesh would be restored and thus you'd fight the giant Devil as normal.
Not only that, but the devil also has an unused transition animation of him holding the stage like in the secret fight to him moving up close to the screen for what was the 2nd faze of his original fight. My guess is the planned full fight was to start his boss fight as normal, have him jump out of his skeleton and into the hole for the faze 2 transition which is the secret fight with the angel and demon versions of him, then go into his last faze which is also the final faze in the regular fight.
The behind-the-camera stuff is really interesting. The way elements move throughout the levels is reminiscent of how cells were used and moved around in classic animations when they were still captured in analog! Scenes and scene elements would be painted on to separate cells that could be moved forward, backward, up, down, and side to side to create the illusion of movement and distance from the characters animated on other cell layers. Very cool stuff.
Rather interested in how the King Dice fight is loaded. Seems like that one would need dynamic loading as to keep the game runnable in more machines, but maybe I'm overestimating individual assets' RAM usage.
Each mini-boss is a separate scene that loads when you trigger it. They aren't loaded beforehand like every other boss fight. You'll notice there's a loading screen for each one, although it's usually faster than loading a standard fight since some of the resources (like the player and UI) carry over.
It's possible the random chance of rendering broken sprites may have been to avoid flooding the screen in a worst case scenario. If you see a visual bug, a player may report it, which allows for a fix. But you don't want this bug to be gamebreaking or make the experience bad until that fix.
If I had to guess, the 1/10 chance of showing a broken sprite helps find broken stuff without affecting gameplay too much and also means of an important sprite breaks, you have a chance to see it
This was a fun video to watch. I always wondered how the devs knew how to time when a scrolling background would change to another background. Examples: The airplane bosses (Hilda Berg, Cala Maria, and Esther Winchester)
I had actually encounter the unrended glitch in the final boss of the dlc, i was beginning the fight and than the screen turned white for a sec and it went back to normal, i was wondering what was going on and when i died the “failed” text was a also white but not cover the whole screen this time, i was so confused on what was going on until now knowing it was a rendering glitch! Also keep up the good work my guy you’re content is great!
Quick question: Can you move camera in a way to turn Cuphead into a 3D game? Which I know, undermines the whole premise of the game being a tribute to 2D animation, but... For science, I guess...
Sort of. It's in 3d space but the sprites are still 2d and they won't be aligned if you tilt the camera. Look at the shots I included of the shop or the long scrolling levels where the camera isn't head-on.
Think of it like a bunch of sheets of paper all cut into different shapes, then held at different distances from the camera. They're all 2D, but each layer is at a different position in space from the others.
it's basically what's used in unity to create moving backgrounds. I guess one person who had a lot of videos on it was Thomas Brush while developing his game, Neversong. So go watch a few videos of his before 2019. He definitely made quite a few about those
Just seeing those stages at full view was bloomin' awesome. Put me in mind of someone doing that back in the old days and then covering it with a dark box so you only had a limited viewpoint.
I commented on your Iron Lung video about using Unity Explorer, I realize that the way you're doing it is a lot more efficient. Good idea to stick to your guns! Always love this kind of content... boundary breaking.
1:45 but if there is a little animation of how his body falls to eat the mouse, he doesn't teleport at all, you could say it's a kind of transition xdxd
Great vid! Can't wait for the next breakdown And if you get enough requests, hope you make an vid/vod showcasing those other, more minor discoveries, as long as its good enough for you and the algorithm :) My personal would be if any interesting examples of those broken sprites are actually available. It just seems bizarre and cool that they'd randomize it, but maybe it's less bizarre than I think it might be as a non-programmer XD
I think if it's some small stuff that I get a lot of questions about I'd just post a quick explanation on Twitter (like I did for the eyeball in Iron Lung). But if there was a lot of interest in another video I'd definitely consider it. Yeah the sprite code struck me as pretty strange. I guess it could happen if you see a sprite disappear for a single frame. Usually a broken texture/material/sprite will either be bright pink or invisible. Makes more sense in this case if it's invisible. Or maybe it can't happen in game, they could've fixed it but never got around to taking the code out. Too many possible explanations.
It seems to be in order to make any glitching sprites extremely obvious during development. That code may not even be set to run in the release version of the game.
I'd love to see a break down of some of the other FNaF games. There's a really good breakdown of the first game, but I'd love to see how some of these mechanisms evolved through the second third and fourth games. They all more or less use the same movement mechanism, but there's a lot of other rng elements that would be cool to get an under-the-hood look at. Namely the third and fourth are what I'd love to see. Thanks for the awesome breakdown! It's always great to learn more about the unique techniques developers use to create their games!
@@EphiTV Indeed it is! The first several games in the series are more unique with how the AI works and the general mechanics, but the more recent one does have its merits too. I think it'd be worth checking out!
This is super interesting to see as a beginner programmer, I especially loved your way of explaining what each code in a simple way please more of those ! XD
7:55 My guess: To add to the aesthetics the game tries to achieve, namely the fact of it mimicking an old cartoon. This randomness could add to the "cartoon" in this case being old and corrupted or smth... Or just to spice it up a little... Idk
I would really like if you went a little bit more in depth about why for example there are 6 different cameras and why each particle in the game is it's own MonoBehaviour. Also noticed there are test levels, would be cool if you explored some of them. But before anything, did you consider the legal side of decompiling?
The different cameras are just a way of separating their behaviors as-needed. For example the most simple one would be the static camera in the shop/menu. There's others that move until they get to a certain trigger and then stop. Some move or zoom to highlight different parts of the fight, etc. Only one is active at a time. I'm not sure if every last particle is a monobehavior, but they are pretty widely used. Makes it easier to apply their tween system, among other things like homing abilities. Decompilation is legal in the US/EU as long as you purchased the game legally (which I always do), and aren't re-selling the modified work. The vast majority of mods are started from decompiled code. I'm a game dev myself and the only relevant legal cases I've heard of in the industry are against people selling cheats for multiplayer games. RU-vid even has a section in their guidelines listing this type of hacking content as "Safe for Advertising". That said, if any devs reached out feeling uncomfortable I'd be happy to talk it through with them.
Neat video. I'm a game dev myself and like digging through other people's games myself. Surprised their code wasn't obfuscated. When I took apart some other games they were difficult to parse. I did find some of the random changes you did a bit corny, but overall good stuff.
I have seen alot of custom or self written tween code in my life. The Libraries you mentioned are often slow or miss simple features, which can be done easily with your own tweening function. Also writing a tween function is not hard at all.
In the rumor honeybottoms boss fight, you can see the third phase at the bottom of the camera. Does this mean if you shoot down in that fight you can do damage to the boss?
Some bosses you can hit off-screen, but most you can't. Mostly applies when they're changing phases but still vulnerable. There's usually invisible walls stopping you from shooting off-screen - that fight included.
You kinda look like Bully Maguire, but cooler. 😅 That aside, thanks for the deep dive. It's fascinating to see how they do things behind the scenes and compare them to the 3D games, like in Boundary Breaks.
Hey @ephitv, I'm new to your channel and thought this was awesome! An idea for a future video could be to see how the code for pokemon games work, in terms of the different probabilities of seeing and catching different pokemon and how the different probabilities of particular moves landing and status effects happening
There is a debug menu "scene_menu" and somehow in the V1.3 patch it cannot be interacted with when loading in the scene with their custom SceneLoader Class/Script in the code, and I tried to make it intractable (with it's buttons and sliders) but I just can't seem to get it to work.
That debug menu won't work normally in levels because your mouse is locked by default. You have to either unlock the mouse or use the debug from the main menu where it works just fine.
@@EphiTV Hey me again, so apparently the flag "allowMouseInput", that is in Rewired.Integration.UnityUI.RewiredStandaloneInputModule, is set to false, so setting that to true will make it so that the buttons in the "scene_menu" scene can be interacted with the mouse. (I did not find this solution, someone in the Cuphead Speedrun discord, in a mod-discussions channel (Modding the game), found it)
Yeah, that makes sense. It's a pretty popular input management asset. Figured it was either disabled there or with Unity defaults - like editing the Cursor state.
kindly do one for monogame. I'd like to see how celeste or hades looks like under the hood. Especially with the make-your-own libraries thing that goes on there
Is it ever annoying that everyone calls you Spider-Man? I’m sure it was funny at first but maybe it gets old at times. Also good video :) I would have loved to see the Ribby and Croaks fight.
I did little to no codding in middle school yet my teachers saw i had talent for it since i learned and figured so much out by myself on my crappy and old pc. They suggested i went to the free coding course that school had and i was pretty good yet, after my parents kept telling me to focus on my studies and stopped bringing me to the course i gave up on coding. But whenever i find one of these videos/channels about coding and stuff, i feel like i understand every word of it and get excited like im the one decoding these things we don’t see!! I also used to hand write codes such as tweening but after i dropped coding, i forgot almost everything about it. I would give my everything to be able to code again and get courses but more professional and with right equipment!! I mean i don’t hate the subject im studying too. I would rather do coding as a hobby tbh. (Im studying english btw but i’ll study further into other languages in uni prolly)(if i can go to uni ofc since its hard being a student in Turkiye 😭😭) But yeah keep ul these videos! I’d love to see more coding stuff. I could watch them for HOURS