![Easy to do tileset collision [Game Maker Studio 2 | Basics]](/images/yt/b4/easy-to-do-tileset-collision-game-maker-studio-2-basics-njosd.jpg)
Easy to do tileset collision [Game Maker Studio 2 | Basics]
This basics video tutorial shows you how to setup a solid collision system with a tileset/tile in GameMaker Studio.
The idea is quite simple. You check on each side where you want to go on two points of the bounding box if you would clip a tile of the tilesets. If no, movement is allowed. That's it!
Disclaimer: This robust system is only applicable if you use round (integers) numbers for movement and a square collison box for the moving instances (player, enemy ect. ). There will be an advanced video showing how to circumvent these limitations.
The creation and step code (of the player) is in my first comment.
👑 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)
--------------------------------------------------------------
0:00 What we will do
0:52 Subscribe
1:01 Theory how it works
2:17 Setting up the tileset for collision walls
4:18 Coding the player to move when not colliding with tiles