Abatron - the making of a UE4 Hybrid game =)

Hello everyone! UE4 has a wonderful and growing community which our small team hopes to be part of. We want to share our experiences and joy that we are having while making our FPS/RTS hybrid game called Abatron.

We had already started Abatron in the Source engine and had the game almost ready for demo. We even went to Steam and got Greenlit, but after we saw UE4(imagine jaw drops)… we came to an abrupt stop. For the past couple of months, we have been filling our bellies from the UE4 smorgasbord and began porting our assets over.

Since then, we have fallen in love with the capabilities of the Engine while getting Abatron back to a playable state. Plus, we have been incorporating cool new things UE4 allows us to do. Our current team includes awesome individuals that are great to work with and work well together. And recently, we were happy to welcome Rama to the team from the UE4 community who is also incredible to work with :slight_smile: Joy Joy :slight_smile:

We have alot yet to do and learn, but we will post our progress through our UE4 Journey. :slight_smile:

Animating with Curves and Acceleration

In the following video, I show off the lesser known Curve Editor that we found useful for animations. As we develop animations, we want them to “feel” good to the player. One simple way of doing that is to add an additive layer of animation based off of the character acceleration.

Currently, we are doing typical animations and then adding some procedural layers to them. For UE4, we use the curve editor to draw an acceleration curve and a deceleration curve to our liking. Then, we drive an additive blendspace with that curve value. A big TIP for those wanting to do this, do not load the UCurveFloat* inside of an AnimInstance derived class. UE4 does not like this and you will never load your curve asset, so load them through your character class, thanks to Rama for helping figure that one out.

Enjoy, and have fun with your GameDev :slight_smile:

It looks pretty good! And nice use of curves. :slight_smile: Hope you share more videos like this as you progress.

Good luck!

Nice idea, sounds like Natural Selection 2 a bit like FPS/RTS :slight_smile:
Looking good from the video thanks for sharing :slight_smile:

Thanks Jacky and QBert. We will try to have frequent posts :slight_smile:

Can’t wait to play this game, i voted you guys on greenlight btw :slight_smile:
Any estimation of the release date? Glad you guys ported on UE4, keep up the great work!

Abatron Is Awesome!

I am having so much fun with it!

It’s truly intense FPS as well as RTS, which are my two favorite game genres!

Get ready to have exciting one on one duels with my AI and then go into RTS mode and place buildings that you can rotate any which way you want to build uniquely shaped bases !

And you should know, Devero is an amazing c++ programmer in addition to all of his ground-breaking animation research using UE4 curves and C++ !

He’s combining BP and C++ to do very innovative things :slight_smile:

:heart:

Rama

Awesome Zackstefy! Thanks for the support on Greenlight. We really appreciate everyone who voted for us.
The release date is a moving target but we are taking it day by day. A big component that still needs to be done is the menu system port which we will start on in 4.5, but we will use this thread to post progress, demos… ect… :wink:

Thanks Rama for the compliment :o

I think I have all of your rigging tuts saved for reference haha. Game looks awesome!

One note: wouldn’t it make more sense for the hands to go down as you look up, and the hands go more in the frame as you look down? Opposite of how you have it.

Thanks FatMoth, you are actually very right. I had just reversed the direction to troubleshoot a blending problem right before the recording. Nice Catch! :eek:

Working on getting this guy into UE4 now. Rig is ready and now working on the shading. Leo used Substance Painter to texture this bad boy. :wink:

c29286b1b3a288f53bd07913de3596f43965f916.jpeg

Manalock is in the game, and had way too much fun playing with some shading ideas. Here is some initial work.

Tan Version

Blue Version

Greyish Version

very nice, there was a game called machines that had a similar concept, it was highly underrated. I’ll definitely be keeping an eye on this one.

Good work, the rhino skin looks somewhat like wet using specular, will look lot better using sub surface scattering from 4.5 :wink:
Are the rocks from the vehicle demo or did you made them ?

@crumbaker Thanks, I hadn’t heard of machines and sounds pretty cool.

@Galeon also thanks, I agree with you, i’m curious on the change post 4.5 :slight_smile: Yes, those rocks are from the Vehicle game. They are very Epic rocks. :slight_smile: hehe

Video: Procedural Animation And AI, by Rama

Hi there!

It’s me Rama!

As you know I am working with Devero on Abatron, it’s a lot of fun!


**A Replicating Procedurely-Animated Flying Character With AI**

I wanted to walk you through one way you can do procedural animation in combination with AI in UE4!

See my video below for a demonstration of what I mean!

The entire animation and movement of the flying creature is procedural / AI !

There are no animations for this creature at all, other than 9 still poses!

Yet see how I can completely animate the flying creature by blending the aim offsets from my C++ AI code!

And as you can see in the video, my procedural animation system replicates to the client smoothly!

I use **interploation **to smoothly update the client creature's rotations to match the rotations being sent from the server!

Rama’s Procedurally Animated Flying AI Creature


**Background**

I was given a static mesh of a flying creature looking straight ahead, and did the following:
	
1. Rigged the creature in 3ds max, doing all the manual bone weighting myself

2. Made 9 poses to serve as aim offsets for a blendspace

