wardormeur
cake-eater-sushi-love2D

Updated 2 years ago

Pete O'Shea (@petecoderdojo) started discussion #13

2 years ago · 0 comments

Open

Now, we want our character to move around ! To do that, we're going to map the directional arrows from your keyboard to move our player around our game. First of all, create 2 variables for the user's position. A position of a player is based on a grid with 2 values : X (the horizontal position) and Y (the vertical position). Let's also add a speed to it, which we'll use just after to smooth up the mouvement.

Game basics : the world (Edit this file)

Movement :P

No description provided.
Pete O'Shea @petecoderdojo commented 2 years ago

Where do I add this code?

Pete O'Shea @petecoderdojo commented 2 years ago

Explain that this is setting movement default as step 1 then step 2 etc

Pete O'Shea @petecoderdojo commented 2 years ago

Step two explain that we are setting the values for plater.x and then using this as the starting point for the draw function


to join this conversation on GitBook. Already have an account? Sign in to comment
Notifications

You’re not receiving notifications from this thread.


1 participant