Wednesday, October 27, 2010

Moving a character

To basically make a character  move youy need to create 4 different algorithms. Each for the separate directions that you need to go(right left, up and down)
Firstly you put the "when ___key is presses"[The basic keys that are widley used are the left arrow, right arrow, up arrow and down arrow] . This is so that the person has a choice of where to go and this certain key will instigate the algorithm associated with it.
Then we need the "point in direction___". This is to change the direction of the sprite so that it will go to a specific direction.
Then we need to put the "move__steps". this makes the sprite move__steps in the direction they were turned to in the previous command.

That is basically how you make your cahrater move.

 

No comments:

Post a Comment