Move_and_Collide - Hyper speedo, in detail [Game Maker | Basics]

Channel:
Subscribers:
12,200
Published on ● Video Link: https://www.youtube.com/watch?v=oHgGEZ5Kt2U



Category:
Tutorial
Duration: 28:28
2,762 views
102


This basics video tutorial shows you how to setup with the new move_and_collide function a platformer with slopes in GameMaker.

To be very frank this is a first shot of making a platformer easyier to build with the new move_and_collide function from the recent 2023.1 update.

The idea behind move_and_collide is very simple. You put in a dx, dy value which are prediction points where to move to (speed values or fix points or simply a number). It goes as followes, the first input value (dx) is taking the current bounding box of the instance (player, etc.) and adds to that the dx value and checks if there is an collision, if not the player will be moved there. This process is being splitted up into an internal iteration of pieces sliced up of the total input value dx (partly move, check collision, if not move partly, check for collision and so on). Same goes for the dy value also but this time vertically. There are other input values like xoff/yoff and these just are an anstruction (push upwards/sideways) what to do if we are colliding/clipping. The last input values are max_x_move/max_y_move and are basically maximum speed values and prevent hyper speedo shown in the video.

Note: This is an first attempt to unify the system into a platformer setup but as it seem, this is "okay" but not perfect for all situations. So if you got a better fix or a good idea how to make the whole thing universally useable, I would love to hear and share it with the community.



πŸ‘‘ 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)


CHAPTERS
-------------------------------------------------------------------------------------------------------
0:00 What we will do
1:28 Subscribe
1:40 The new function move_and_collide
2:16 How collisions work with instances
2:43 What move_and_collide is doing
4:40 Setting the platformer in GameMaker with walls/slopes
6:23 Setting the player up for horizontal movement, get input
7:13 Setting the player up for horizontal movement, set horizontal speed
7:45 Apply horizontal input with move_and_collide
10:17 Setting the player up for vertical movement, have a constant force downwards
11:07 Setting the player up for vertical movement, clamp the result downards value
12:28 Hyper speedo enabled, we need to counter mixed up speeds
13:15 What the number of iterations value of move_and_collide means
13:15 What xoff/yoff of move_and_collide do
15:20 Avoid hyper speedo by clamping horizontal total speed
15:54 Add jumping
18:40 Reduce jumping to be available only when on ground
21:40 Optional part
28:04 Fail, next time 1up Indie don't disabled the other video layer when rendering the video







Tags:
game maker tutorial
game maker studio tutorial
gamemaker studio 2 tutorial
game dev
game developer
move and collide tutorial
move and collide gamemaker
move and collide gamemaker tutorial
move and collide platformer
gamemaker platformer
gamemaker sidescroller
gamemaker studio sidescroller
gamemaker sidscroller tutorial
gamemaker platformer tutorial
gamemaker slopes
gamemaker slopes tutorial