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 which building to build

In this task, we let the player choose three types of buildings to create. These buildings are the power supply, coins generator, and merchant building. We create a building panel interface for this purpose.

Prepare for lift off

This is going to be a long task. The following screenshot previews what we are going to archive in this task so that we have a better understanding when reading the code:

Prepare for lift off

The button image follows a common practice in web design. We put the normal, hover, and active states into one image. Let's prepare the image files. Insert the following images files inside the project folder. We will take ...

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