Download presentation
Presentation is loading. Please wait.
1
Agenda for Unit 4: Graphics
Objectives 4. Produce images for games. 4.1: Describe the difference between a bitmap image and an image stored in .gif or .jpg format. 4.2: Identify how to load multiple bitmap images into memory. 4.3: List three special effects that can be applied to bitmap images. 4.4: Illustrate the programming code required to display a transparent image. 4.5: Make an image to include in a game program
2
Hour 1 Review Homework 3.1 Quick Hits
Review week 3 lab (Modular Snowman)
3
THAT’S IT! STAY AWAKE AND PAY ATTENTION!
Hour 2 Chapter 5: Working with Images THAT’S IT! STAY AWAKE AND PAY ATTENTION!
4
Hour 3 Chapter 5: Working with Images Lab 4.1 Landing Spaceship
5
Hour 4 Lab 4.1 Landing Spaceship (cont.) Quiz 4.1 Quiz 4.1 answers
Homework 4.1 assignment
6
Ready?
7
Hour 1: Quiz 3.1 Stats 90s = 3 80s = 5 70s = 2 60s = 3 50s = 2 40s = 1
High Score = 97% Low Score = 0 90s = 3 80s = 5 70s = 2 60s = 3 50s = 2 40s = 1 30s = 2 20s = 1 10s = 0 0 = 1 Class Average = 64.5%
8
Hour 1: Answers to Homework 3.1:
Turn to page 173 and read aloud: There are still students who did not turn this in so answers are omitted. me for answers.
9
Hour 1: Quick Hits Make sure you empty your folder each week.
Duck Hunt feedback is coming Make sure you are sending me .cpp files Naming conventions!!!
10
Hour 1: Review week 3 lab (Modular Snowman)
me for code
11
Hour 1: Review week 3 lab (Modular Snowman)
// Draw the bottom of the hat. dbBox(left, top, right, bottom); // Adjust values for the top of the hat. left += 20; right -=20; bottom = top; top = 50; // Draw the top of the hat. // Wait for the user to press a key, then exit. dbWaitKey();
12
BREAK!
13
Hour 2: Chapter 5: Working with Images
You should have read this over the break so the lecture should be a REVIEW! Monitors off!
14
BREAK!
15
Hour 3: Chapter 5: Working with Images
You should have read this over the break so the lecture should be a REVIEW! Monitors off!
16
Hour 3: Lab 4.1: Landing Spaceship
(Programming Exercise #3 on page 211 of Starting Out with Games and Graphics in C++) What is the purpose? You will create the bitmaps for a simple game-like exercise and then load and display these bitmaps, using color keys where appropriate, to complete the illusion of a spaceship landing on an extraterrestrial planet.. What are the steps? Task 1: Draw the bitmaps. Procedure 1. Using Microsoft Paint, draw and save a bitmap to be used as the planet surface. 2. Draw another, smaller bitmap to be used as the spaceship. This bitmap will be color keyed, so fill the background of the bitmap with a unique solid color that will be used as the transparency value. Remember to write down the value of the key color you have chosen. Do not use this color for other parts of the spaceship, as this color will not be displayed when the bitmap is shown on the screen. You will need it later when displaying the bitmap using C++.
17
Hour 3: Lab 4.1: Landing Spaceship (cont.)
Task 2: Display the bitmaps. Procedure Write a program to display the planet surface bitmap. 2. Load and display the spaceship using color keying so that it appears on top of the planet surface without a rectangular background.
18
Hour 3: Lab 4.1: landing Spaceship (cont.)
Task 3: Move the spaceship. Procedure 1. After displaying the images, pause the program and wait for the user to press a key. 2. After a key is pressed, move the spaceship slightly down the screen so that it appears to be moving one step closer to the planet surface. Again, pause the program and wait for a key press before ending the program. 3. Modify the program so that it requires five key presses for the spaceship to appear to land. After each key press, the spaceship should move another step down the screen. After the fifth key press, the program should end with the spaceship firmly planted on the planet surface.
19
BREAK!
20
Hour 4: Quiz 4.1: pg Using the answer sheet provided, answer the seven True/False questions on pages of Starting Out with Games and Graphics in C++.
21
Hour 4: Answers to Quiz 4.1: pg 209-210
Turn to page 209 and read aloud: 1. True 2. True 3. False 4. True 5. False 6. True 7. True
22
Hour 4: Homework 4.1 Answer the Multiple Choice Review Questions on pages of Starting Out with Games and Graphics in C++. Submit your written answers to me in next week.
23
Hour 4: Next Week Read Chapter 6: Control Structures
Turn in Homework 4.1. your lab .cpp files to
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.