top of page

Lûmis
Group project | 4 persons | 7 months
Context
Lumis was my final year project, it lasted a year and we were a group of 4 :
Louis Deprez
Anatole Lesur
Mercury De Sainte Maresville
I was in charge of programming this project.

Concept
Lumis is a game in which we can solidify the shadows.
Other mechanisms are present, such as the Luxos, plants that react to light by moving a platform and the pockets of water lilies, which make it possible to enlarge or shrink a water lily (platform).

Luxo
Poches
Visual Preview

Programmation
I was in charge of programming this project, so I programmed the mechanics of the shadows as well as tools allowing group members to use the game elements more simply.
Shadow System
The shadow system is quite complex and uses several algorithms; to simplify things, here are the steps I went through to make the shadows solid.
- Differentiate between shadows and what is not a shadow
- Retrieve the camera pixels
- Check that the pixels have only 2 colors (Flood Fill)
- Establish a boolean array of pixels (Moore neighborhood)
- Simplify shapes (Ramer–Douglas–Peucker algorithm)
Differentiate between shadows and what is not a shadow
Each light source is divided into 2, one for the gameplay, one for the shadow system; the one from the shadow system illuminates everything it can in white.
So there are two cameras,
what the player sees, the gameplay camera
only the shadows, the camera of the shadow system

Gameplay

Shadow System
Retrieve the camera pixels
Via a script, we pass what the camera sees through a customized shader that transforms the shadows into white and the rest into transparency.
The shader also allows you to get screen pixels efficiently without disturbing performance.

Check that the pixels have only 2 colors
You can never be too sure, so we’ll check if the pixels are only transparent or white.
For this, we use the zone filling algorithm, Flood fill.

Establish a boolean array of pixels
Now that our pixels only have 2 colors, we establish a boolean table, true for shadow pixels, false for transparent ones.
To do this, we use the Moore neighborhood algorithm.

Simplify shapes
Having shadow shapes, they are too complex to become colliders, so we use the Ramer–Douglas–Peucker algorithm, which is used to simplify polygons.

Result
We really have our colliders on the shadows, optimized without taking too much performance.

Player
For the player, I used curves for acceleration and deceleration, as well as the New Input System.


New Input System
Courbes
States machines
While staying on the player, I used state machines to manage the following states:

- Idle
- Walk
- Jump
- Fall
Dev tools & level editor
One of my priorities is that the rest of the group doesn’t have any trouble using my scripts and systems, which is why I made a few systems to help them.
Dev Tools
To help the Level Designer but also the playtesters, there is a level selector with different features.

To make it easier to see the scenes, I created a static function to take a screenshot of the current camera view.
I also don’t hesitate to use attributes to better manage the inspector. Using the NaughtyAttribute package, I can have a few more attributes and I can also put colors or even hide certain information if not necessary.


Level Editor
At the beginning of the project, I had created a level editor.
As soon as you remove Play, it automatically saves a new scene with the added elements.

The End
bottom of page