Comments

Log in with itch.io to leave a comment.

Viewing most recent comments 1 to 5 of 45 · Next page · Last page
(1 edit)

From my point of view everything that the code pre disposes works perfectly, I feel like a neanderthal for not understanding how each thing works and fits together, and for sure many questions, but if I could ask one, I would love you to make a complete video about all the possible types of problems with shaking in the movement of the sprite (in any direction), I see that there are several problems on this topic of gamemaker 2 and it really surprises me how much I need to research to go deep into it, so that’s it, note 10 for your code and thank you very much for offering it, and sorry for my horrible english.

Most jittering comes from camera related issues.

First, people using the built in "object following" camera in the room. That camera is locked to whole numbers only. So if you have a higher resolution application surface and your character moves in non-whole numbers, then the character will move a fraction of the pixel, and then the camera will later jump when they reach a whole different pixel; creating jitter

But even with a custom camera it's possible for jitter to be introduced because of the nature of floating point math and rendering on the GPU. If the camera is in a specific place and the object is in a specific place, it's possible for it to render a sprite one pixel shifted just because of floating point math. And this can change rapidly with very small changes in the position of either object.  To combat that, I use a script that makes sure that the position of the view is rounded to the nearest multiple of the application surface ratio.  So if your view is 100x100 and your app surface is 400x400 I make sure the view position is always a multiple of .25; And you can use the same concept for drawing sprites (though I've never needed to do that. Typically it's enough just to fix the camera)

question: my character collides fine now, but when colliding they then slide endlessly into the void. I think this has to do with the move.spdDir in my script. 


move.spdDir(moveSpeed, inputDirection);


i have it like that due to when adding it how you have it listed above, I receive errors and am unable to run the game. I'm unsure how to fix, I've tried deleting this code but it breaks the collision entirely.

tried changing to xSpdySpd and changing what's in the function as move.spdDir(vSpeed, hSpeed); but every time it just causes the player to endlessly skate. I'm not sure what to place in the () to prevent sliding and errors

I am a moron, changed it to move.spdDir(0, 0) and that fixed it jesus i'm so stupid

(+1)

lol. Glad you got it working

Appreciate everything you do, PixelatedPope! Woulda been lost without this collision code

se puede usar para game maker 2.3.7

??

Yeah, it should work in any version after 2.3
Give it a shot and report back!

I've been struggling with my collision code, this worked flawlessly once i figured out how to apply it. thank you.

hey i hope your still reading the comments, how do you do *both* tile & object based collision?

Viewing most recent comments 1 to 5 of 45 · Next page · Last page