NEW UPDATE COMING SOON! JUST WAITING ON YOYO SERVERS TO STOP BEING STOOOOOPID --Check out the new demo--- https://pixelatedpope.itch.io/tdmc
The perfect top down collision system!
Are you working on a top down game? Something like Binding of Isaac, Zelda, or Secret of Mana? Do you want your character to slide along ramps and walls smoothly. Do you want to use ANY movement speed; From 1, to 2.45, to 18, and even higher? Do you want to use the same collision code for all characters (players, enemies, npcs, bosses)?
This is the system for you!
With a single script, you can move your character around your room with perfect world collision! All you need to do is provide a direction to move and a speed to move at and you are done!
The system is completely independent of controls! If you are new to game maker or have done any research into basic collision detection, maybe this code looks familiar to you:
if(keyboard_check(vk_right) && !place_meeting(x+1,y,obj_wall));
When you bind your world collision to your controls, you are very limited in what you can do. What if you want to knock your player back from taking damage? Now you have to write new collision code to handle moving without pressing any buttons!
How about this?
Call that in your step event and your player will move and collide flawlessly!
Still not convinced this is the system for your game? Try the Demo right in your browser here: https://pixelatedpope.itch.io/tdmc
(Updated tutorial coming soon™, but the old boring one linked above is still mostly relevant.)
Added a fix that created odd behavior when a move speed not equal to zero was passed to the script with a -1 direction. In either case (0 for speed, -1 for direction) the script should simply make sure we aren't currently stuck in a wall and then break out. It now does that.
Massive Overhaul -Updated Script allows better support for all angles and shapes of collisions -Updated example project showcases basic movement, momentum based movement, and analog controls.