Kitty Maze Update 0: Win and Loss States

Kitty Maze is the name of a personal project I recently started in Unreal Engine 5. Heavily inspired by the maze pet game in Wizard101 (which was designed by my dad and was inspired by Pac-Man) I aim to create a simple “collectathon” game to get more familiar with Unreal and refamiliarize myself with programming in C++, since I have been almost exclusively coding in C# for the past four years.

First, I got a cute little cat character from the Unreal marketplace and hooked it up as the character.

Then, I started setting up collectibles, a timer, and very simple start and results screens.

ResultsScreen.cpp
void UResultsScreen::ShowResults(bool isWin)
{
	ResultsTitle->SetText(FText::FromString(isWin ? _winText : _lossText));
}

bool UResultsScreen::Initialize()
{
	bool success = Super::Initialize();

	if (!success) return false;

	if (RestartGameButton != nullptr)
	{
		RestartGameButton->OnClicked.AddDynamic(this, &UResultsScreen::RestartGameButtonPressed);
	}

	return success;
}

void UResultsScreen::RestartGameButtonPressed()
{
	AKittyMazeGameMode* gameMode = Cast<AKittyMazeGameMode>(UGameplayStatics::GetGameMode(GetWorld()));
	gameMode->RestartGame();
}

The results screen currently shows a title and has a button to restart. I want to set up a Data Asset for the win and loss text to replace the const strings, but this is good enough for now.

Here is the result after a few hours of effort:

I am pretty happy with my progress so far! This process has made me feel better about working in Unreal and C++ already.

My goal for tomorrow is to implement a simple enemy that will freeze the player for a few seconds.

Thanks for reading! Remember that bad times are just times that are bad.