Screen shake with one line [Game Maker | Basics]
This basics video tutorial shows you how to make a screen shake and toggle it off and on with just one line of code.
This is the quick and dirty/easy way how to make it. You simply create an effect layer and set the effect to screen shake. To toggle it off and on you simply set the visibility of this effect layer to on or off (which enables/disables this effect). That's it!
Note: I have done a video years before by taking the camera view and shake that up. YoYo Games inserted this neat (and easier to use) functionality inside GameMaker, so you can use this one also.
https://youtu.be/HQG91LgxNpk
Graphics shown:
https://holder-anibat.itch.io/holders-animated-battlers-free-enemies-pack-1
https://free-game-assets.itch.io/2d-battle-backgrounds
https://opengameart.org/content/hit-animation-frame-by-frame
https://opengameart.org/content/animations-blood-hit-and-both-d
👑 Support me and get fresh game art and game maker projects every month:
https://www.patreon.com/1upindie
Follow me on:
📸 Instangram: https://www.instagram.com/1upindie
🐦 Twitter: https://twitter.com/1upIndie
💬 Discord: https://discord.gg/gvr98nb
📜 Udemy: https://www.udemy.com/course/become-a-video-game-developer-with-gms-23/ (See youtube about page for discount)
CHAPTERS
-------------------------------------------------------------------------------------------------------
0:00 What we will do
0:34 Create an effect layer and set it to screen shake
0:54 What magnitute and shake speed mean
1:20 Toggle sceen shake on/off by setting it to visible/invisible
2:07 Game shown - Narita Boy