This course includes

  • 6 hours of on-demand video

  • Downloadable resources and exercises

  • Full lifetime access

  • Access on mobile and desktop

Watch Intro Video

Motivations & Learning Outcomes

Is this course for you?

This course explains the technique used to create ray casting 3D scenes. The main technique covered is similar to the one used by IdSoftware in the Wolfenstein 3D source code. You will understand the mathematics used for ray casting, and implement a full-featured projected environment using a language called JavaScript. To make the most out of this course, you should be familiar with the basic building blocks of programming, such as variables, conditionals, loops, and functions.
Free enrollment
Is this course for you?
  • Activities and Discussions

    Join our community and get the most of our discussion boards


by Blaz Pecnik


by Blaz Pecnik

Such an amazing course! I struggled with my raycast engine for a while, I can't believe how much this course helped me. I know I'm sounding like a spam-bot, but... I literally can't believe this course is free.
by Igor Donizete


by Igor Donizete

I learned more with two videos of this course, than in my school, nice work!

Course Content

  • 1
    Introduction and Motivations
    • Introduction and Learning Outcomes
    • Quick Trigonometry Review
  • 2
    2D Map and Player Movement
    • Defining the 2D Map Grid
    • Coding the Map Class
    • Source Code (Download)
    • Player Movement
    • Implementing Map Collision
    • Source Code (Download)
  • 3
    Ray Casting
    • Defining the Field of View
    • Source Code (Download)
    • Finding Wall Hit
    • Finding Grid Intersections
    • Horizontal Intersections
    • Source Code (Download)
    • Vertical Intersections
    • Source Code (Download)
  • 4
    Rendering Walls
    • Wall Projection
    • Coding the Wall Rendering
    • Source Code (Download)
    • Fixing the Fishbowl Distortion
    • Source Code (Download)
    • Wall Shading (Proposed Activity)
    • Wall Transparency
    • Source Code (Download)
  • 5
    Conclusion and Next Steps
    • Polishing our Code
    • Source Code (Download)
    • Solid-Color Walls (Proposed Activity)
    • Source Code (Download)
    • Lua / PICO-8 Raycasting Code
    • Next Steps
    • Moving Forward


  • Gustavo Pezzi

    Senior Lecturer

    Gustavo Pezzi

    Gustavo teaches computer science and mathematics at BPP University, London. He researches how teaching game programming can help enhance awareness and understanding of mathematics and physics. He is also a professional software engineer with more than 10 years of experience, with an industry background in 3D systems, games, web systems, databases, and data science. His academic path includes institutions such as Pittsburg State University, City University of London, and University of Oxford.