Unreal Engine 4 versus Unity

Hello all! I am planning the development of my first game but I am stuck on whether or not to use Unreal Engine 4 or Unity, mostly because of performance. I’ve used Unreal Engine 4 and I must say that while the engine is great, it is a little beefy for most computers. I would like my game to run well on lower end computers as well, thus bringing Unity into the picture, but I don’t think Unity can provide the level of visual quality that the Unreal Engine 4 has to offer. Unity provides great performance, but Unreal Engine 4, while it runs well on my computer, it doesn’t seem to run even the simplest of scenes with acceptable performance on lower end computers. Will performance be drastically improved in the future? When I think of how I want my game to look in terms of graphics, I can really only see the Unreal Engine 4 providing the level of realism that I am looking for. There will be plenty of trees, some cabins, and tons of dynamic events. What would you guys recommend? Am I better off using Unity? Sorry if I am not being really specific about this. Thanks! :slight_smile:

If you’re wanting high quality graphics then there’s no engine that would make it run on low-end systems, while UE4 will improve performance over time there’s probably not going to be anything drastic so you might consider using UDK instead where you can still get some of the advantages over Unity but that engine was built for systems from years ago.

From years of playing games on the Unreal engine it is a very GPU heavy task to play games that use it. It’s very shader heavy along with Nvidia GameWorks being integrated, so you are looking at almost everything being accelerated by the GPU. Of course you can always mess with the level of detail of different objects and materials in your game, Unreal has always been known for its scalability with the right tweaking, just try to remember Unreal Engine 4 is new and “next gen” and sacrificing its visual benefits would be a shame.

Unreal does not have Nvidia Gameworks integrated

There are a lot of settings, things to be done, and things to avoid to give good performance. What computer are you running, and what do you want the minimum specs to be?

Hey! Thanks for all the replies. My specifications are:

i7 2600k
16GB Ram
HD 7850 2GB OC
MSI Z68MA-ED55
OCZ Vertex 3 120GB SSD
1TB WD Caviar Black?
Windows 8.1 64-bit

I’m not exactly sure what I want my minimum specifications to be yet as I am still in the process of planning my game, but thinking about how intensive everything may be in the end, I would say the minimum would be:

Vista 64-bit?
Dual Core Intel or AMD Processor?
GTX 460 or a HD 5850?
4GB Ram?

Maybe. As I stated, I am currently in the planning stage. I will be creating a huge open environment that will look similar to these:


And I understand that the Unreal Engine 4 with next-gen visuals in mind, but I was just hoping that my game will at least run fairly well on a 460 unlike Daylight, lol.

If you are unclear which engine to use then I’d suggest making a simple game or prototype in both and fully evaluate the capabilities. You should be able to get up to speed on both fairly fast and can hopefully have a product or two you can release. I’m working on a game in each (one after the other) for the experience. My expectations are very low to modest since the intent is just to get my feet wet in Indie space. Unity Free is ‘free’ but see how much plugins will cost you and the assets. UE4 initial investment is only $19 but surely you’ll want engine updates

Nah you probably don’t want to aim for 64 bit for the Game itself unless you need to address a huge amount of RAM. Normally, only your Editor requires 64 bit due to huge memory requirements. Next, did not play DayLight but as you make a mockup scene use the excellent profiler tools built into UE4. For 60 fps you want to hit 16.6 ms per frame. Break apart your frame and look for bottlenecks in your mockup level.
In Unity Free, the profiler is -NOT- included. That requires a Pro license. Not sure how Free users get by. I personally own a Pro license because Unity Free looks bad too me (no render to texture support)

Yeah, same. That has been pushing me toward Unreal. Also, the price has too. Unity will really need to lower their price if they want to compete with Unreal & CryENGINE. $94/month is just way too much for me starting up whereas $19/month for Unreal is like a dream come true. I think I will be going with Unreal, as it seems like the most logical choice for someone like me who is just starting up. Wish me luck! Thanks for the help! :slight_smile:

