In Chapter 1, Game Plan – Creating Basic Gameplay, we demonstrated the basic character movement using GameMaker's drag and drop interface. It involved a lot of blocks. Next, we will create more sophisticated movement code in only a handful of code blocks.
You'll need a character object (
obj_player) and a room where you can place it. We won't be discussing the object's sprite or animation here; this is purely about moving your character in two dimensions on the screen. For this reason, we're using a simple block to represent our player character.
obj_player, add a Create event.