Implementing the Main Screen

What you want now is the ability to start your game via the user interface you're about to create. See Figure 12.1 for an example of what the main screen will look like.

Figure 12.1. The main starting screen for Tankers.

How can you use the classes you've already created to make this screen a reality? For this case, it's pretty simple. The majority of the screen consists of a single background (which is the user screen) with two simple buttons on it. If you look at the texture for the buttons, you see that it has quite a few buttons on it, as shown in Figure 12.2.

Figure 12.2. The button texture.

Each button has an ...

Get Beginning 3D Game Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.