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

Theme: auto

Lab 9: Portal, Part 1

We’re going to now use everything we’ve learned so far (and more!) to build a larger game. This is the first of four labs that builds a version of 2007’s puzzle-platform game Portal.

Portal is often referenced both for its unique game mechanics as well as the way the narrative is integrated into the gameplay. Recently, a version with ray-tracing (Portal with RTX) was released. Here’s a playthrough of that version:

Once you finish Labs 9, 10, 11, and 12, your final version of Portal will look something like this:

However, we aren’t quite there yet! At the end of this lab, you will have first-person movement and a camera, be able to pick up the portal gun, and be able to shoot portals around the environment (though not travel through them yet). It will look like this:

You can also play Lab 9 in your browser!

Because of the way mouse capture works in the browser, you must first click on the window once for the game to capture the mouse. In game, you can press the P key to have it play back the same input data shown in the video above. This input playback will help validate that your game is behaving in the same way as expected.


Table of contents