I've no idea of any tutorials etc. on this (probably a bit specialist for tutorials) but just thinking of it from a programming point of view.
Set up an array for the maze, eg:
$maze[0,0]=W;
$maze[0,1]=P;
etc.
where W represents a wall and P represents a path, so your maze could be something like:
Code:
WWWWPWW
WWWWPWW
WWPWPWW
WWPPPWW
WWPWWWW
Start the user at a location (e.g. 5,3) and do the following:
Code:
Check that they are on a path (if not there is an error so exit)
Check the current position against the 'end' position. If it matches, show a success screen
Check square to left - if it is W or has a value less than 0 set $leftwall to true
Check square to right - if it is W or has a value greater than the width of the maze set $rightwall to true
Do similar code for $frontwall and $backwall
Now output the grapics
Code:
If $frontwall=true output a wall in front of the user, if not output a path
Do the same for left and right
Now get the user to press a key. Take this keypress and check if it is a valid move, e.g.
Code:
If $userkey=left then check that leftwall is false.
Now decrement the value for the column position in the maze
Return to the beginning
etc.
Of course thats just some pseudo-code to get you started. I've no idea how to do this in Flash! I expect with that, though, it will give you a better idea of what to look for in Flash.
__________________
Please login or register to view this content. Registration is FREE - Everything a webmaster needs - for free
Please login or register to view this content. Registration is FREE - Free web hosts reviewed and rated
Please login or register to view this content. Registration is FREE - Impartial hosting directory - Add your host today for FREE
|