mail

Button Realms

Portfolio Page

Introduction

I worked for a half year on this project in my third year on the NHTV. This project was fully made in Unreal Engine 4 for the HTC Vive.

In this game you try to survive waves of enemies that come onto your island. You can do that by placing watchtowers for which you have your citizens gather resources. You can also defeat them by pulling out trees and swing them at enemies. Or pick the enemies up and throw them away. There are also several weapons available for the player to use, like a slingshot.

My work

I worked both in blueprints and in C++ for this project. Not all things I made, made it in to the game.

I made in C++ an event system. The event manager could be called from every C++ function or blueprint. The event manager would then pass the event to a custom assigned blueprint. This made making small events for the designer very easy. For example the programmer could assign an event when the building was placed. The designer could then fill this event out in blueprints with spawning, for example firework particles.

I made a simple AI for a tutorial character you see at the start. This was done via behavior trees in Unreal Engine 4. It had several tasks that could be completed. I also made a small chicken AI with behavior trees. It had several behaviors like: walking around, picking the grass, and running away from the player.

Also I made the interfaces for an anvil. These interfaces jump out when you click on it, then you can assign tasks which the smith needs to complete. They will come up in a menu, in which you can cancel or add tasks. This was made with blueprints completely.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
if (tBaseSoldier != nullptr && tDifferenceInPositions.Size() != 0.0f)
{
	//Get the implulse of the hit from the other object and add that as impulse to the capsule component
	FVector tImpulse = FVector(tVelocityVector.X, tVelocityVector.Y, 10000);
	tBaseSoldier->GetCapsuleComponent()->SetSimulatePhysics(true);
	tBaseSoldier->GetCapsuleComponent()->AddImpulse(tImpulse);

	//Get the capsule component velocity and add a scaler to that. Then launch the character according to that velocities X and Y values.
	FVector tCapsuleVelocity = tBaseSoldier->GetCapsuleComponent()->GetComponentVelocity() * mVelocityScalar;
	tBaseSoldier->LaunchCharacter(FVector(tCapsuleVelocity.X, tCapsuleVelocity.Y, mVelocityZ), false, false);

	//Apply the damage to the soldier
	tBaseSoldier->DoDamage(tDamage);
	tBaseSoldier->StopBehavior();

	//Apply damage to himself
	DoDamage(mOwnDamage);
}

Above you see the C++ code for a physics system that I made for when you swing trees or throw rocks against enemies. The enemies would get damage, the object gets some damage too. The enemies would furthermore get an impulse and fly away, this creates a nice effect in game.