Ronald Wang

Solo Project: Laser Maze

A 3D puzzle game for a single player

Development Info

  • Development Softwares: Unreal Engine 4.25, 3Ds Max, Photoshop
  • Time Spent: 40 - 50 Hours
  • Shipped Date: 01/31/2021

Design Goals

  • Deliver a complete puzzle game with multiple uses of laser reflecting mechanics
  • Implement good puzzle design theories into levels
  • Practice and improve UE blueprint scripting skills
  • Acquire basic texturing and modeling abilities

Game Mechanics

image

Game Description

Stuck in a sterile environment where devices are controlled by laser, the player must acquire the ability to interact with laser reflectors to redirect laser beams so that they are able to escape from imprisonment.

image

This project serves as a practice for myself to practice logical thinking and script with Unreal Engine, as well as a valuable chance to explore my puzzle design style. If you're interested in how I wrote the functionalities and designed the levels, please click here for detailed information.

Game Highlight

Coding Examples

Example 1: Cast Laser
Design Goals:
  • To generate laser beams at the correct positions
Design Methods:
  • Call LineTraceByChannel function to simulate the laser.
  • Raycast starts from the laser shooter, continues when hits any kind of reflectors, and ends when hits walls, obstacles, and receivers.
  • Call SpawnActor function to draw cylinder shape with laser beam materials.
Problem Solving:
  • To avoid an endless loop when two reflectors direct lasers to each other, a boolean tag is added to the reflector blueprint. It's tagged as true when a reflector has received a laser, and lasers won't keep shooting if meets such a reflector.
  • Laser beam actors are stored in the shooter blueprint when they are spawned. They will be cleaned every new cast.
Codes:
Example 2: The Push Interaction
Design Goals:
  • To move the reflector to a new position after the player pushes
Design Methods:
  • By using min(abs(x_offset, y_offset)) to determine the pushing direction. The offset means the distance between the player and the target on the corresponding axis.
  • Call Normalize function to calculate the world location of the destination.
  • Call BoxTraceByChannel function to the new location to double-check if the pushing operation is allowed.
Problem Solving:
  • To simulate the movement of the reflector, a timeline function is implemented.
  • In order to update laser beam locations when the reflector is moving, a parameter is added to the timeline. Cast Laser function will be called each time the parameter reaches a peak.
Codes:
Example 3: Show HUD on the aiming object
Design Goals:
  • Show HUD on reflector objects when the player is targeting at it in a distance
Design Methods:
  • Define an LM_Interaction BPC to deal with interaction.
  • Call SphereTraceByChannel function to find the target in distance.
  • According to the actor type show different HUD information.
Codes: