Uploaded March 2021 | Updated September 2026, 1 week ago
Hi! Today we'll cover how to add Camera Shake to your game using Game Maker Studio 2.3. In particular we'll implement this using animation curves, which allows us to make the shake pattern follow the enemy impact more closely.
For today's animation principle we'll cover Exaggeration. In addition to having enemies fall from the sky, we use this animation to exaggerate how the enemies are perceived. Adding the animation makes them feel bigger, heavier, and scarier (all without changing any of their gameplay properties)
0:00 Intro
1:53 Initial Camera
3:15 y Animation Curve
4:13 y Implementation
7:35 Room Padding
10:31 Trigger Animation
13:06 x Implementation
14:43 Outro + Animation Principle
Starting Project
github.com/ArendPeter/CastleGame/tree/59300aaf9d158d9acd460215b44e92d4f5f5c7cd
Ending Project
github.com/ArendPeter/CastleGame/tree/6a375bcd3eea80adb3ea9bc6b3e7745c43a0a30c
Triggers Tutorial
youtube.com/watch?v=Sik3IA0FS4o
Camera Tutorial
youtube.com/watch?v=83gFT3mGb5g&t=836s
Animation Curves Tutorial
youtube.com/watch?v=V-4FeNFFC7M
StepTowards Script
gist.github.com/ArendPeter/42f1ba6971d21b973cd50127a4ea16c9
ShorterCamera Script
gist.github.com/ArendPeter/6958b62c29e1d430a9c8d82fd949e0cd
Camera Transition Tutorial (companion)
youtube.com/watch?v=wlJ5jItZWCY
Animation Curves Playlist
youtube.com/watch?v=V-4FeNFFC7M&list=PLywxFF6tce1-Y8teVEtN_W9zXJlhGlkH2
Animation Principle: Exaggeration
youtube.com/watch?v=HfFj-VQKiAM&list=PL-bOh8btec4CXd2ya1NmSKpi92U_l6ZJd
Office Hours Submission Form ( for helping debug your projects on livestreams :) )
https://forms.gle/Mp2258ZBNhFShr548
Tutorial Submission Form
https://forms.gle/9N6UpX2YiLmeb1Sw8
Hi! Today we'll cover how to add Camera Shake to your game using Game Maker Studio 2.3. In particular we'll implement this using animation curves, which allows us to make the shake pattern follow the enemy impact more closely.
For today's animation principle we'll cover Exaggeration. In addition to having enemies fall from the sky, we use this animation to exaggerate how the enemies are perceived. Adding the animation makes them feel bigger, heavier, and scarier (all without changing any of their gameplay properties)
0:00 Intro
1:53 Initial Camera
3:15 y Animation Curve
4:13 y Implementation
7:35 Room Padding
10:31 Trigger Animation
13:06 x Implementation
14:43 Outro + Animation Principle
Starting Project
github.com/ArendPeter/CastleGame/tree/59300aaf9d158d9acd460215b44e92d4f5f5c7cd
Ending Project
github.com/ArendPeter/CastleGame/tree/6a375bcd3eea80adb3ea9bc6b3e7745c43a0a30c
Triggers Tutorial
youtube.com/watch?v=Sik3IA0FS4o
Camera Tutorial
youtube.com/watch?v=83gFT3mGb5g&t=836s
Animation Curves Tutorial
youtube.com/watch?v=V-4FeNFFC7M
StepTowards Script
gist.github.com/ArendPeter/42f1ba6971d21b973cd50127a4ea16c9
ShorterCamera Script
gist.github.com/ArendPeter/6958b62c29e1d430a9c8d82fd949e0cd
Camera Transition Tutorial (companion)
youtube.com/watch?v=wlJ5jItZWCY
Animation Curves Playlist
youtube.com/watch?v=V-4FeNFFC7M&list=PLywxFF6tce1-Y8teVEtN_W9zXJlhGlkH2
Animation Principle: Exaggeration
youtube.com/watch?v=HfFj-VQKiAM&list=PL-bOh8btec4CXd2ya1NmSKpi92U_l6ZJd
Office Hours Submission Form ( for helping debug your projects on livestreams :) )
https://forms.gle/Mp2258ZBNhFShr548
Tutorial Submission Form
https://forms.gle/9N6UpX2YiLmeb1Sw8








![Stackable Inventory Part I Game Maker Tutorial
In this tutorial Ill be showing you how to create a stackable inventory in game maker. This technique is used in a variety of different games such as minecraft, runescape and pokemon.
Music by docjazz4
FAQ
Q: Can you put up a download link?
A:Sure I guess I can do that
http://www.mediafire.com/download/05vb89vhr0ds8zj/sourcecode2.gmk
Q:
ERROR in
action number 1
of Collision Event with object obj_player
for object obj_item:
Error in code at line 16: obj_invcontrol.inv[slot,0]=index ^
at position 25: Negative array index
When my inventory is full and I try to pick up an item the game crashes, how do I fix this?
A: Sorry in the left pressed event of obj_item I have 2 for loops, one to check if there are any matching items in the inventory and another to check for empty slots if there arent any like items in the inventory. The slot variable is set to -1 if it hasnt found a slot yet so if it makes it through both loops it will try to add 1 to the -1 index in the inv array. The problem with that is that you cant have negative indexes in arrays and therefore the game crashes.
In order to fix this replace the last 4 lines in the code to the following if slot! 1{ control.inv[slot,0]=index }
}
if slot! 1{ control.inv[slot,1]+=1 instance_destroy()
}
Q:
ERROR in
action number 1
of Draw Event
for object obj_slot:
Error in code at line 2: draw_sprite(control.sprites[control.inv[index,0]],0,x,y) ^
at position 14: Unknown variable control
How do I fix this?
A: This is a rather tricky error and it took me a long time to figure out what the problem was. Even if you coded everything exactly as I said its still possible for you to get this error. Whats happening is obj_slot is created in the room before the control object. So at the instance obj_slot is created it tries to find a variable in control but it cant because control doesnt exist yet.
What you need to do is ensure that control is created first. So go into your room, remove all the slot objects and ensure that the control object is there. Leave the room then go back and readd the slot objects. This way you added the slot objects to the room after the control object which will create the control object first
Q:
ERROR in
action number 1
of Draw Event
for object obj_slot:
Error in code at line 2: draw_sprite(control.sprites[control.inv[index,0]],0,x,y)
^
at position 38: Unknown variable inv
A: People have been having this problem for a months, but Ive only recently figured out what the issue is, you might not have initialized your variables correctly but usually people forget to add the control object to the room. I guess I went through that a little fast in the video or something. Do NOT add obj_item to the room but be sure to add control Stackable Inventory Part I Game Maker Tutorial](https://i.ytimg.com/vi/Iy_ei_BXfV0/mqdefault.jpg)

