Neighborhoods

Gameplay Programmer Intern at E-Line Media

Development Info

Roles: Gameplay Programmer Intern
Studio: E-Line Media
Internship Time: May 2026 – October 2026
Tools Used: Unreal Engine 5, Perforce, Unreal Game Sync, Common UI
Project Status: In Development

Genre: City Sim
Platform: PC

About Neighborhoods

As a Gameplay Programmer on Neighborhoods at E-Line Media, I’ve developed a mix of key player-facing systems and the underlying tools that support them. I’ve improved how players interact with the city, including camera controls, object selection and hover behavior, road placement, spline-based road generation, and placement validation. I’ve also revamped the systems behind roads and intersections, helping make them more flexible and reliable as the project has evolved. Since many of these features sit directly between design and engineering, a big part of my role has been turning gameplay needs into systems that feel intuitive for players while still being easy for the team to build on.

Runtime Road Building System

				
					// Replace the pre-turn and post-turn points with custom tangent points.
for (const FGeneratedTurn& Turn : GeneratedTurns)
{
    const FVector PreTurnLocation = SplineComponent->GetLocationAtSplinePoint( Turn.PreTurnIndex, ESplineCoordinateSpace::World);
    const FVector PostTurnLocation = SplineComponent->GetLocationAtSplinePoint( Turn.PostTurnIndex, ESplineCoordinateSpace::World);

    const FVector PreviousLocation = SplineComponent->GetLocationAtSplinePoint( Turn.PreTurnIndex - 1, ESplineCoordinateSpace::World);
    const FVector NextLocation = SplineComponent->GetLocationAtSplinePoint( Turn.PostTurnIndex + 1, ESplineCoordinateSpace::World);

    const float IncomingStraightLength = FVector::Distance( PreviousLocation, PreTurnLocation);
    const float OutgoingStraightLength = FVector::Distance( PostTurnLocation, NextLocation);

    /*
     * A cubic Bézier quarter-circle uses handles of approximately
     * 0.55228475 * Radius.
     *
     * Unreal's Hermite tangent is approximately three times the
     * equivalent Bézier handle:
     *
     * 3 * 0.55228475 = 1.65685425
     */
    const float ArcTangentLength = Turn.Radius * TurnTangentScale;

    const FVector PreTurnArriveTangent = Turn.IncomingDirection * IncomingStraightLength;
    const FVector PreTurnLeaveTangent = Turn.IncomingDirection * ArcTangentLength;

    const FVector PostTurnArriveTangent = Turn.OutgoingDirection * ArcTangentLength;
    const FVector PostTurnLeaveTangent = Turn.OutgoingDirection * OutgoingStraightLength;

    SplineComponent->SetSplinePointType( Turn.PreTurnIndex, ESplinePointType::CurveCustomTangent, false);
    SplineComponent->SetTangentsAtSplinePoint( Turn.PreTurnIndex, PreTurnArriveTangent, PreTurnLeaveTangent, ESplineCoordinateSpace::World, false);

    SplineComponent->SetSplinePointType( Turn.PostTurnIndex, ESplinePointType::CurveCustomTangent, false);
    SplineComponent->SetTangentsAtSplinePoint( Turn.PostTurnIndex, PostTurnArriveTangent, PostTurnLeaveTangent, ESplineCoordinateSpace::World, false);
}

SplineComponent->UpdateSpline();

BuildRoad();
UpdateRoadSpline();
				
			

Roads demo

One of the biggest systems I’ve worked on for Neighborhoods is the road-building tool, a core gameplay element. I iterated heavily as I figured out how players would want to shape their cities. The original placement system automatically created “dog-leg” turns based on the player’s cursor, but, based on feedback I solicited from project leads, I eventually moved toward a more deliberate system where players place individual road sections and corners themselves, giving them much more control over the final shape.
On the technical side, I built out spline-based road mesh generation that dynamically stretches and tiles road pieces along those paths at runtime, while sharing the same underlying workflow with the editor so designers can build and adjust roads using the same system players do. I also worked closely with our tech artists to make sure the road meshes and textures behaved correctly when deformed along splines.
From there, the system grew to support features like replacing existing roads, detecting collisions with buildings and decor before placement, rebuilding connected road data, and properly destroying and cleaning up roads when players remove them.

Camera Controls & Feel

				
					void UCG1FloatingPawnMovement::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
{
	Super::TickComponent(DeltaTime, TickType, ThisTickFunction);

	ApplyYawRotation(DeltaTime);

	// Consume input every frame, just like movement input.
	PendingYawInput = 0.0f;
}

//...

