Agenda for Unit 8: Defining Arrays in Game Programs Objectives 8. Explain how arrays and linked lists are used in game programming. 8.1: Identify the purpose of arrays in C++ programming. 8.2: Describe how an array stores variables. 8.3: Recognize selection algorithms used to sort arrays. 8.4: Describe how two-dimensional arrays are used in game programming. 8.5: Illustrate how to create a tile map for a game.
Hour 1 Review Homework 7.1 Quick Hits Review week 7 lab (Vulture Trouble Modification and Custom Mouse Pointers)
Hour 2 Chapter 10: Arrays and Tile Mapping
Hour 3 Chapter 10: Arrays and Tile Mapping Lab 8.1 Coins and Snakes
Hour 4 Lab 8.1 Coins and Snakes (cont.) Quiz 8.1 Quiz 8.1 answers Homework 8.1 assignment
Ready?
Hour 1: Quiz 7.1 Stats High Score = 100% Low Score = 33% (not counting absences) 100s = 12 90s = 0 80s = 4 70s = 0 60s = 1 50s = 0 40s = 0 30s = 1 20s = 0 10s = 0 0 = 2 Class Average = 81.6%
Hour 1: Answers to Homework 7.1: Turn to page 466 and read aloud: Email me for answers.
Hour 1: Quick Hits Make sure you empty your folder each week. I’m still grading Lunar Lander, will be done by the end of the week. Watch your email. Do not rename the files I send you!
Hour 1: Quick Hits (cont.) Submit a one-page overview of your project, its basic summary, and three stages of developments. Each stage will be due at the following class period: Stage 1: Feb 8th, 2011 Stage 2: Feb 22nd, 2011 Stage 3: March 1st, 2011
Vulture Trouble Modification and Custom Mouse Pointers (See Files) Hour 1: Review week 7 lab Vulture Trouble Modification and Custom Mouse Pointers (See Files)
BREAK!
Hour 2: Chapter 10: Arrays and Tile Mapping You should have read this over the break so the lecture should be a REVIEW! Monitors off!
BREAK!
Hour 3: Chapter 10: Arrays and Tile Mapping You should have read this over the break so the lecture should be a REVIEW! Monitors off!
Hour 3: Lab 8.1 Coins and Snakes (Programming Exercise #7 on pages 557 of Starting Out with Games and Graphics in C++) What is the purpose? This lab allows you to work with C++ arrays to efficiently create, store, and retrieve game elements. What are the steps? Task 1: Coins and Snakes (Programming Exercise #7) Procedure 1. Create a new project based on the WalkingAlec.cpp sample. I will give you a starter file. (Program 10-15 from pages 534- 539 of the textbook) 2. Change the program so that it displays 10 rocks. 3. When Alec collides with a rock, the rock should turn into either a coin or a snake. Score one point for finding a coin and subtract one point for finding a snake. 4. After all the rocks have been hit, the game should end. 5. Display a final score screen.
BREAK!
Hour 4: Quiz 8.1 Using the answer sheet provided, answer the 4 short-answer questions on page 554 of Starting Out with Games and Graphics in C++.
Hour 4: Answers to Quiz 7.1 1. a. 10 b. 0 c. 9 2. a. 3 elements b. 3 c. 1 3. a. 8 b. 10 c. 80 d. data[7][9] = 0 4. 32 rows and 24 columns
Hour 4: Homework 8.1 Answer the Multiple Choice Review Questions on pages 552-553 of Starting Out with Games and Graphics in C++. Submit your written answers to me in next week.
Hour 4: Next Week Read Chapter 11: Strings and Files Turn in Homework 8.1. Email your lab .cpp files to jasongrose@gmail.com