• Hey! Guest! The 39th GMC Jam will take place between November 26th, 12:00 UTC and November 30th, 12:00 UTC. Why not join in! Click here to find out more!

That feeling when Game maker is acting weird

Hey! I hope you guys are having a nice day today! I dont wanna be much of a bother so imma just get to the point, im 13 and just got into coding ive been following this guy Shaun Spalding and recently finished episode 12 (also heads up I have NO experience with coding before this lol) anyway episode 12 is about z height and shadows, and at the end of the video in the draw event he told everyone to wrap our x's and y's in a floor event like floor(x) floor(y-z) etc, however this made my character jitter when walking diagonally. I looked through the ccomments of the video to see if anyone had the same problem, and somebody did, they said to remove the floor event, so i did. andddddddddd. NOTHING, HAPPENED. I looked through E V E R Y T H I N G and could not find a problem, i even deleted the draw event all together and somehow it was still there. I need help, can anybody, please?
here is my draw event
draw_sprite(sShadow,0,x,y);

draw_sprite_ext(
sprite_index,
image_index,
x,
y-z,
image_xscale,
image_yscale,
image_angle,
image_blend,
image_alpha
)



even if you think there is a better way to do this, please help!
 

ThraxxMedia

Member
You're probably looking at the wrong place to eliminate jitter. The x and y within the draw_sprite_ext function have already been determined by your movement calculation in the step event - make sure you don't have any flooring in there as well. A thing to note: while moving instances for fractions of pixels at a time may appear smoother, the flipside is that it'll likely introduce issues with collision detection down the line. You may want to keep that in mind.
 
Thank you! But i checked and it is not added anywhere else, any suggestions/is there a better way i could have typed this?
 

ThraxxMedia

Member
Is your view set to follow the player object? If so, remove that and look for a way to implement smooth camera movement (Shaun Spalding has tutorials on that as well). Otherwise, I can't really think of anything else with what little information you provided. It would help to be able to see - in a gif or 10s clip or so - what exactly the issue is.
 
got it

it will not let me send one, but ill describe as best i can. Basically when moving diagonally whenever i go up THEN left or down THEN right etc i was start shaking slightly and it will look like some of my pixels are moving back and forth between 2 pixels.

also this is just the sprite my camera is not the thing shaking

and thank you for your patience im sorry for being such a noob :(
 

ThraxxMedia

Member
No worries. Maybe try to send an attachment via private message (hover over my username and click "start a conversation").
Most errors like this, especially when developing alongside online tutorials, come from some sort of oversight or slip of the pen.
So what I'd definitely recommend is double-checking that you've done everything the exact same way as the tutorial did.
Even if that means going back to square one.
 
Last edited:
Top