Tilemap Collisions


So... I started to make the basics of a game I am going to work on. It'll be a platformer and I want to use tiles as colliders in Game Maker: Studio.

So why not objects? Well, objects are not that easy to handle, you need to place them manually in the editor. You may miss some walls. Or you may use way too much. Objects are more expensive than tiles. And just using tiles means I don't have to deal with other collisions. Yes, I could write a script that generated collision rectangles around the scene, but why would I? Also what's with a HUGE level. I could use object deactivation there, but again, this is a lot more simple.

About the performance, and I don't want to name the game, but I play a game a lot on my Youtube channel which was made in Game Maker and uses objects as colliders and it's a RAM and CPU hog. Handles big levels hardly. And since 1.0, it was optimized a LOT. And still... far from great.

This system uses a ds_grid and some simple bounding box calculations. That's it. I'm sure, it is a lot faster than using objects. Memory usage is acceptable too. Now, currently I have some precision problems with the y-axis, I'm gonna fix it. But feels responsive in the current state.


Tilemap Collisions Play in browser
Nov 02, 2017
Tilemap Collisions (Win32) 2 MB
Nov 02, 2017

Get GM:S Tile Collision Test Engine (early WIP)

Leave a comment

Log in with itch.io to leave a comment.