FAQ: Learn Phaser: Basics - Keyboard Events

This community-built FAQ covers the “Keyboard Events” exercise from the lesson “Learn Phaser: Basics”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Learn Phaser

FAQs on the exercise Keyboard Events

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

I was able to move Codey aound as directed. Fun! So I would like to know “how would you make Codey accelerate speed after moving in the same direction for a few frames?”
Thanks -

Look into transition and easing, for some insight into this. We can choose the curve that describes our transition speed at various times for 0 to t.

Define a direction variable and increase speed if the direction is identical on update and reset speed if not.

I wrote the code as it was instructed but when I ran the code Codey was not showing can anyone please help me?


I’m new to coding.
Has anyone worked out how to accelerate after moving a few frames?
I have been looking around and there seems to be many ways to accomplish, but I can’t quite work out how to implement.
Any insight would be great!


so am when you turn a number to negative it goes the other the way insted of being slow i was just messing around and i found out