How to create a Replay System like in Super Meat Boy using Unity

How to create a Replay System like in Super Meat Boy using Unity

11.382 Lượt nghe
How to create a Replay System like in Super Meat Boy using Unity
In this video, I show how to create a replay system similar to the one in Super Meat Boy using Unity. We'll start with replaying a single playthrough and then expand the system to handle replaying each attempt at the level. The example in the video is done using a platformer-styled game; however, the concepts and logic in this tutorial will apply to most other types of games as well. Thank you for watching and I hope the video was helpful! 🙂 ► TIMESTAMPS 0:00 Intro 0:41 Input vs State Based Replay 2:32 How it's going to work 6:42 Project Overview 8:30 Recording the data 11:31 Creating the Replay Object 12:35 Replaying the player 19:56 Switching the Camera Target 20:39 Replaying more state data 25:11 Replaying multiple objects 28:55 Replaying like Super Meat Boy 31:29 Optimizing for memory usage 34:22 Outro ► RESOURCES This is an excellent resource which goes over some more complicated topics like Memory Streams in a Replay System. I highly recommend giving it a look, especially if you're trying to optimize for memory. https://www.raywenderlich.com/7728186-creating-a-replay-system-in-unity If you're struggling with the event-driven stuff used in this tutorial (onGoalReached, onRestartLevel, etc...), this is a short and excellent video that will bring you up to speed with how I'm using events in this project. https://www.youtube.com/watch?v=gx0Lt4tCDE0 ► GITHUB PROJECT The '1-start-of-video' branch is the starting point of the project for this tutorial and the '2-end-of-video' branch is the end result. https://github.com/shapedbyrainstudios/supermeatboy-replay-system-example ► MUSIC The backing music is custom made by @themaykit. https://www.instagram.com/themaykit/ ► DISCORD Come ask questions, suggest a video topic, or just hang out! 📱Discord ➔ https://discord.gg/99gcnaHFf9 ► THE PATH OF REN Wishlist The Path of Ren on Steam! 🎮 Steam (The Path of Ren) ➔ https://store.steampowered.com/app/1619920 ► SOCIAL MEDIA LINKS 🐦 Twitter ➔ https://twitter.com/ShapedByRain 📷 Instagram ➔ https://instagram.com/ShapedByRainStudios 🕑 TikTok ➔ https://tiktok.com/@ShapedByRainStudios 🌐 Website ➔ https://ShapedByRainStudios.com ► SUPPORT Any support is much appreciated! I may receive a commission on any assets purchased using the below Unity Asset Store link. 🛍️ Unity Asset Store Affiliate Link ➔ https://assetstore.unity.com/?aid=1100lrxm5 ☕ Buy me a coffee! (Ko-fi) ➔ https://ko-fi.com/ShapedByRainStudios #supermeatboy #unity2d #unity