A demonstration of a light/visibility system done via line segment intersection.
- C++
- SFML
- CMake
- Basic 2D geometry added to the world.
- Basic player controls.
- Ability to push and move objects in the world.
- Introduction of entity memory pooling.
I did not take screenshots during this period.
Not a huge amount of time was spent working on the project during this period due to work and with the Christmas holidays. However, I did start a separate branch on the project for building my own line segment intersection algorithm.
The goal with this was to add a visibility system to the game so we could determine what is visible to a given entity.
This went through many changes as a result of the wrong strategy being used. The initial implementation worked for a set of rays in a radial pattern around the player entity. However, when joining these rays with a TriangleFan there was a lot of jagged edges, flickering and clipping over the corners of other world entities. Eventually, I managed to succeed in getting this to work.
- The pinky block represents our player and light source.
- The yellow area represents the region the player can see.