GameMaker New way to drop through platforms

O

Obj_Neil

Guest
GM Version: GMS2
Target Platform: ALL
Download: N/A
Links: N/A

Summary:
I haven't seen anyone go about doing it this way. I show an easy way to have player drop through platforms by using a simple timer and change state. I haven't been able to find any issues or bugs with this method.

Tutorial:
 

chance

predictably random
Forum Staff
Moderator
The video snippets don't offer much detail or context. But your code looks organized.

However, your explanation about falling through platforms is not very organized. The explanation is interspersed with other aspects of your state-machine approach. So one gets the impression you're explaining this for the first time, without much planning. That said, experienced programmers should be able to follow it.

As you said, your technique doesn't really require a full state machine for every player action. A simpler approach that toggles a "collision enable" flag should work too. Not altogether different from more traditional approaches to this problem.

But overall, this seems fine. Just a bit rambling.
 
O

Obj_Neil

Guest
Thanks for the feedback. I tried to give a quick overview for those that don't need anything explained in the beginning, then go into a bit more detail for those that might need it.
 
N

NeZvers

Guest
I prefer different method - collide if player been above and if wants to drop through save ID of the platform and clears ID if it’s safe for not collision rules.
EDIT: I got an even better system working for my grid collision system. Pretty simple if feet are above (free or not in same platform type tile) and pixel bellow + vsp (vsp>=0) is inside platform tile, then snap to platform tile top. Also bypass this with - if not (jumpButton and downButton).
 
Last edited:
Top