By hacking unity and using the profiler anyways. Noone that has the built game can see that you used the profiler.

True, but another feature important to me is Post Process Effects as well as some other graphical features. I would like full-screen effects, and while I can use a cracked Unity Pro license to achieve this, I will have to have the money to purchase a Unity Pro license if I want to release a game made with Pro in the end. I really had my eye on Amplify Motion and Color, lol.

It has been my experience that the performance of Unity is pretty poor. All that reflection used for events-to-function-calls takes its toll. And on mobile devices, a dumb native GL renderer outperformed Unity 2:1 on the same content, while keeping the battery draw lower. I’m not saying UE is a svelte ballerina, but I think you over-estimate the savings you’d get with Unity on min-spec. Build an Unreal scene/game that doesn’t use a lot of effects, and it will run okay on machines below the min-spec you’re aiming for.
Btw: The most important target (market-size-wise) is probably Intel HD 4000 graphics.

Yes but we’re not discussing hacking. Shame on you for bringing that up :eek:

Hello all! I’ve decided to use the Unreal Engine 4. :smiley: I’ve created some base classes in C++ (ABUsableActor, ABUsableItem, and ABPlayableCharacter) that I can base my blueprints off of. I am now working on a base class for an enemy character (part of a group called “The UNKNOWN”) called ABUnknownCharacter. I am trying to decide whether or not I should use Behavior Trees or something else. Originally, the class was going to contain a couple BlueprintImplementableEvent functions:

I was then going to override and handle all these features in Tick. Is this a good way to go or are Behavior Trees better? How limited are they? I will be creating many different characters from ABUnknownCharacter. A lot of these characters will have different behaviors, like running, walking, looking under beds, killing generators that are powering light that the player is under, etc. Which way is the best for what I am trying to do? Thanks! :slight_smile:

I’m still trying to wrap my head around Behavior Trees but they appear to be working great for my game so far. The bot AI atm is very basic though so I’m no expert

Hey! I just decided to code the main functionality using C++ for now mostly because I’m on a business trip and thought, “I can’t wait to get home and work on my project. Why don’t I make some progress? XD”, lol. If you guys don’t mind, can you check out my code and tell me if there is anything wrong with how I set it up? I wrote it on my tablet so some headers are not included such as my project header.

ABUnknownCharacter.h:




#pragma once

#include "ABPlayableCharacter.h"
#include "ABUnknownCharacter.generated.h"

UCLASS()
class AABUnknownCharacter : public ACharacter
{
	GENERATED_UCLASS_BODY()
	
	//Private Functions
	void SearchForPlayer();
	void PlayerFound();
	virtual void Tick(float DeltaSeconds) OVERRIDE;
	
	public:
		//ABPlayerCharacter Found
		AABPlayableCharacter* Prey;
		bool bPlayerSeen;
		
		//Search Radius
		UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Behavior)
		float SearchRadius;
	
		//Implementable Events
		UFUNCTION(BlueprintImplementableEvent, Category = Behavior)
		void OnFoundPlayer(class AABPlayableCharacter* player);
		
		UFUNCTION(BlueprintImplementableEvent, Category = Behavior)
		void WhilePlayerFound(class AABPlayableCharacter* player);
		
		UFUNCTION(BlueprintImplementableEvent, Category = Behavior)
		void OnLosingPlayer(class AABPlayableCharacter* player);
		
		UFUNCTION(BlueprintImplementableEvent, Category = Behavior)
		void OnLostPlayer();
}



ABUnknownCharacter.cpp:




#include "ABUnknownCharacter.h"
#include "ABUnknownController.h"

AABUnknownCharacter::AABUnknownCharacter(const class FPostConstructInitializeProperties& PCIP) : Super(PCIP)
{
	// Set AI Controller
	AIControllerClass = ABUnknownController::StaticClass();
}

