O'Reilly logo

HTML5 Game Development HOTSHOT by Makzan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Choosing a level

In this task, we create a scene that lets the player choose which level they want to play.

Prepare for lift off

We have defined many levels with different types of obstacles. The following figure shows the structure of the LevelSelection symbol:

Prepare for lift off

We also create a ScoreBoard symbol that contains a text field:

Prepare for lift off

Engage thrusters

We have prepared the graphics. Let's work on the code to add the level-choosing logic:

  1. This is something related to the view, so we will put the code in the view.js file. The graphics are already defined and exported. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required