Nimbus Ride

An exciting exploration of C++ classes in Unreal Engine, featuring a unique Nimbus Ride mechanic.
In this project, I explored the fundamentals of C++ within Unreal Engine by creating a Nimbus Ride mechanic. As you can see I'm in my learning stages, this was actually a final project for CS50. The process involved building a series of C++ classes, which were later converted into Blueprints for easy integration within the game. One of the main features is the actor component that spawns clouds beneath the player, providing a magical ride experience. A special pure heart value was introduced, which gets affected based on the player's interaction with specific objects, such as a turtle pickup. This experience was an integral part of my learning journey into Unreal Engine's class structure and functionality, highlighting both the complexities and the creative possibilities of game development using C++.

Skills Used:

Skills Learned:

Nimbus Ride Mechanic Code

C++ implementation of the Nimbus Ride mechanic.
A key feature where clouds spawn under the player, allowing them to ride through the level. This code demonstrates the implementation of the Nimbus Ride mechanic in Unreal Engine. It spawns a rideable actor beneath the player and changes the movement mode to flying.
void UNimbusRide::Ride() { if (RideableActor != nullptr) { ACharacter* Character = Cast<ACharacter>(GetOwner()); if (Character != nullptr) { FVector Location = Character->GetActorLocation(); FRotator Rotation = Character->GetActorRotation(); FVector HalfHeightOffset = FVector(0.0f, 0.0f, Character->GetCapsuleComponent()->GetScaledCapsuleHalfHeight()); Location -= HalfHeightOffset*1.3; FActorSpawnParameters SpawnInfo; // alwaysspawn SpawnInfo.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn; SpawnedActor = GetWorld()->SpawnActor<AActor>(RideableActor, Location, Rotation, SpawnInfo); // Log a message if the spawned actor is valid UE_LOG(LogTemp, Warning, TEXT("SpawnedActor is %s"), SpawnedActor ? TEXT("valid") : TEXT("null")); if (SpawnedActor != nullptr) { // Attach the spawned actor to the owner actor SpawnedActor->AttachToActor(Character, FAttachmentTransformRules::KeepWorldTransform); } // Change the character's movement mode to flying UCharacterMovementComponent* CharacterMovement = Character->GetCharacterMovement(); if (CharacterMovement != nullptr) { CharacterMovement->SetMovementMode(EMovementMode::MOVE_Flying); } } } }

Pure Heart Test Mechanic Code

C++ implementation of the Pure Heart Test mechanic.
This code demonstrates the implementation of the the Nimbus cloud testing the heart of the person who tries to ride it. It checks if the player's heart is pure and grants them the ability to ride the Nimbus if they pass the test.
bool ANimbus::GivePureHeartTest(AActor* PlayerToTest) { bool bHeartIsPure = false; // Check if the player is valid if (PlayerToTest && bCanGiveAway) { // Cast to the player's class which should be Goku Goku = dynamic_cast<AGokuCharacter*>(PlayerToTest); if (Goku) { // Call the function to check the player's heart bHeartIsPure = Goku->IsHeartPure(); if (bHeartIsPure) { // Call the function to give the player the ability to fly UNimbusRide* NimbusRide = Cast<UNimbusRide>(Goku->GetComponentByClass(UNimbusRide::StaticClass())); if (NimbusRide) { if (bOnNimbus) { GiveFlyAbility(); NimbusRide->Ride(); UE_LOG(LogTemp, Warning, TEXT("You ARE on the nimbus!")); UE_LOG(LogTemp, Warning, TEXT("OnNimbus value is: %d"), bOnNimbus); return bHeartIsPure; } else { UE_LOG(LogTemp, Warning, TEXT("You are NOT on the nimbus!")); } } else { UE_LOG(LogTemp, Warning, TEXT("NimbusRide component not found!")); } UE_LOG(LogTemp, Warning, TEXT("You have passed the test!")); return bHeartIsPure; } else { // Give the player a message that they failed the test // TODO: Add message to UI after it's been set up UE_LOG(LogTemp, Warning, TEXT("You have failed the test of heart. You suck!")); return bHeartIsPure; } } } return bHeartIsPure; }
Home
These practice and production projects have extensive information on how they were built.
Portfolio
Game Design
APIs and MCP servers available for public use.
Public Facing
Services
Contact