void AABUnknownCharacter::Tick(float DeltaSeconds)
{
	// Call Tick
	Super::Tick(DeltaSeconds);
	
	// If a PlayableCharacter has not been seen, search for a PlayableCharacter.
	if (!bPlayerSeen)
	{
		SearchForPlayer();
	}
	// Otherwise, deal with the PlayableCharacter.
	else
	{
		PlayerFound();
	}
}

/* Find a PlayableCharacter and assign the Prey pointer to it. */
void AABUnknownCharacter::SearchForPlayer()
{
	AABPlayableCharacter* character = nullptr;
	TArray<struct FOverlapResult> overlapped;
	
	// If a PlayableCharacter is within the radius,
	if (GetWorld()->OverlapMulti(overlapped, GetActorLocation(), FQuat::Identity, ECollisionChannel::ECC_Pawn, FCollisionShape::MakeSphere(SearchRadius), FCollisionQueryParams(false)))
	{
		// Loop through the array of actors received,
		for (int i = 0; i < overlapped.Num(); ++i)
		{
			// Cast the actor to a PlayableCharacter,
			character = Cast<AABPlayableCharacter>(overlapped*.GetActor());
			
			// If 'character' equals null, prevent further execution,
			if (character == nullptr)
				return;
				
			/* Location of PlayableCharacter */
			const FVector startPoint = character->GetActorLocation();
			/* Direction from this actor to the PlayableCharacter */
			const FVector direction = GetActorLocation() - direction;
			/* End Point */
			const FVector endPoint = startPoint + (direction * SearchRadius);
			
			FHitResult Hit(ForceInit);
			
			// Send a line trace from this actor to the PlayableCharacter/If this actor can see the PlayableCharacter,
			if (GetWorld()->LineTraceSingle(Hit, startPoint, endPoint, FCollisionQueryParams(false), FCollisionObjectQueryParams(FCollisionObjectQueryParams::InitType::AllObjects)))
			{
				// Try casting the actor hit to a PlayableCharacter and if the cast succeeds,
				if(Cast<AABPlayableCharacter>(Hit.GetActor()))
				{
					// Call the BlueprintImplementableEvent 'OnFoundPlayer',
					OnFoundPlayer(character);
					// Set 'bPlayerSeen' to true because the PlayableCharacter has been seen,
					bPlayerSeen = true;
				}
			}
		}
	}
	
	// And set the 'Prey' pointer to the character found.  If no character has been found, then basically set it to null.
	Prey = character;
}

/* Deal with the PlayableCharacter found (aka 'Prey). */
void AABUnknownCharacter::PlayerFound()
{
	// If 'Prey' is not equal to null,
	if (Prey)
	{
		// Get the distance between the PlayableCharacter and this actor,
		float dist = FVector::Dist(GetActorLocation(), Prey->GetActorLocation());
		
		// If 'dist' is greater than 'SearchRadius' (meaning that the PlayableCharacter is getting away),
		if (dist > SearchRadius)
		{
			// Call the BlueprintImplementableEvent 'OnLosingPlayer',
			OnLosingPlayer(Prey);
			// And start a timer (how long this actor has to find the PlayableCharacter) that calls 'PlayerLost' after five seconds.
			GetWorldTimeManager().SetTimer(this, &AABUnknownCharacter::PlayerLost, 5.0f, false);
		}
		else
		// Otherwise,
		{
			// If the timer set above is active, stop it,
			if (GetWorldTimeManager()->IsTimerActive(this, &AABUnknownCharacter::PlayerLost))
				GetWorldTimeManager().ClearTimer(this, &AABUnknownCharacter::PlayerLost);
				
			// And deal with the Player.
			WhilePlayerFound(Prey);
		}
	}
}

/* 'Prey' has been lost so reset. */
void AABUnknownCharacter::PlayerLost()
{
	// Set 'Prey' and 'bPlayerSeen' to their default values,
	Prey = nullptr;
	bPlayerSeen = false;
	// And call the BlueprintImplementableEvent 'OnLostPlayer'. 
	OnLostPlayer();
}



Thanks! :slight_smile: