HTML5 Game Development with Phaser Lesson 3 - Moving object with arrow keys

in #utopian-io7 years ago (edited)

What Will I Learn?

  • You will learn how to define objects as keyboard listeners in the create() function.
  • You will learn how to use if statements to evaluate the isDown property of the keyboad objects in the update() function to decide what happens when these keys are pressed.
  • You will learn how to change the x and y properties of the player object to move the player.

Requirements

Make sure you already have the understanding of the following concepts (which you would have learned in Phaser lessons 1 to 2).

  • You are able to import the Phaser library and set up dimensions of a level.
  • You are able to import sprites into the game.
  • You have an understanding of the three main functions called in a game.

Difficulty

  • Intermediate

You should already have some understanding of Javascript as the Phaser library is built on Javascript.

Description

In this series of lessons, we are going to code our first HTML5 / Javascript game, using the Phaser library. The source code of this lesson (and subsequent lessons as they are uploaded) can be viewed on Github at: https://github.com/Bulletproofmonk/PhaserGameTutorial

Video Tutorial

Curriculum



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Hey @magicmonk I am @utopian-io. I have just upvoted you!

Achievements

  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Good project. resteemed :)

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]