Lesson 5 of 8
3D Gaming
Step into the third dimension as polygons, graphics chips, and CD-ROMs transformed gaming in the mid-1990s.
Learn it
For many years, video games were flat 2D pictures made from square pixels. But in the mid-1990s, powerful new consoles like the Sony PlayStation and Nintendo 64 brought fully 3D worlds to life!
Instead of flat sprites, 3D games build characters and environments out of geometric shapes called polygons. By wrapping textures around these shapes, developers could create worlds you could view from any camera angle.
Games like Super Mario 64 and Tomb Raider gave players complete freedom to run, climb, swim, and explore in all directions, changing game design forever.
Key terms
- Polygon
- A flat, two-dimensional geometric shape (typically a triangle) combined in meshes to construct 3D models.
- Texture Mapping
- Applying a 2D image onto the surface of a 3D polygonal model, like wrapping patterned paper onto a box.
- Z-Buffer
- A memory buffer that tracks depth values to ensure foreground objects correctly occlude background objects.
- CD-ROM
- An optical disc storage format capable of holding around 650 megabytes of audio, video, and game data.
Rendering a 3D Frame
Trace the pipeline a 1990s console used to draw a single 3D scene thirty times a second.
- 1Vertex Transform: The CPU computes the 3D position and rotation of all vertex points relative to the camera.
- 2Depth Sorting (Z-Buffering): The graphics hardware checks which polygons are in front so hidden surfaces are not drawn.
- 3Texture Mapping: Bitmaps are stretched and wrapped across the triangular polygon faces.
- 4Lighting and Shading: Gouraud shading interpolates colour across vertices to simulate smooth light curves before sending to the display.
Calculating Polygon Count
python# Comparing polygon budgets between generations
ps1_character_triangles = 500
ps5_character_triangles = 100000
growth = ps5_character_triangles // ps1_character_triangles
print(f'PS1 Character: {ps1_character_triangles} triangles')
print(f'PS5 Character: {ps5_character_triangles} triangles')
print(f'Polygonal detail increased by {growth}x!')In the 1990s, 3D character models were tightly constrained to a few hundred polygons, whereas modern hardware renders hundreds of thousands.
Try it
Complete the code that calculates the total polygon count of a 3D scene from its meshes:
meshes = {'hero': 750, 'boss': 1200, 'castle': 3500}
total_polygons = ______
print(f'Total polygons rendered: {total_polygons}')Challenge
Design a camera system rulebook for a 3D platformer to avoid the camera getting stuck behind walls.
Pick whichever way suits you — every mode earns the same bonus XP.
Write at least 40 more characters to submit.
Mark your own work
Guided walkthrough — 0/5 clues revealed
- Clue 1 locked — reveal it only if you get stuck.
- Clue 2 locked — reveal it only if you get stuck.
- Clue 3 locked — reveal it only if you get stuck.
- Clue 4 locked — reveal it only if you get stuck.
- Clue 5 locked — reveal it only if you get stuck.
Each clue costs 5 XP (never below 22 XP). You'd earn 43 XP right now.
Extension: Write pseudocode for an automatic camera that pans smoothly behind a character when moving.