• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Collision for platformer not working

S

SashoTAI

Guest
So I was going to make a platformer and after a bit of digging I managed to code in the gravity and (hopefully) the jumping. I just can't figure out how to make the floor (obj_block) collide with the player and stop it falling trough. Any ideas? I'm using GML by the way and I've finished the arena shooter game with code and D&D. I do prefer to use GML, tough.
EDIT: I'm using the trial version of game maker studio 2 for now.
 
Last edited by a moderator:
S

SashoTAI

Guest
You tried checking the 'solid' checkbox for obj_block?
I just tried it and it works except:
It's a few pixels off, probably just collision mask.
I can't move it when it touches the instance of obj_block
It stays on for a few seconds and then goes off screen really fast
 
S

SashoTAI

Guest
Watch a few of these tutorials:
Mix - Game maker platformer:
I was going to but he uses game maker studio 1.x so i'm not sure if it will still work. i will try tough, thank you. :)
 
S

SashoTAI

Guest
Thanks to everyone who helped me! I finished my first platformer game! :banana::bunny::D
 
Top