Drawing the Scene

a) something to draw – which is going to be our dds sprites (or textures) b) a start position

In our game we’ll draw the following things on the screen

The Background at 0,0 where 0,0 is the top left corner

The Flowers and Bees but we’ll get to those later

The Foreground at 0,0 as well. We can look at it as a puppet show where the foreground will sit on top of the area where we draw the flowers so that when they drop down they will clip behind the edges of the foreground texture

The HUD (Heads Up Display) which will be a HUD background painted at 7,7 (7 pixels from the top and 7 pixels from the left). When painting the HUD we’ll also print out the score, the level name (in this case MARATHON), some game instructions as well as bees indicating how many lives we have left.

A GAME OVER text on top of the whole scene when the game is lost

Getting things started in the BizzyBeeGame class

1. Add the following methods and member variables in the BizzyBeeGame.h file

a number of draw methods where we will actually draw all the items described above

Two drawstring methods (one for regular text and one if we want to scale the text). Typically you would create different sprite fonts for different text sizes but I am doing it this way for simplicity. Scaling a font will make it a bit grainy.

2. In BizzyBeeGame.cpp implement all the new methods but let them be empty for now

3. In the BizzyBeeGame::Render method add the folloiwng code to start drawing the scene. Note that all the drawing has to occur between spriteBatch->Begin() and spriteBatch->End()

8. Implement the DrawHUD method, and draw the background, the level name (MARATHON) and instructions (COLLECT RAINBOW FLOWERS). The text is blue and the level name is slightly smaller than the instruction text