void UCG1FloatingPawnMovement::ApplyYawRotation(float DeltaTime)
{
	if (!UpdatedComponent)
	{
		return;
	}

	const float DesiredYawSpeed = FMath::Abs(PendingYawInput) > RotationInputDeadZone? PendingYawInput * MaxYawRotationSpeed : 0.0f;

	const float InterpRate = FMath::Abs(DesiredYawSpeed) > KINDA_SMALL_NUMBER? YawRotationAcceleration: YawRotationDeceleration;

	CurrentYawRotationSpeed = FMath::FInterpConstantTo(CurrentYawRotationSpeed, DesiredYawSpeed, DeltaTime, InterpRate);

	if (FMath::IsNearlyZero(CurrentYawRotationSpeed, 0.01f))
	{
		CurrentYawRotationSpeed = 0.0f;
		return;
	}

	const float YawDelta = CurrentYawRotationSpeed * DeltaTime;

	const FQuat CurrentRotation = UpdatedComponent->GetComponentQuat();
	const FQuat DeltaRotation = FRotator(0.0f, YawDelta, 0.0f).Quaternion();

	// Local yaw-style rotation.
	const FQuat NewRotation = CurrentRotation * DeltaRotation;

	MoveUpdatedComponent(FVector::ZeroVector, NewRotation, false);
}

				
			
				
					float ACG1PlayerController::CalculateZoomToActorScreenDistanceAlpha(const FVector& StartWorldLocation, const FVector& TargetWorldLocation) const
{
	FVector2D StartScreenLocation;
	FVector2D TargetScreenLocation;

	const bool bStartProjected = UGameplayStatics::ProjectWorldToScreen(this, StartWorldLocation, StartScreenLocation, false);

	const bool bTargetProjected = UGameplayStatics::ProjectWorldToScreen(this, TargetWorldLocation, TargetScreenLocation, false);

	// Fall back to the longest duration if projection fails.
	if (!bStartProjected || !bTargetProjected)
	{
		return 1.0f;
	}

	int32 ViewportSizeX = 0;
	int32 ViewportSizeY = 0;
	GetViewportSize(ViewportSizeX, ViewportSizeY);

	if (ViewportSizeX <= 0 || ViewportSizeY <= 0)
	{
		return 1.0f;
	}

	const float ScreenDistance = FVector2D::Distance(StartScreenLocation, TargetScreenLocation);

	const float ScreenDiagonal = FVector2D(static_cast<float>(ViewportSizeX), static_cast<float>(ViewportSizeY)).Size();

	if (ScreenDiagonal <= KINDA_SMALL_NUMBER)
	{
		return 1.0f;
	}

	const float NormalizedScreenDistance = ScreenDistance / ScreenDiagonal;

	return FMath::GetMappedRangeValueClamped(FVector2D(ZoomToActorMinScreenDistance, ZoomToActorMaxScreenDistance), FVector2D(0.0f, 1.0f), NormalizedScreenDistance);
}

//...

//--------------------ZoomToActor()--------------------
const float ScreenDistanceAlpha = CalculateZoomToActorScreenDistanceAlpha(ZoomToStartPawnLocation, TargetLocation);

// Farther targets receive longer transitions.
const float DesiredDuration = FMath::Lerp(ZoomToActorMinDuration, ZoomToActorMaxDuration, ScreenDistanceAlpha);

// Allow callers to adjust the speed of the transition.
const float SafePlayRateMultiplier = FMath::Max(PlayRate, 0.01f);

const float TimelinePlayRate = SafePlayRateMultiplier / FMath::Max(DesiredDuration, 0.01f);

ZoomToActorTL.SetPlayRate(TimelinePlayRate);
				
			

From the start, we wanted the camera to make the city feel tactile—almost like the player was rotating and moving a model in their hands. That meant inputs needed to feel smooth and weighted without becoming sluggish or imprecise. I implemented Q/E camera rotation using timeline-driven easing curves, along with custom rotational acceleration and deceleration so quick inputs still feel snappy without the camera starting or stopping abruptly. I also added smoothing to general camera movement for continuous input.
For more contextual interactions, I created a `ZoomToActor` system that can smoothly focus the camera on a selected building or other point of interest, dynamically adjusting zoom distance, movement speed, height, and optional rotation based on the target.
Together, these systems give designers flexible ways to direct the player’s attention while keeping normal city navigation comfortable and predictable.

Keyboard or mouse camera rotation

Contextual zoom in to buildings

Context Aware Object Selection

Selecting various things

				
					//Who should receive the click?
