I’m currently making a kind of port of an old game called Chip’s Challenge in flash. It’s a tile-based puzzle game.
I’ve made my array and got the map working, however now that I’ve got to adding a playable character, work seems to have halted. I’m following Tonypa’s tutorials (http://tbg.tonypa.pri.ee/start.html) but I can’t seem to get the movement mechanic right and adding the code for the character is messing up too.
Files are attached.
The movement mechanic is turn-based, so Chip moves one tile (32 px) up/down/left/right with a single keypress. The player cannot hold down directional buttons to keep chip moving - one must repeatedly mash the arrow keys, and there is a short pause between each ‘turn’ so that Chip can’t move one tile every single keypress (i.e. he can move 1 tile with 1 keypress in .25 secs).
This is the mechanic I’m aiming for. If you want to understand it better you could probably find Chip’s Challenge somewhere online (it’s a fun game either way).