Grid based movement

Does anyone know of a template or general idea for grid-based movement? The Boxed-In games and many others employ this.

My primary thoughts are to create a 2d array that holds numbers corresponding to corridor/wall/water, etc. Then give my character an x position and y position value, and so for example, if I press the button to go right, I check the x+1 position in the array and if it returns the number for corridor then I do a transition/animation on my character and update the position values. Am I close? (In my game there is no "physics" involved, just positional logic). At any rate a tutorial would be useful.

Thanks!
Dane
aka dogfish apps

p.s. I just went pro with Corona! This company and community is phenomenal!

Hey Dane,

Your method sounds solid :)

I'm not aware of any tutes or templates that employ this but will certainly keep my eye out for you.

Grats on going Pro! :D

Peach :)

views:1669 update:2012/1/15 11:04:51
corona forums © 2003-2011