Leggimi in italiano! 🇮🇹

Puzzle game Godot engine

Deckfall

Deckfall's trailer

Description 📢

Deckfall is a little first person puzzle game, developed in Godot Engine, inspired by the "Infinite Hallway" level from Superliminal. The game takes place on a spaceship on the verge of collapse, and the player must traverse an almost infinite corridor in search of an escape route.

It's available on itch.io (as build) and on github (complete project, source and build).

How to play 🕹️

Deckfall runs on Windows, Mac and Linux. For Windows systems, simply download and run the executable file deckfall.exe. For other systems, you can launch the game within the Godot 4.4.1 editor.

Run the game from the build (Windows)

  1. Download the latest version from releases section
  2. Run the deckfall-v1.0.exe file
  3. Play!

Run the game from the engine (Windows/macOS/linux)

  1. First download the engine from the official Godot website (version 4.4.1):
  2. Download the latest game's source from release section:
  3. Launch Godot_v4.4.1 and drag the deckfall-v1.0.zip file into the Godot window
  4. Click install, Godot will unpack and load the project in few minutes
  5. Run the game by pressing the ▶️ button in the top-right corner, or press F5 (in Windows) / Command + D (in macOS).
  6. Play!

🚨 Note: if you want just play the game, don't change anything in the editor!

⚙️ Settings

The game is available in Italian and English. This setting is only found in the start menu and cannot be changed once the game is launched. You can also adjust mouse sensitivity and graphic quality from the pause menu (press 'ESC' to open the pause menu).

Licenses and Credits 🏷️

Deckfall is released under several licenses, see the LICENSE📃 file for complete details. In summary, the licenses are divided into:

  1. Compiled game (Build)
    Because third-party assets under various licenses, including "ShareAlike" were used, the compiled game (build) is licensed under the Attribution-ShareAlike License (CC BY-SA 4.0).
  2. Code
    Scripts are licensed under the MIT License.
  3. Original Assets
    Assets created specifically for the project are licensed under the Attribution-ShareAlike License (CC BY 4.0).

See the CREDITS📃 file for all credits related to third-party assets.

3D Models

Structural elements (walls, floors, stairs, doors, etc.) and details (pipes, barrels, monitors, etc.) come from Kenney's "Space Station Kit" library (CC0 license). Specific and "dynamic" models, such as the glowing pixelated numbers and the emergency lever, were custom-made in Blender.

...

Rooms 🏗️

The rooms were built directly in the engine.

main corridor view Main corridor

Main corridor's window Main corridor view with error monitor and window in the background

left corridor with door blocked by debris and glowing "EXIT" sign arrow pointing left View of the corridor leading to the left exit

obstacles and debris overflowing from the blocked door Door blocked by obstacles

corner room corner room with stairs leading to the next corridor

last room without enough lighting Deck Zero, final room

Musics 📻

Score

The background music is "A Few Jumps Away" by Arthur Vyncke, selected through the BreakingCopyright website (CC BY-SA 3.0 license).
Its electronic sound and subtle piano melody capture the sci-fi setting, with a cyclical rhythm typical of puzzle games.

Loops and dynamic music

In order to create a smooth and constant music loop, the volume was amplified at the start of the track and reduced in the chorus.

From the start menu through the entire first level, the music loops only the first 20 seconds: a rhythmic accompaniment without melody. When the player reaches the second level, the music transitions to the second part with the full piano melody and developed arrangement.

Jingle

During the opening cutscene, a jingle can be heard coming from the monitor during the space company's promotional message. The track "Crystals" by enviromaniac2 (CC0) was selected for its extremely cheerful sound, in complete contrast with the tragic situation.

▶️ Press to play the jingle! 🔵 Press to stop

promotional message glowing from the monitor, asking customers to leave a positive review

Easter eggs and references

Graffiti

On the wall in front of the stairs, the text This Way suggests to the player to reach the next level by jumping in the direction of the arrow.
This first writing introduces the possibility that graffiti exist in the game to help the player. graffiti this way

