Тёмный

How Collisions Work in GameMaker Studio 2 

Let's Learn This Together
Подписаться 11 тыс.
Просмотров 11 тыс.
50% 1

Basics of Collisions in Game Maker Studio 2
In almost every game, you'll need some sort of collision checking. Today, let's tackle basic collisions using place_meeting, collision masks, and while loops. We'll create a great system for use in prototypes and final games with just a little bit of code!
My Exclusive Courses💻🎮:
Bundle Course Package & More Here! www.letslearnt......
Game Dev In 30 Days 📖 💻😀
I'm really excited to announce that I am writing a game development book for beginners!
I am deeply motivated and invested into making this an awesome fun book for beginners interested in learning game development!
Click the link to our KickStarter for more details! www.kickstarte...
Social:
Connect with me on Twitter @Aaron_LLTT: / aaron_lltt
Become a valued Patron and receive more exclusive perks @: / letslearnthistogether
Wanna hear from other developers in the industry? Head on over to my podcast, DevTalk, to listen to engaging conversations I have with various successful developers: devtalk.buzzsp...
Now on Instagram 📸! Follow here for more content and sneak peaks! / letslearnthistogether

Опубликовано:

 

29 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 22   
@chadcoyle
@chadcoyle 3 года назад
I understand this kind of basic collision well, but for the more advanced video(s), I'd love to understand how to code things like jump-through slopes and platforms that rotate dynamically while the player is standing on them. Great video covering this as it is!
@LetsLearnThisTogether
@LetsLearnThisTogether 3 года назад
Great suggestions! I’ll add them to my list.
@mopspear
@mopspear 2 месяца назад
I found this to be really helpful but I want to suggest a change. Instead of using a while loop, I found that using a for loop that runs some arbitrary number of times is a better idea. It won't lock up if the collision suddenly become impossible, or you did something wrong with your code so that the while loop never completes. With a for loop, the worst that can happen is the collision doesn't completely touch what it is supposed to. It's better than being locked. I avoid using while loops whenever I can.
@Starmanstriker
@Starmanstriker 3 года назад
How would you go about smooth collision? Like sliding against a diagonal from any direction or custom shapes.
@LetsLearnThisTogether
@LetsLearnThisTogether 3 года назад
If you add a few more while loops to check for both x and y speed increase, that will take care of diagonal. Custom shapes can be done by setting the collision of objSolid sprite to precise per frame, and then add more sub frames of those specific shapes.
@thebreadenjoyer6057
@thebreadenjoyer6057 Год назад
This video is so underrated. This is the only wall collision video that I have found that actually works and makes sense. I'm a complete beginner to all of this and your videos are really helping me.
@lytningthief
@lytningthief 2 года назад
Hi! So I use the same collision code you taught here but I'm having some difficulty with what I believe is called "Sub-Pixels." Basically when my character lands on collision blocks there's either a teensy bit of space between him and the block (not a full pixel) or his feet have sunk into the ground by roughly the same amount. It's not enough to get him stuck or anything but it seems to be interfering with sprite changes that require pixel perfect collisions. Any idea how to fix this?
@Joxlol
@Joxlol 10 месяцев назад
Man, you can't believe how long I struggled to find a solution for my collision (it were like 2 hours today, but I like to move fast forward). Thanks a lot, well explained, much appreciated!!!
@papercut-channel
@papercut-channel 9 месяцев назад
Not sure if you're still active here, but wonderful tutorial! Although, I can't seem to figure out how to get diagonal collision working for the life of me.
@burnoMello
@burnoMello 7 месяцев назад
Saved my life, man. I am a beginner dev trying to figure out collisions and a bunch of other physics problems and this tutorial was clean, easy to follow. Thank you so much.
@SGTIvan921
@SGTIvan921 7 месяцев назад
Timestamp Reference: 10:26 Getting stuck phenomenon (Cause of it: Collision mask changing since the sprites are different when you face a different direction) 11:26 The solution 12:18 Making the character go up to the wall instead of stopping weirdly
@light9808
@light9808 2 года назад
Great video!
@cactus7022
@cactus7022 Год назад
I know it's been a long time, but... if I want the character's sprite to be above the table when he's in front of it, but when he's behind the table, then the character's sprite would be behind the table's one. How to do it?
@LetsLearnThisTogether
@LetsLearnThisTogether Год назад
You’ll need to change the depth of your player as they move. I believe the traditional and easiest approach is depth = -y, and apply that to every object in your game. Then the player will appear in front when they’re below it, and behind when they’re above.
@Vampiric_Kai
@Vampiric_Kai 3 года назад
I love your gamemaker tutorials
@LetsLearnThisTogether
@LetsLearnThisTogether 3 года назад
Thanks!
@cronical246
@cronical246 3 года назад
How would this work if I use set direction instead?
@LetsLearnThisTogether
@LetsLearnThisTogether 3 года назад
Same idea. Just calculate where you’re moving based on speed and direction.
@jhmxk
@jhmxk 2 года назад
how would this change if the direction your character is facing is controlled by your mouse?
@MACnTOOL
@MACnTOOL 3 года назад
"it sounds like i am beat-boxing but i am not"
@coxyofnewp
@coxyofnewp 3 года назад
What happened to video you posted yesterday and now it private? Keep up the great content.
@LetsLearnThisTogether
@LetsLearnThisTogether 3 года назад
It needed some edits. Pulled it. It will come out Monday. Keen eye!
Далее
I Took An iPhone 16 From A POSTER! 😱📱 #shorts
00:18
Ответы Мэил Ру
01:00
Просмотров 1,1 млн
Bearwolf - GODZILLA Пародия Beatrise
00:33
Просмотров 221 тыс.
Common Mistakes Beginners Make In GameMaker
9:58
Просмотров 3,3 тыс.
GameMaker Studio 2 - Tileset Editor - Overview
12:55
Просмотров 23 тыс.
GameMaker Tips & Tricks For Beginners 2023
19:39
Просмотров 5 тыс.
I redesigned my game
23:32
Просмотров 6 тыс.
Creating & Changing Rooms in GameMaker 2.3
23:19
Просмотров 28 тыс.
Day in the Life of a Japanese Game Illustrator
17:04
Просмотров 4,2 млн
It's Hard To Make Games
18:01
Просмотров 251 тыс.
I Made My First Game in Godot in 3 Weeks...
26:21
Просмотров 371 тыс.
I Took An iPhone 16 From A POSTER! 😱📱 #shorts
00:18