Uploaded June 2019 | Updated September 2026, 1 hour ago
This video demonstrates what I've learned so far from the book "Ray Tracing - The Next Week" by Peter Shirley.
In addition to what is presented in the book, I've implemented the ability to make lightsources themselves visible / invisible to the camera - allowing for a huge lightsource that isn't an eyesore on the scene.
Lighting definitely takes its toll on the engine and I'll need to do a lot of work on this one to understand how to improve the speed. Therefore, this video is a pre-planned demo with the camera on "rails".
I have however set up simple "record" and "play" features in C++ to allow me to create videos. OBS doesn't really work too well on long simulation runs!
Acknowledgements:
The ray tracer approach and code is based on that provided in the book "Ray Tracing in One Weekend" and its sequels by Peter Shirley. Highly recommended reading!
This was made using the Chili Framework: http://wiki.planetchili.net/index.php... - thanks Chili!
Music by Eric Skiff, song "All of Us" for the intro and "HHavok-main" for the main sequence. (Available at EricSkiff.com/music)
These great 8k planet & moon images were obtained from solarsystemscope.com/textures under the Attribution 4.0 International license (see here: creativecommons.org/licenses/by/4.0/)
This video demonstrates what I've learned so far from the book "Ray Tracing - The Next Week" by Peter Shirley.
In addition to what is presented in the book, I've implemented the ability to make lightsources themselves visible / invisible to the camera - allowing for a huge lightsource that isn't an eyesore on the scene.
Lighting definitely takes its toll on the engine and I'll need to do a lot of work on this one to understand how to improve the speed. Therefore, this video is a pre-planned demo with the camera on "rails".
I have however set up simple "record" and "play" features in C++ to allow me to create videos. OBS doesn't really work too well on long simulation runs!
Acknowledgements:
The ray tracer approach and code is based on that provided in the book "Ray Tracing in One Weekend" and its sequels by Peter Shirley. Highly recommended reading!
This was made using the Chili Framework: http://wiki.planetchili.net/index.php... - thanks Chili!
Music by Eric Skiff, song "All of Us" for the intro and "HHavok-main" for the main sequence. (Available at EricSkiff.com/music)
These great 8k planet & moon images were obtained from solarsystemscope.com/textures under the Attribution 4.0 International license (see here: creativecommons.org/licenses/by/4.0/)
![2D Game Engine in C++: [9] Bounding Boxes
This video demonstrates the inclusion of bounding boxes into the game engine. This is the first of a series of controls that will allow for viewing how various items are being represented in the game world.
I anticipate that there will be a number of uses for these controls, most obviously when setting up and testing collision detection. This particular switch allows me to get a sense of whether sprites are moving around the screen exactly as intended.
Its more difficult to see, but there is also a switch used for pinpointing where light sources exist. You may notice small yellow pixels at various points in the video in the middle of the torches, representing light positions. This helped me debug the issue I had in the previous video.
This video also displays a bit of new art. It definitely takes a lot of time to put together any new art assets, as Im no artist!
I will release all code on GitHub once Ive finalised the engine - and have nice looking code to boot!
Using the Chili Framework: http://wiki.planetchili.net/index.php... - thanks Chili! 2D Game Engine in C++: [9] Bounding Boxes](https://i.ytimg.com/vi/ZSL4Ky4xVYo/mqdefault.jpg)









