Introduction
This game was created as a school project within a team of 4 artists and 2 developers over a span of 8 weeks. We had to make a first-person puzzle game with a few conditions:
- The game must have 3 levels.
- Each level is referred to as a "cell" and must not exceed 20 meters in length, width, or height (20x20x20 meters).
- You must solve the first cell before advancing to the next. So you can't go from cell to cell without completing them.
- The game needs to have one mechanic that keeps coming back every level.
Here is the final product we created:
The Making of Starline
We made a whole dev commentary video containing 18 minutes of a full walk through of the game with commentary talking about why we made things and how. If you are really interested in this project and want to know everything I suggest you watch it. (Disclaimer: it is in Dutch)
Beginnings
At first, we were really struggling with the puzzles we wanted to create, and we didn't have a clear idea of the main mechanic we wanted to incorporate. So we made a bunch of different puzzles with different mechanics, and I ended up making this laser prototype which you can see in the video:
As you can see in the video, the lasers react to mirrors and change colors if they are hit by other lasers.
The laser was created in two parts: the visual aspect and what happens behind the scenes. To make the laser function as intended, I utilized raycasting, as you can see in the code snippet below. Additionally, each laser was equipped with a LineRenderer, with its positions dynamically added through code.
public void CastRay(Vector3 pos, Vector3 dir, LineRenderer laser)
{
LaserIndices.Add(pos);
Ray ray = new Ray(pos, dir);
RaycastHit hit;
ChangeColor(CurrentColor);
if (Physics.Raycast(ray, out hit, 30, 1))
{
CheckHit(hit, dir, laser);
}
else
{
LaserIndices.Add(ray.GetPoint(30));
UpdateLaser();
}
}