Skip to content
Jaeymo

Systems

Gameplay systems

Here are some systems I’ve built; open any file in the explorer to read the source code. More coming soon!

System 01

Airborne Falling Effects

The client-sided movement FSM tracks every fall, recording the peak height and impact speed all the while capping terminal velocity. As the fall builds, FOV, camera shake and a speed-layered wind audio ramp up and dip just before impact. This also features a 4D directional walking mechanic with character tilting! Not all files are included, but the relevant ones are.

  • Movement
  • Frontend
  • Backend
  • FSM
  • Locomotion

Explorer / Airborne Falling Effects

Airborne.luau

ClientControllersMovementControllerStatesAirborne.luau

--!strict
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local controllers = ReplicatedStorage.Client.Controllers
local types = ReplicatedStorage.Shared.Types

local EffectController = require(controllers.EffectController)
local MovementTypes = require(types.MovementTypes)

local ENUMS = require(ReplicatedStorage.Shared.Enums)

local AIRBORNE_STATES: { [Enum.HumanoidStateType]: boolean } = {
	[Enum.HumanoidStateType.Freefall] = true,
	[Enum.HumanoidStateType.Jumping] = true,
}

local AirborneState = {}

export type AirborneState = typeof(AirborneState)

function AirborneState.CanEnter(self: AirborneState, context: MovementTypes.MovementContext): boolean
	return AIRBORNE_STATES[context.Humanoid:GetState()] == true
end

function AirborneState.OnEnter(self: AirborneState, context: MovementTypes.MovementContext)
	EffectController:Play(ENUMS.EFFECTS.AIRBORNE_FALL)
end

function AirborneState.OnExit(self: AirborneState, context: MovementTypes.MovementContext)
	EffectController:CancelByTag(ENUMS.EFFECTS.AIRBORNE_FALL)
end

return AirborneState
Read-only34 lines · Luau