Download

Ongoing C++ Gameplay Example Series: Making a Survival Game

Hey,

i wonder what the biggest possible world might be. Do you think its possible to create a DayZ or Arma 3 -sized map and support a decent amount of players? (50-100)

With all the recent improvements to large worlds in 4.7 and 4.8 I’d say definitely possible!

Take a look at ARK:Survival Evolved, I believe they let users host pretty large servers and it’s made in UE4.

I’ve been testing a custom untiled 256km2 world in multiplayer (without objects, just vegetation) without any problems. It’s about the same size as the map for NSF:Rivals.

That’s a lot bigger than DayZ, and almost overkill in my opinion. Unless your game has either driving or flying vehicles I would stick something between 8x8 and 16x16km2.

I still need to work out support for tiled maps though. Has anyone tried disabling world origin shifting alltogether, like described in the docs?

Hi,Tom.
CreateSession, FindSession, JoinSession, Could you tell us about the server connection from the product and the external network of the server list that you used ?
I am now , very troubled and not know how to make a server connection . Could you tell me there even if there is a way that can be done only in the Blueprint?

To start with you don’t need to use Sessions until you get to support Steam or other online subsystems. You can use basic commands to host a game and for others to join the server (as long as the host’s port 7777 is open on his router)

Examples: Command-Line Arguments | Unreal Engine Documentation

Of course you would support this through a UMG menu instead of command lines, but this will get you started quickly when prototyping.

Hope that helps!

  • Tom

Thank you tom answer.
It is , it is that you use the session if you use the online subsystem that !
I am now , I want to realize the network match using the OnlineSystemSteam at some in learning " ShooterGame or MultiPlayShootout " .
And I tried to step street to see the wiki of RAMA , but it does not go well . The detailed procedure of the operation of the operation and UE4 of VS2013 I want to know .
Why not tell me me a detailed procedure ?

Hey,
just a quick question: Can I only open the project with Visual Studio 2013 ? Seems like it, but I can only download Visual Studio Community 2015 on the website. How can I open it with 2015 ? Or is there a 2013 installer somewhere to download ? Can’t find a way to open this project :frowning:

UPDATE: Nevermind, just read 2015 is not supported yet. :wink:

I have yet to work on integrating Steamworks myself into projects. I noticed the docs on this are scarce on this subject and there is a lot involved to get this up and running. I’m afraid I can’t help you besides showing multiplayer shootout, shootergame and the docs you already linked yourself.

  • Tom

So I downloaded the first section to get a better understanding of coding in UE4. Sadly, all sections don’t work with 4.8 and there is far too much code in the master project for me to handle as a beginner :(. Any chance of getting at least section 1 and 2 updated to 4.8 ?

If you wish to go per-section you can grab the section branches instead of master

https://github.com/tomlooman/EpicSurvivalGameSeries/tree/Section-1

And yes those are for 4.7 which is a bit unfortunate but can’t really undo that. If the docs are out of date for 4.8 I can take a look to update where needed though.

Alright, thx! Good thing I can download 4.7 :slight_smile:

Answer Thank you Tom.
I’ll try my best on their own .

nicejob

nicejob!!!!!

Hi! Thank you for your sample. Very nice to play and to learn a lot! I have a question: I imported my own model skinned and rigged, then did a retarget animation, then linked the meta blueprint. It works great, except reloading animations, and changing weapons that didnt play (but the game reload and is able to change to flashlight, just that both animation didnt play) Anyone know’s why? Thank you!

I am not at home with my PC, but trying to help, did you create all the sockets on your new imported mesh?

Hi Alexarg. Yes, I added the three sockets: on pelvis, on spine_03, and on hand_r.

EDIT: I found the issue. I needed to point on weapon blueprint the animation composite for the new character, as pointed the maniquee. So that’s make me wonder if I need to make every weapon for ever character I will add independant. So Does that’s mean lots of same weapon?

EDIT 2: Could enyone please add an example for how to make a type of zombie that shoots? I would love to see more aditions like adding prone and how to add things like that as the iddle without weapon movement, or the nice flash back done by ZioYuri78, as this sample if very fun to tweak it :slight_smile: (and play it!)

Im having problems with multiple PC’s since 9.1
The open command does not work. Any idea?

I’m not in 4.9.1 yet to try out, but it sounds like a general engine bug. Your best bet it to take this to AnswerHub for the support team to look at.

Open works for me, make sure you’re using open 127.0.0.1, and that the session you’re trying to connect to has ?listen in the command line, otherwise you won’t be able to join it.

Hi Tom

Thanks for the great tutorial series ! I learned a lot from it.

I am extending the code to enable spawning objects into the world and then carrying them. Just as into your Pickup() function I have a SpawnNewActor() function hooked up to the B key.


void USCarryObjectComponent::SpawnNewActor()
{
	if (GetIsCarryingActor())
	{
		return;
	}

	if (GetOwner()->Role < ROLE_Authority)
	{
		ServerSpawnNewActor();
		return;
	}
	
	UWorld* const World = GetWorld();
	if (World){
		
		//ConstructorHelpers::FObjectFinder<UBlueprint> MyBlueprint(TEXT("/Game/Test/Stairs/StairsBP.StairsBP"));
		auto Object = StaticLoadObject(UObject::StaticClass(), nullptr, TEXT("/Game/Test/Stairs/StairsBP"));
		
		UBlueprint *BP = Cast<UBlueprint>(Object);
		
		APawn* OwningPawn = Cast<APawn>(GetOwner());

		FActorSpawnParameters SpawnParams;
		SpawnParams.Instigator = OwningPawn;
		SpawnParams.Instigator = OwningPawn->Instigator;

		FVector Location = OwningPawn->GetActorLocation() + OwningPawn->GetActorForwardVector() * 600;

		AActor *SpawnedActor = World->SpawnActor<AActor>((UClass*)BP->GeneratedClass, Location, FVector::ZeroVector.Rotation(), SpawnParams);
		SpawnedActor->SetReplicates(true);
		SpawnedActor->SetReplicateMovement(true);
		OnSpawnNewActorMulticast(SpawnedActor);
	}

}




void USCarryObjectComponent::ServerSpawnNewActor_Implementation()
{
	SpawnNewActor();
}

bool USCarryObjectComponent::ServerSpawnNewActor_Validate()
{
	return true;
}



void USCarryObjectComponent::OnSpawnNewActorMulticast_Implementation(AActor* SpawnedActor)
{
	if (SpawnedActor)
        .......
        .......
		
}



It works fine in singleplayer, the object is spawned when the B key is hit, attached to the end of the boom and I can move it around and drop it when I press the middle mouse button. The problem is in multiplayer. On the server its all fine but on the clients the SpawnedActor parameter in the OnSpawnNewActorMulticast_Implementation function is always null. When I drop the object it appears on both client and server but on spawning it fails to attach to the boom in the client as it is null.

Any thoughts on what might be wrong ?

Thanks !
Sanjit