Manage Surface Impacts Through Scriptable Objects with This System #Shorts




Published: 07 Apr 2022

Full Tutorial: https://youtu.be/kT2ZxjMuT_4


A common need in video games, to increase immersion of the player, is to add some effect when an impact is made. Using this system whenever an impact is made by any arbitrary action in your game, you can simply call SurfaceManager.Instance.HandleImpact() and this system will utilize Scriptable Objects to determine which effects to play. This allows you to have a highly configuration-driven surface management system where you can reuse effects across different impacts when that makes sense, and easily add/change effects when you want a unique effect!


This week is a little more advanced than I typically do. You can learn how to implement a surface management system that centralizes the control of impacts into a single script that is completely configuration driven (via ScriptableObjects). You'll learn how you can use it to create new Surfaces, Impact Types, and even extend more SurfaceEffects than just SpawnObjectEffect and PlayAudioEffect (that's all that's included in this video).


👩‍💻 As always, all code from this video is available on GitHub: https://github.com/llamacademy/surface-manager


----


Believe in LlamAcademy's mission and have received value from the videos? Consider becoming a Patreon supporter: https://www.patreon.com/llamacademy


----

Most tutorials come from knowledge gained making https://survival.llama.software Llama Survival - a top-down zombie survival shooter for Android and iOS.

I also have some Unity Assets (affiliate link): https://assetstore.unity.com/publishers/22409?_aid=1101l9QvC


Connect on Social Media

Some links may be affiliate links, which at no additional cost to you, gives LlamAcademy a small portion of the purchase.