Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Grid movement isn't working properly?

Jason

Awesome Bro

Okay, so for my next college assignment, which has to be in tomorrow by the way, I've been making a maze type game...

But I'm trying to make it move in 64px intervals, much like RMXP/VX does, but obviously twice the area, the reason being is that I'm using big graphics, lol.

Anyways, I'm pretty sure I've got it right, since I've followed the same thing I used on an earlier project I made, that moved in 40px intervals, the problem being this time is, it just doesn't work.

The player moves in the direction pressed, but doesn't stop after 64px, he just carries on going for like, 320px, and it's annoying.

The project is here if anyone would like to take a look, please don't take my stuff, although there's not much there, lol...

[Removed link]

I'd appreciate any help given!

PS. If anyone could fix the animation speed of the movement too, that'd be nice and save me a little time, thanks.
 
I'm honestly not too sure how the "Move Fixed" command works (as I haven't played around with it too much in the past), but changing the speed from 5 to 4 seems to have solved the problem. In terms of animation speed, the best way to change that is to go into Edit Sprite > Animation > Stretch. Making it 10 seemed to create a smooth animation, so that's what I left it at.

Here's the upload with the changes.

Should be working fine, but let me know if you have any other problems. :wink:
 

Jason

Awesome Bro

Thankyou SO much Guardian! it works perfect now!

And you know what's funny, I've just realised the problem after you told me... if the speed is 5, that isn't a multiple of 64, so it'll keep moving in that direction till it finds co-ordinates on the grid that it can relate to, in this case it was 320px, but now that you've changed it to 4, it can find the 64px square grid area, and stick to that... if that makes sense at all, I know what I mean, but can't explain it.

Again, thankyou so bloody much!
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top