What CLEAN CODE Looks Like: Slay the Spire 2 Source Code Deep Dive

Get started with SerpApi using 250 free credits: https://serpapi.com/?utm_source=youtu... Slay the Spire 2 is a masterclass in Godot game development, and today we're going to sneak peek under the hood of its source code. From map generation, Xoshiro256 RNG and enemies AI to cards architecture, netcode and Godot design patterns, we'll break down how Mega Crit built game of this scale. Whether you're a developer curious about clean code practices or a gamer wanting to see how card RNG, map generation, and combat state work behind the scenes, this deep dive covers it all. 🆇 LINKS 🆇 Godot code for simple enemies AI brain - https://github.com/Priler/sts2_enemie... ❤️ My Patreon (support what I'm doing) -   / priler   All of my mods & open source projects are also listed there :] Like, subscribe, ring a notification bell :3 Thanks for your support! [!] Important Note: The code shown in this video was obtained through reverse engineering using Visual Studio software, which provides this functionality as an officially supported feature. It does not represent the original source code created by Mega Crit, but a decompiled version for educational and research purposes only. If you enjoy the technical logic behind this game, please support the developers by picking up a copy on Steam: https://store.steampowered.com/app/28... Chapters: 0:00 Intro 1:55 How mantis picks the card (code) 3:43 Map Generation (scripted first run) 6:10 RNG Entropy 6:58 Map Generation code 10:08 Switch to Xoshiro256 11:53 AutoSlay automated QA bot 14:05 Search results API 15:36 Replay code 17:24 Funny code findings 19:47 No central game loop 22:33 Three pillars of Netcode 26:52 Enemies AI 29:03 How cards are stored? 31:12 How cards are executed (played)? 35:30 Feedback tool 37:11 Code architecture 43:14 Huge shoutout to MegaCrit This video was sponsored by SerpApi.