Kotlin LibGDX/KTX RPG Tutorial - Part 26 (Lights)
This is a tutorial series about game development using Kotlin, LibGDX with LibKTX extensions.
We are developing a small 2D adventure RPG using different technologies like Box2D, GdxAI, Entity Component System or Tiled.
The full source code of the tutorial can be found on github: https://github.com/Quillraven/MysticWoods
Part 26 - Lights:
In this part we are going to learn how to implement a day/night system using Box2D-Lights.
Link to Box2D-Lights on github: https://github.com/libgdx/box2dlights
Link to Box2D category and mask bits documentation: https://www.iforce2d.net/b2dtut/collision-filtering
Link to FBO documentation: https://libgdx.com/wiki/graphics/opengl-utils/frame-buffer-objects
Chapters:
00:00 - Demo of day/night system
01:31 - What is Box2D-Lights
05:07 - Setup RayHandler
12:07 - Add LightSystem
18:27 - Update RenderSystem and test ambient light
21:05 - Add LightComponent
24:44 - Update LightSystem
29:45 - Add lights to entities
33:47 - Test PointLights and identify two problems
36:00 - Fix environment shadows
37:00 - Contact filtering using bits
43:19 - Set categories to fixtures
49:54 - Test PointLight fixes
50:23 - Diffuse light and softness