Getting some credit

Everyone likes to get credit for their hard work! Most games will implement a credits screen that shows the name and function of each person involved in creating the game. For AAA titles, this list may be as long as a list for a movie. For smaller, independent games, this list might be three people.

Creating the credits screen

Similarly to the main menu, the credits screen will be based on a background image and a button that can be clicked. We will also need to add text to the screen.

Let's start by declaring a pointer for our screen. Add the following declaration to the variables section of RoboRacer2D.cpp:

Sprite* creditsScreen;

Then, we will instantiate the credits screen in LoadTextures:

creditsScreen = new Sprite(1); creditsScreen->SetFrameSize(800.0f, ...

Get OpenGL Game Development By Example 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.