3. Brought the creature into UE4, setting up the blend space, the custom C++ anim instance, and imported the 9 pose animations

4. Wrote all the C++ to utilize the aim offsets in code and give the creature AI to move around to adjust itself to be able to always look at its target.

One of the key things to note is that I am updating the Animation Blueprint from C++ using a custom AnimInstance class!

Rigging in 3ds Max

If you’d like to do something like this for your own project, I can explain the 3ds max steps!

I used a simple bone chain, refined the bone weighting myself after using envelopes, and then made 9 poses!

As I made each pose and improved the vertex weighting, I reverted the bone chain to straight to update the neutral pose with the most recent vertex weighting info.

Bone Chain 1

Bone Chain 2

Bone Weights

Look Up

Blend Space


**C++ Code Sample**

Below I have included my main engine that controls how my procedurally animated creature works

It goes like this basically

1. if the target is too far away, the AI unit should move closer
2. if the target location is directly above/below the AI unit, AI unit should back up
3. if 1 and 2 work, check and see if the AI unit needs to change rotation to face target
4. if 1-3 work, then update the AI unit's aim offsets via custom C++ anim instance!
5. when #4 happens, send the updates over the network to all clients and have the clients smoothly interpolate to the new net am offset rotations.



```


void AShip::TrackPlayerUnit()
{
	**//Tracked Location! This is the Player Unit's location!**
	FVector TrackedLocation = Tracking_GetTrackedLocation();
	
	**//Is the location too far?**
	const FVector EyeLocation = Mesh->GetSocketLocation("Tip"); **//EYE SOCKET**
	
	**//Using Square Dist checks as they are more cpu efficient 
	//	and these checks run every tick that the unit is doing tracking**
	if( FVector::DistSquared(
			FVector(TrackedLocation.X,TrackedLocation.Y,0),		**//discount Z**
			FVector(EyeLocation.X,EyeLocation.Y,0)				
		)  > MovePosition_TargetIsTooFarDistance * MovePosition_TargetIsTooFarDistance)
	{ 
		Tracking_TargetTooFar = true;
	}
	else
	{
		Tracking_TargetTooFar = false;
	}
	
	**/*
		Location Under Ship?
	*/**
	FRotator AngleToShipCenter = UVictoryCore::StandardizeRotator((GetActorLocation() - TrackedLocation).Rotation());
	
	**//Is the pitch angle from ship center to tracked unit too big?**
	const float PitchToShip = FMath::Abs(AngleToShipCenter.Pitch);
	if( PitchToShip >= MovePosition_AngleToShipMaxAllowedPitchBeforeMove)
	{
		Tracking_NeedToMove = true;
	}

	**//Using a bone further from head for better interp stability**
	FVector StableBonePos = Mesh->GetSocketLocation("Bone011");
	
	FRotator AngleTo = UVictoryCore::StandardizeRotator(
		(TrackedLocation - StableBonePos).Rotation()
	);
	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
	
	
	**//~~~ Get Local Space Rot of New Proposed Angle ~~~**
	FVector AngleToDir 		= AngleTo.Vector();
	AngleToDir 				= ActorToWorld().InverseTransformVectorNoScale(AngleToDir);
	FRotator ActorSpaceRot 	= AngleToDir.Rotation();
	
	**//Creature should adjust position!
	//		unit is too close or too far!**
	if(FMath::Abs(ActorSpaceRot.Pitch) > 80)
	{  
		Tracking_NeedToMove = true;
		return;
	} 
	   
	if(FMath::Abs(ActorSpaceRot.Yaw) > 80 )
	{  
		**//Dont update if yaw is too big!
		//		Turn to face the player's unit!**
		Tracking_NeedToTurn = true;
		return;
	} 

	Tracking_NeedToMove = false;
	 
	**//Pass the new rotation to all clients!
	//		and update aim offsets!**
	SERVER_UpdateSpiritRotationGoal(AngleTo);
	
	if(DrawUnitTrackingTrace)
	{
		UVictoryCore::DrawLine(TrackedLocation,GetEyeLocation());
	}
}


```



Enjoy!

♥

Rama

Our mapper had loads of fun building Geodite Mountain. If you walk into the broken geode, new upgrades become available :slight_smile:

e36080025cc11cbdb8af0ad4351eddb25c09f168.jpeg

Hopefully, we can do enough LOD work too keep it as is. :slight_smile:

Nice work Rama, now the ship has alot more life :slight_smile:

I’ve been working with the artist to figure out some normal map shadowing on the manalock gun. After 3 days of grueling test and iterations, we’ve concluded that Maya 2015 is better at baking normal maps than Xnormal.

I know, there might be some strong opinion about this even our modeler still doesn’t believe the test results since Xnormal runs through his veins for many years. Our new pipeline uses Xnormal to quickly iterate normal map issues, then the final bake goes through Maya 2015.

Here is an example under a very controlled test with exact setups, cages…ect…

I thought it would be good to show off our results. Have fun with GameDev!

This looks very interesting!

Not enough hybrid games out there! Would love to help out testing prototypes if you need a tester.

Gonna keep myself updated on this thread.

Best of luck! /John Oliver