grid based movement using list entries as grid coordinates need help!


  • Posts: 19
i have recently been making an rpg game that uses grid based movement. i created scene behaviour that makes a list with an entry number for each square in the grid which are all labeled 0 (unocupied).when the move controll is pressed  my actor checks if the list entry for the square in front of him is a 0 or a 1(ocupied) and either steps in that direction if its a 0, or turns to face that direction if its a 1. I created an actor type that when created marks its own coordinates as occupied so the actor couldnt go there.  i needed the actor to have a solid square in the space that it was stepping into and when still, one underneath it. i made it replace the list entriy of the space in front of the actor with a 1 in the stepping event aswell as marking the old space with a 0. this all works fine.

when my actor walks up or left it is extremely laggy but not when it walks down or right. why is this?

go to:  to see what i mean.

« Last Edit: May 04, 2014, 01:03:02 am by HerringTin »


  • *
  • Posts: 2469
I've gone through the code, and while there are definitely some optimization issues that are slowing you down, there is nothing that would cause special lag for up or left. Thus, I tried the game; I didn't get any special lag for left or up in the game when I played it. It could just be a fluke on your computer.
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (,16160.0.html)