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

Hi!

Did you compile the source with your own Visual Studio or did this come fresh from the repository? If it’s fresh can you try rebuilding it in VS2015, otherwise you may need to double-check your build configuration in VS, “Development Editor” + Platform: “Win64”.

Hi,

I installed VS 2015 community and removed VS2013. I noticed when I build source its defaulting to VS2013 and engine 4.7. I believe VS2015 is only supported for 4.10 and above. I could not find an environment variable to change so I am not sure how its defaulting; I thought this project was based on the aforementioned? If so, any idea how to make this happen. In the short term, I assume I can point everything to 4.10 within each project and override the defaults? Appreciate the clarification.

Yeah you should simply be able to make it point to 4.10 and build the project from inside Visual Studio 2015.

What About mac version? tried compiling section 1 got error message, i will try branch and see anymore errors

After changing UAudioComponent’s access from protected to public in STimeOfDayManager.h, I no longer get the error.

Thanks for the suggestion Rubick. I tried the same, but it did not solve the warning on my end, something else must be going wrong internally.

can update to 4.12?

I have a problem at update to the 4.12 directly from 4.10 from Github.

After patch some changes in the 4.12 API following the and others guide 4.12 Transition Guide - C++ - Epic Developer Community Forums I get a problem at the end when looks like all is done at compile I get this error:

Edit*: Looks like need include in the Build file the “GameplayTasks” module

Hi All!

I’ve just upgraded the project to 4.12 on GitHub (Including the GameplayTasks people have experienced)

https://github.com//EpicSurvivalGameSeries

I spend some hours today updating and now you go and update xD Fine!

I tried to change the UMG files but is not possible in 4.12 is bugged and the engine crash Serious UMG BUG can't do nothing - Platform & Builds - Epic Developer Community Forums

By the way for when the fix of the jump in the air ? At jump in the air you need to calculate different size of translation.

*The packaged version/compiled in 4.12 don’t show or don’t have mouse in the menus.

*Bullet decal direction is wrong.

I am newbie to game development, and to unreal too… I am reviewing the project and I have a first question, maybe someone can help, when a new bot is spawned the code seems very simple …



	FActorSpawnParameters SpawnInfo;
	SpawnInfo.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AdjustIfPossibleButAlwaysSpawn;

	ASZombieAIController* AIC = GetWorld()->SpawnActor<ASZombieAIController>(SpawnInfo);
	RestartPlayer(AIC);


I don’t understand how does the engine know it has to build and spawn an instance of Zombie Character blueprint from this… can anyone help me understand the mechanics behind this?

thanks in advance and kind regards

David

Hi David,

I totally understand the confusion. It’s a bit of an obscure system. If you search for GetDefaultPawnClassForController_Implementation inside SGameMode.cpp you’ll find how it figures out which BotClass to use for the AI controller.

That function is called internally by the game framework when you call RestartPlayer(Controller)

Hope that helps.

[MENTION=156] [/MENTION] there is a problem when play and the player dead some times the engine crash or just freezes but not sure why.

Do you have a call stack or any log message / crash info that could help track this down?

I’ll check the next time but the engine just freeze and there is not report or something, I think is related with this https://github.com//EpicSurvivalGameSeries/issues/14 but not sure I need to give a check with the debugger or something.

He he… Just a couple lines below… thank you so much!!!

I pulled down the 4.12 version and got the same error. Am I missing something? Looking forward to digging into what you have done . I appreciate it.

Error /Game/Maps/CoopLandscape_Map : Failed import for AudioComponent /Game/Base/BP_TimeOfDayManager.Default__BP_TimeOfDayManager_C:AmbientAudioComp

The suggested fix did not work for me either. I wonder why it’s complaining about the component.

Very nice tutorial! I am looking at the sprinting part, but I am not sure how IsSprinting(), and bWantsToRun actually changes the speed of the player character. could you give me a hint?

Have a look at the custom CharacterMovementComponent class, that’s what modified the walking speed. You can also find it by searching the project for IsSprinting()