bool ACG1PlayerController::GetPriorityHitUnderCursor(FHitResult& OutHit) const
{
    OutHit = FHitResult();

    FVector WorldOrigin;
    FVector WorldDirection;

    if (!UGameplayStatics::DeprojectScreenToWorld(this, MousePosition, WorldOrigin, WorldDirection))
    {
        return false;
    }

    TArray<TEnumAsByte<EObjectTypeQuery>> ObjectTypes;

    ObjectTypes.Add(UEngineTypes::ConvertToObjectType(CG1CollisionChannels::ECC_Trash));
    ObjectTypes.Add(UEngineTypes::ConvertToObjectType(CG1CollisionChannels::ECC_Decor));
    ObjectTypes.Add(UEngineTypes::ConvertToObjectType(CG1CollisionChannels::ECC_Player));
    ObjectTypes.Add(UEngineTypes::ConvertToObjectType(CG1CollisionChannels::ECC_Building));
    ObjectTypes.Add(UEngineTypes::ConvertToObjectType(CG1CollisionChannels::ECC_Road));
    ObjectTypes.Add(UEngineTypes::ConvertToObjectType(CG1CollisionChannels::ECC_CityBlock));
	ObjectTypes.Add( UEngineTypes::ConvertToObjectType(ECC_Pawn)); //For NPCs

    TArray<AActor*> Ignore;

    if (CurrentBuildable)
    {
        Ignore.Add(CurrentBuildable);
    }

    TArray<FHitResult> Hits;

    UKismetSystemLibrary::LineTraceMultiForObjects(GetWorld(), WorldOrigin, WorldOrigin + WorldDirection * HitResultTraceDistance, ObjectTypes, true, Ignore, EDrawDebugTrace::None, Hits, true);

    if (Hits.IsEmpty())
    {
        return false;
    }

    // Sort trace to order by dist
    Hits.Sort([](const FHitResult& A, const FHitResult& B)
        {
            return A.Distance < B.Distance;
        });

    float NearestDistance = BIG_NUMBER;

    // Find the nearest selectable thing.
    for (const FHitResult& Hit : Hits)
    {
        if (GetCursorHitPriority(Hit) != INDEX_NONE)
        {
            NearestDistance = Hit.Distance;
            break;
        }
    }

    if (NearestDistance == BIG_NUMBER)
    {
        return false;
    }

    int32 BestPriority = INDEX_NONE;
    float BestDistance = BIG_NUMBER;
    bool bFoundHit = false;

    for (const FHitResult& Hit : Hits)
    {
        if (Hit.Distance > NearestDistance + CursorPriorityDepthTolerance)
        {
            break;
        }

        const int32 Priority = GetCursorHitPriority(Hit);

        if (Priority == INDEX_NONE)
        {
            continue;
        }

        if (Priority > BestPriority || (Priority == BestPriority && Hit.Distance < BestDistance))
        {
            BestPriority = Priority;
            BestDistance = Hit.Distance;
            OutHit = Hit;
            bFoundHit = true;
        }
    }

    return bFoundHit;
}

void ACG1PlayerController::UpdateHoveredActorPriority()
{
	FHitResult Hit;

	AActor* NewHoveredActor = nullptr;

	if (GetPriorityHitUnderCursor(Hit))
	{
		NewHoveredActor = GetActorFromCursorHit(Hit);
	}

	if (NewHoveredActor == CurrentBuildable)
	{
		NewHoveredActor = nullptr;
	}

	SetHoveredActor(NewHoveredActor);
}

void ACG1PlayerController::ClickPriorityActorUnderCursor()
{
	FHitResult Hit;

	if (!GetPriorityHitUnderCursor(Hit))
	{
		SetClickedActor(nullptr);
		return;
	}

	AActor* Actor = GetActorFromCursorHit(Hit);

	if (!Actor)
	{
		SetClickedActor(nullptr);
		return;
	}

	HandlePriorityActorClicked(Actor);
}
				
			

One of the core systems I reworked in Neighborhoods was how the game handles hovering over and clicking on objects in the world. Previously, the selection system relied on simple collision traces that often prioritized larger objects like city blocks over smaller objects sitting on top of them, making it difficult to consistently interact with what the player was actually pointing at.
To fix this, I refactored `UpdateClickedActor()` to use a multi-object trace with a custom priority system that distinguishes between buildings, decorations, vehicles, NPCs, roads, and other interactable objects. The system first traces from the cursor into the world to find the nearest object, then extends the trace slightly beyond that point to gather other nearby objects that might be overlapping or sitting on top of it. From there, it evaluates the results using a combination of object priority and distance, ensuring the player selects the intended object without accidentally clicking something hidden farther behind it.
I also added input-mode-specific behavior so players can interact with roads while building them. The result is a much more reliable and predictable interaction system that makes selecting objects feel natural, even in crowded areas of the city.