I Hacked Cuphead To Show You What The Game Doesn't (And A Lot More)
Ойындар
Cuphead actually has a lot more going on behind the scenes than you may think. I broke it open to discover those secrets, and then injected my own code to make everything much worse.
Chapters
00:00 Cracking Open Cuphead
00:53 Out-of-Bounds
03:41 Breaking Everything
05:08 Code Secrets
08:00 The Elder Scrolls: Cuphead Edition
08:35 Wrapping Up
Subscribe ► kzread.info?sub_co...
Twitter ► / entropy_phi
Twitch ► / ephitv
Пікірлер: 422
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
@thestratposter3515
2 жыл бұрын
.
@Lolo_Antonio-FryEmUpFan
Жыл бұрын
It was all already known Long time ago, useless video
@mampuiaralte5494
Жыл бұрын
.
@Art_with_atlas
Жыл бұрын
Is there an easy way I could move the camera? You said there were tool for it?
@EphiTV
Жыл бұрын
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/
Keep in mind that this is compiled and then decompiled code, meaning it won't be as clean, commented, or understandable, but will be more optimized
@EphiTV
2 жыл бұрын
Yep, definitely. You also lose a bunch of context in comments, editor functions, pre-compiles and such.
@Itayxeno
2 жыл бұрын
May I ask how is this done? With what? Seems interesting
@the_cheese_goddess
2 жыл бұрын
@@Itayxeno from what I can see, they are using dnSpy which is a IL decompiler for C#
@Itayxeno
2 жыл бұрын
@@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.
@QvsTheWorld
2 жыл бұрын
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.
The use of separate time layers is fascinating, as is the rest of the code breakdown... awesome work!
@EphiTV
2 жыл бұрын
It's a neat trick I've seen in a few games but never had a look at how they implemented it. Pretty simple and gets the job done nicely.
@bobjerry6731
2 жыл бұрын
e
@Thedeadlywraith
2 жыл бұрын
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 KZread rabbit holes.
@amiromeragic3944
2 жыл бұрын
PEE and the rest
@StefanLopuszanski
Жыл бұрын
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.
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.
@EphiTV
2 жыл бұрын
Yeah, the idea of parallax backgrounds in games originated from old animation techniques.
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.
@patinhoquemoralogoali9280
2 жыл бұрын
THAT explains why the Devil jumps of his skin and then appear with his skin abain
@kingbrettpro
2 жыл бұрын
@@patinhoquemoralogoali9280 Yeah, the second phase was unused and became a secret boss for the DLC instead. The game skips that phase.
@graysonwells21
Жыл бұрын
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.
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.
@EphiTV
2 жыл бұрын
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.
I really appreciate these series. It's fun to see what goes on behind the game.
@aguywholikesstuff5612
2 жыл бұрын
ngl he kinda looks like Tobey Maguire long lost brother
I can’t believe Bully Maguire would hack Cuphead!
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 channel is way overdue to blow up, your content is golden!
@cuckgames
2 жыл бұрын
fr
@MarioAP
2 жыл бұрын
He has 48k subscribers it already blew up
@cuckgames
2 жыл бұрын
@@MarioAP not enough
@VinsDwelling
2 жыл бұрын
@@MarioAP 48k is nothing compared to what he actually can get
@thestratposter3515
2 жыл бұрын
Yes
I'd love to see what the devs have to say on that chance to render bugged/bad/broken sprites thing.
@lonelybookworm
2 жыл бұрын
I guess some dev likes russian roulette
@snovbird
2 жыл бұрын
If you wonder what happens when the unloaded animation plays the boss sinply freezes for the rest of the game, basically giving you a free win
@thegodchips278
2 жыл бұрын
@@snovbird Ah, that's why that happens
@britishrailclass4767
2 жыл бұрын
@@snovbird cool
Ephi: "The second phase of the boss" Also Ephi: *showing the second phase of the boss*
@EphiTV
2 жыл бұрын
Yeah, although the second phase is off-screen before that. I just felt like playing that clip out uninterrupted.
This has to be my current favorite KZread series. Please keep going!
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)
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.
That... certainly is an interesting way to handle sprite errors.
I absolutely love this. I wish it could've been longer.
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
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.
@EphiTV
2 жыл бұрын
Unity Explorer is useful sometimes. I use a mixture of methods, whatever works best.
Well done man its well edited!
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!
@hylianmono
2 жыл бұрын
i thought it was something to make the expert mode harder
@vivimannequin
2 жыл бұрын
This happened to me when fighting him on expert but now it's patched along with the glitch that helped me defeat him the first time
nice video! i love seeing technical breakdowns like this
Man, I already had such respect for the devs of Cuphead for the animation process alone, but for all this coding, I only respect them even more!
Oh man so cool! Thanks for taking the time to break this game apart! :)
Very interesting and well made video. Keep up the good work!
This was really cool to see and really informative for someone who wants to be a game developer!
It's a very interesting visual. It reminds me of a particular scene in Underhero where breaking the bounds of the game was a final dungeon plot point.
I love these videos that just explain sick secrets in the game and how it works
Awesome vid, just like the Iron Lung one. Well done!
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
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
No idea how to code but love your vibe and style of presentation, subbed 😎
Please make more of these! They're amazing.
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...
@EphiTV
2 жыл бұрын
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.
@corellioncrusaderproductio4679
2 жыл бұрын
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.
@microdavid7098
2 жыл бұрын
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
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.
@EphiTV
Жыл бұрын
Most Unity games aren't obfuscated. Mono decompiles pretty cleanly.
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
"Neither. The answer is neither" got a chuckle out of me
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
2 жыл бұрын
I haven't played them before, but isn't the recent one more of a standard survival horror? Looked quite different from the previous entries.
@corellioncrusaderproductio4679
2 жыл бұрын
@@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!
Quality content, my guy
0:26 You look like if Tom Holland and Bully Maguire got mixed into one being. Good video by the way :)
Great video friend! Keep up the good work.
that sprite error handling code is so weird...i can't think of any reason to do that...fascinating.
@ChrisFloofyKitsune
2 жыл бұрын
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.
@torf1746
2 жыл бұрын
then why not run it 100% of the time?
@ChrisFloofyKitsune
2 жыл бұрын
@@torf1746 the 10% chance each frame should result in a flickering effect, making the broken sprite stand out even more so.
would be nice if you can show us the process on how you do this and we can continue to explore the rest, it looks fun to see the backend
Very cool to see background working of the game and would like to see more games.
I would love to see more breakdowns. Subbed.
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
@EphiTV
2 жыл бұрын
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.
@thestratposter3515
2 жыл бұрын
.
What a very fun an informative video!
Make This A Series, This Is Great!
The amount of work from Ephi and the cuphead developers 👏🏾
I hope your popularity explodes you deserve way more likes
Great quality video , very knowledgeable too im a cyber security major it was cool to see code for the game
I would love to see a video of every boss with the camera backed up. I would watch that whole video
Bro looks like billy Maguire
Wow the hive is insane from a 3D perspective!
I wonder what some of the older castlevania games looked like behind the scenes, I'm sure there's some interesting stuff that occurs there
A hollow night version of this would be awesome
I didnt even know it was actually 3d, nevermind all this stuff
@EphiTV
2 жыл бұрын
Almost every modern game is made in a 3d engine nowadays, even if they don't use those features.
I'd personally watch a video of every boss fight recorded out of bounds lol
This was an amazing video
I wanna see every boss fight tho! I’d watch a full play through of zoomed out
You should do these vidros with five nights at Freddy's! These videos were so fun to watch, already subscribed
"Lets-a go!" 😂
Nice video! :) It'd be great if you try breaking phasmophobia or some old NES/PS1 games next time ^^
Asian parents when they receive their child's report card 0:22
grim matchstick is so trippy
you should break phasmophobia next. get the proton pack, found in the code, to spawn.
Out of the screen is not anymore so satysfating
I think the 1/10 chance to render a bad sprite actually has happened in the saltbaker last phase
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.
Loved the video
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
Holy....Good work YT for recommending this channel again.
THIS IS SO COOL!
I sub for this stuff! Nice!
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.
Can you possibly try and show this type of video with either ori games? I feel that game will have some weird things happen when the camera is moved
Love this video
Great video man! Your look makes me think of Tobey Maguire.
You got part of the episode in the wrapping up bruh, *pukes*.
@EphiTV I have a question, how damage is calculated based on weapon and impacts ? also when choose extra life damage is decreased? how that works?
This game is so special, would love something more in depth regarding the code and design. Are many of the levels set up in 2.5D fashion?
@EphiTV
Жыл бұрын
Almost all modern 2d games are made in 3d engines nowadays. Every level is made up of sprites layered in a 3d scene.
Bully McGuire but a hacker
@adamantii
2 жыл бұрын
So I'm not the only one who thought this...
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?
@EphiTV
2 жыл бұрын
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.
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.
@EphiTV
2 жыл бұрын
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.
@GioTGM
2 жыл бұрын
@@EphiTV Huh, interesting.
@GioTGM
Жыл бұрын
@@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)
@EphiTV
Жыл бұрын
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.
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
@EphiTV
2 жыл бұрын
Coding is a great hobby to learn in your free time. Lots of good tutorials and resources out there for all sorts of topics. Good luck with it!
@aso-chan
2 жыл бұрын
@@EphiTV Thanks! I feel motivated when someone says i can do it :D
So this what Toby McGuire is now doing... Decoding.
Thanks for uploading this, love your video, regards ✌️✌️✌️🥰🥰🥰
Awesome, gentle presentation and narration. Subbed. (I wish more gaming channels were calm like yours)
@EphiTV
2 жыл бұрын
Thanks! Yeah I'm not too in to over-the-top channels personally. Nothing against 'em though.
Oh my, for some reason as SOON as his face appeared at 0:28 I thought he was Toby Maguire
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?
@EphiTV
2 жыл бұрын
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. KZread 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.
Hey Ephi! You have a discussion going on about your iron lung video on markipliers lore update on that game. You're spoken of in high regard
@EphiTV
2 жыл бұрын
That's great to hear! I'm glad Iron Lung is getting more coverage too. Seems to be really blowing up lately. Thanks for letting me know!
can you do the huge screen thing on all the bosses?
I can't stop thinking about how he looks like Toby Maguire
1:37 Ah, if all the stick comes out xdxd
I was just in the beginning of the video and suddenly Bully Maguire pops up, the fear was real
Hey, that was a very cool video! What tools did you use to decompile the game and inject your own library in?
@EphiTV
Жыл бұрын
DnSpy for decompiling. The rest is a little more involved, but I went over it in my Subnautica modding video.
underrated channel
Yeah, this is very interesting.
First time i see, peter parker just explained many cup head game tricks