On the wall above the window overlooking space, there is an engraved phrase that reads "You're looking in the wrong direction". This is a reference to a graffito in Turin written on a wall facing the Mole Antonelliana.

graffito nel gioco graffito originale

SPOILER ALERT! (click to reveal) The graffiti reveals the solution of the game. In fact, this graffito only becomes visible after the player makes their first mistake.

On the corner room's walls, there is a real-time counter of all the player's attempts, displayed in tally marks style. attempt counter

Running stickman

The glowing Exit sign displays the same running stickman used in the Godot editor for the "CharacterBody3D" node. The same stickman appears in the game logo and in the Fragile Floor yellow warning sign, where the figure is shown falling.

During the cutscene, the monitor displays some error messages that hide a few nerdy references.

monitor displays three error messages

"…REACTORS 441 AND 507"
"…PROTOCOL 850-M…"

Operation

Solution mechanism

The red arrow always points to the correct exit, but the first door seen from the player is always locked, the second one is always unlocked. The solution is look first in the opposite direction and then walk to the correct door.

The easiest way to implement this is to place two obstacles in front of both doors from the start. As soon as the player looks at one, the opposite obstacle immediately disappears.

How do you create this mechanism?

In Godot Engine there is the VisibleOnScreenNotifier3D Node, which emits a signal every time its area enters or exits the Camera's field of view.

That easy? No, because it's not a true field of view that accounts for obstacles or walls, but rather a three-dimensional region projected from the camera, also known as Frustum View.

Therefore, the VisibleOnScreenNotifier3D Node marks as "visible" every element inside the Frustum, even if the element is hidden behind a wall and the player cannot see it

visualization of the Frustum. A wall is placed in front of the camera and a lot of objects are hidden behind it A clear example of objects that are inside the Frustum View but remain invisible to the player due to an obstacle

To solve this issue it's necessary detect when is an obstacle between the player eyes (Camera) and the object.

But how?

First attempt using a RayCast

It is natural to think of using a RayCast3D node, starting from the door frame and constantly pointing at the player's head.

If the raycast hits directly the player that means there are no intermediate obstacles, so we can trust the signal coming from the VisibleOnScreenNotifier3D node.

raycast bloccato dal muro Raycast is blocked by the wall raycast che colpisce il giocatore Raycast hits the player

BUG: The raycast constantly rotates and points towards the player using the look_at() function, and detects collisions using the get_collider() function. This solution seems to work on paper, but in reality it is not reliable: the raycast may not update its position in time if the player moves too fast.
During beta testing, it was possible to see the door before the get_collider() function was activated, breaking the main rule of the puzzle.

Second attempt using an Area3D

Since the walls and door always have a fixed position, raycasting is only useful when the player turns the corner. You can achieve the same result by using an Area3D node on that region. If the player turns the corner and enters the area, it means the door is visible and we can trust the signal coming from the VisibleOnScreenNotifier3D node.

player outside the area player inside the area

The infinite hallway

When the player falls down the stairs, they land in a new corridor identical to the previous one, simulating an infinite loop.

Between the steps and the floor there is an Area3D node, which emits a signal when the player is falling. The game sets the player's position at the top of the starting corridor, in the same relative position.

There are two identical cloned scenes of the corridor, and both have a Marker3D node positioned in front of the stairs. When the player falls, the game takes the player's distance from the marker and repositions the player at the same distance, but relative to the marker in the main hallway.

stairs leading to the next hallway Stairs leading to the next hallway

top view of the game map Top view of the game map

perspective top view of the game map Perspective top view of the game map

The sun

The sun casts intense light inside the spacecraft through the main corridor window. It is rotating slowly to simulate the classic movements of an orbiting spacecraft.

The sun consists of a glow spherical Mesh and a SpotLight3D Node, which is a node projects a cone of light. The rotation pivots around the center of the window. In this animation, the starry sky also moves in the same way, controlled by the sky_rotation parameter of the WorldEnvironment node.

light projection on the window sun's mesh