Skip to main content Link Search Menu Expand Document (external link)

Theme: auto

Setup

This lab builds on the code in Lab 2. You need to have at least completed the “Actor, Components, and Sprites” section of Lab 2 as well as the very first part of the “Movement” section (with the MoveComponent) to be able to begin work on this lab.

  1. Copy your .h/.cpp files from the Lab02 folder to the Lab03 folder, EXCEPT do not copy Ship.h/cpp, Asteroid.h/cpp, or Laser.h/cpp, as you don’t need those for Lab 3. (Make sure you copy using Finder or Explorer to copy files, don’t drag-and-drop within Visual Studio/Visual Studio Code as this will not copy properly)
  2. Open your repo in Visual Studio or Visual Studio Code as usual
  3. Now you need to change the build target from “Lab02” to “Lab03.” In Visual Studio (PC) this is via the dropdown near the play button. For Visual Studio Code (Mac), you should change both instances of “Lab02” on the bottom toolbar (one for the build target and the other for the run target)
  4. Next, remove the following code:
    • Any references to the ship/asteroids/lasers in the game code
    • All the code inside of Game::LoadData (you’ll be doing something different in here for this lab)

Your game should now compile and run.

Now you’re ready for part 1 of the lab.