This course includes

  • 15 hours of on-demand video

  • Downloadable resources and exercises

  • Full lifetime access

  • Access on mobile and desktop

  • 14 day money back guarantee

  • Secure checkout through PayPal or Stripe

Watch Intro Video

Motivations & Learning Outcomes

Prerequisites

Before taking this course, you must have:

  • A basic understanding of programming fundamentals, such as variables, conditionals, loops, and functions.

  • Some basic experience with any C-style programming language syntax (such as C++, Java, C#, Swift, or JavaScript).

  • Some basic understanding of how to use the command-line

Is this course for you?

This course explains the mathematics behind raycasting and takes the student in a journey to create a full raycasting scene with JavaScript and C. To make the most out of this course, you should know the basic elements of any C-style language (JavaScript, Java, C#, etc). If you always wanted to learn how Wolfenstein3D managed to get super amazing graphics and learn how trigonometry and simple math can help you with game development, then this course is definitely for you!
Buy $12.99
Is this course for you?

What you'll learn

Course overview and structure

This course covers the full implementation of a raycasting engine using C. The course starts with the explanation of the mathematics behind raycasting and uses JavaScript to create a quick prototype to test the topics covered. Once we are done with the basics, we leave JavaScript and start using the C language to create a complete working version of a raycasting engine, including textured walls, color buffer, and a full discussion on working with C. You'll learn the fundamentals of C, use the SDL library to handle graphics and manipulate color buffer values to make your own raycasting scene.
Buy $12.99
What you'll learn
  • Lifetime access

    Enroll now and get lifetime access to the course content

  • Access to discussion forum

    Discuss course topics and engage with other students using the discussion board

  • Money back guarantee

    We offer a 14 day money back guarantee for all our courses. No questions asked.

Course Content

  • 3
    2D Map and Player Movement
    • Defining the 2D Map Grid
    • Coding the Map Class
    • Player Movement
    • Coding the Player Movement
    • Exercise: Map Collision
    • Coding the Map Collision
  • 4
    Ray Casting
    • Defining the Field of View
    • Coding the Field of View Ray Increments
    • Finding Wall Hit
    • Finding Horizontal Intersections
    • Finding Vertical Intersections
    • Finding the Intersection with the Grid Cells
    • Coding the Horizontal Wall Intersection
    • Coding the Vertical Intersection
    • Fixing the Intersection Offset Error
  • 5
    Rendering Walls
    • Wall Projection
    • Visualizing the Minimap
    • Coding the Wall Rendering
    • Fixing the Fishbowl Distortion
    • Exercise: Wall Shading by Depth
    • Implementing Wall Shading by Depth
    • Bright/Dark Wall Sides
  • 6
    Concluding the JavaScript Project
    • Exercise: Colored Walls
    • Coding Walls with Different Colors
    • Concluding our JavaScript Prototype
  • 7
    Starting our C Project
    • First Steps in C
    • A Heads Up for Windows Developers
    • Working with Makefile
    • Installing Visual Studio and SDL on Windows
    • Creating a SDL Window
    • SDL Rendering and Event Polling
    • Rendering SDL Rectangles
  • 8
    Creating a Game Loop
    • Game Loop Overview
    • Coding a Fixed Time Step Game Loop
    • SDL Delay
  • 9
    Map and Player Movement
    • Drawing the Map with SDL
    • Player Movement and SDL Events
    • Exercise: Wall Collision in C
    • Implementing Wall Collision in C
  • 10
    Casting Rays in our C Project
    • Ray Struct and FOV
    • Translating the Horizontal Intersection to C
    • Translating the Vertical Intersection to C
    • Rendering Rays
  • 11
    Color Buffer
    • The Color Buffer
    • Color Buffer Implementation
    • Freeing Allocated Resources
  • 12
    Wall Projection
    • Creating the Wall Projection
    • Exercise: Ceiling & Floor Solid Colors
    • Ceiling & Floor Solid Color Implementation
  • 13
    Wall Textures
    • Representing Textures
    • Creating a Texture Programmatically
    • Mapping Textures to Wall
    • Implementing Wall Texturing
    • Multiple Textures
    • Multiple Texture Code
    • Fixed Size Data Types
    • Using Fixed Size Integer Types
    • The Operator Sizeof
    • Libraries to Decode PNG Files
    • Loading External PNG Files
  • 14
    Fixing the Angle Increment Distortion
    • Activity: Field of View Distortion
    • Understanding the Angle Increment Distortion
    • Coding the Angle Increment Distortion Fix
  • 15
    Refactoring Project Files
    • Full Screen Window
    • Refactoring the Graphics File
    • Exercise: Drawing Rectangle
    • Drawing Filled Rectangles
    • Refactoring the Map File
    • Refactoring the Ray and Player File
  • 16
    Rendering Lines
    • The Line Equation
    • Rasterizing Lines
    • Coding the DDA Line Algorithm
  • 17
    Finishing Touches and Optimizations
    • Refactoring the Wall Projection File
    • Creating a Type Definition for Color Values
    • Sending Parameters by Reference
    • Refactoring the Ray-Facing Code
    • Wall Texture Color Intensity
    • Coding the Texture Color Intensity
    • Look Up Tables
  • 18
    Moving Forward
    • Similar Courses

Instructor

  • Gustavo Pezzi

    Senior Lecturer

    Gustavo Pezzi

    Gustavo teaches computer science and mathematics at BPP University, London. He studies how teaching game programming can help enhance awareness and understanding of basic 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, systems, databases, and data analysis. His academic path includes institutions such as Pittsburg State University, City University of London, and University of Oxford.

Reviews

  • Excellent Course

    Peter Hering

    Gustavo presents clear and detailed explanations of raycasting concepts and provide understandable incremental examples.

    Gustavo presents clear and detailed explanations of raycasting concepts and provide understandable incremental examples.

    Read Less
  • Excellent detailed introduction to raycast

    Antonio Herrera Martin

    It was a detailed very useful introduction to raycasting. It has a complete idea of what you need, and you can use the concepts to expand for whatever more a...

    Read More

    It was a detailed very useful introduction to raycasting. It has a complete idea of what you need, and you can use the concepts to expand for whatever more advance development you want to do with the code.

    Read Less
  • Awesome course!

    Benjamin Singh

    I took the course just for fun and I actually learned a lot! Now I'm curious learning more about game development and techniques. I'm definitely taking anoth...

    Read More

    I took the course just for fun and I actually learned a lot! Now I'm curious learning more about game development and techniques. I'm definitely taking another course from Gustavo!

    Read Less
  • Great course!

    Sebastien Richer

    Amazing source for whoever wants to actually understand raycasters. The lecturer (Gustavo Pezzi) takes the time to go through the logic and each correspondin...

    Read More

    Amazing source for whoever wants to actually understand raycasters. The lecturer (Gustavo Pezzi) takes the time to go through the logic and each corresponding line of code. Visual support is also used to help understand each concept.

    Read Less
  • Excellent course, one of the very best I've gone through

    Arnon Marcus

    The material is walked through very meticulously and methodically, with lots of great visual aids. Every challenging point is identified and delved into app...

    Read More

    The material is walked through very meticulously and methodically, with lots of great visual aids. Every challenging point is identified and delved into appropriately. Most resommended!

    Read Less
  • Awesome tutorial

    George Adrian

    Thank you a lot, the content of the course is very beginner friendly and well done!

    Thank you a lot, the content of the course is very beginner friendly and well done!

    Read Less
  • Very good project, excellent explanations

    Jon Snow

    The course is very helpful, thx !

    The course is very helpful, thx !

    Read Less