chris-gong / gamelift-example-ue4 Goto Github PK
View Code? Open in Web Editor NEWSample project integrating AWS GameLift with Unreal Engine
License: MIT License
Sample project integrating AWS GameLift with Unreal Engine
License: MIT License
Need to do this eventually, maybe in a separate branch. May be worth branching out the current version in a branch called 4.24/4.25.
This is another reminder for me that I have to modify the readme so that it is more up to date and has all the information needed to prepare, build, and run the project. Also, I plan on including architecture graphics to give a better higher level overview of what's going on. This is a huge priority once part 8 of the tutorials is released, because that should be the last video in which we write major code.
If anyone else has any suggestions for what should be added to the readme, then please comment on this issue!
Currently, when a user logs in for the first time, the Google sign in goes as expected. However, upon the second time running the menu level, if the user wants to sign in through a different Google account, it will log in automatically via the account used in the first login. The only way that I know of to sign in as a different user is to delete the Saved/webcache folder in the project.
This is more of a reminder for myself, but for some reason, not sure if this is a Unreal Engine thing or a Visual Studio thing, but when I define member variables that are labelled UPROPERTY
in a header file, those member variable definitions get an extra tab of space by default. After part 11 of the tutorials is finished, I think I'm going to just get rid of these extra tabs in all of the header files. In addition, I think that I should get rid of extra tabs and spaces, specifically in the GameLiftTutorialCharacter.cpp class, but also in other files where this occurs. I believe that the last point has to do with normalized line endings but I could be wrong.
The project compiles fine in Visual Studio for a server configuration, but these errors occur when trying to build the project for an editor/client configuration:
'AGameLiftTutorialGameMode::StopBackfillRequest': must return a value
'AGameLiftTutorialGameMode::CreateBackfillRequest': must return a value
This is only for the master branch and occurred when I added new methods in the GameLiftTutorialGameMode.cpp class, but didn't add return statements outside of the #if WITH_GAMELIFT and #endif compiler directives for a couple of new functions. The #if WITH_GAMELIFT directive only evaluates to true when the build target is of type server. However, the CreateBackfillRequest
and StopBackfillRequest
methods have non-void return types. Therefore, we need return statements outside of the compiler directives. Otherwise, when building for a non-server configuration, Visual Studio will think that the function has no return statement, which is syntactically incorrect for any function written in C++ that returns something.
Due to a recent Chrome update, when logging into google through an external application, the latest version of Chrome has to be used; otherwise the following popup appears when trying to sign in:
The odd thing is that this only applies to older accounts. For example, the account I made last week does not go through this screen when logging in. Also, I am pretty sure it's the chrome version because the sign in link works for all my accounts on my actual web browser outside the game.
Try to remake Google sign-in that's it really
In the GameLiftTutorialWidget
class, specifically on this line, the GetWorld()->GetGameState()->PlayerArray
variable may not be populated by the time the SetTeammateCount
function is called, which gets called right after
the client's UI is created. This makes sense as the GameState
may not have finished initializing yet.
Although I'm not sure if I will get to fixing this as the main priority currently at the time of writing this is to work on a completely new example project for Unreal Engine 5, a way around this would either be to add a null pointer check around the variable in that same spot, or invoke SetTeammateCount
after BeginPlay
is called instead of NativeConstruct
. I believe the latter is better because if the if-check fails then your UI will never be populated unless you add more code to address that scenario.
I am trying to build your example project. I copied the server and the client .dlls and .libs into their respective plugin folders. However when I attempt to build the project the error:
UnrealBuildTool : error : Unable to instantiate module 'AWSCore': aws-c-common.lib not found. Expected in this location: C:\Users\jeffd\Documents\GitHub\gamelift-example-ue4\Plugins\GameLiftClientSDK\ThirdParty\GameLiftClientSDK\Win64\aws-c-common.lib 1> (referenced via GameLiftTutorial.uproject -> GameLiftClientSDK.uplugin) 1> (see ../Programs/UnrealBuildTool/Log.txt for full exception trace) 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(49,5): error MSB3073: The command "D:\Games\Epic\UE_4.21\Engine\Build\BatchFiles\Rebuild.bat GameLiftTutorialEditor Win64 Development "C:\Users\jeffd\Documents\GitHub\gamelift-example-ue4\GameLiftTutorial.uproject" -WaitMutex -FromMsBuild" exited with code -1. 1>Done building project "GameLiftTutorial.vcxproj" -- FAILED.
is thrown. I am not sure where I am suppose to obtain this .lib
I think you meant to link to a source to obtain all .dll and .lib files needed but they are missing from the readme. I used the link that was provided in your youtube video but that source seems to be missing the above mentioned .lib
Need to check if anything references the start content assets and test this out with a new packaged client and server build, but I believe that none of the assets in the Content/StarterContent folder are being used.
Calls to AGameSession::KickPlayer
do not seem to be working. A workaround suggested by someone is to destroy the player controller on the server.
I am not exactly sure what my plans are with this yet. I know that I will want to add on to this project. However, I also don't want to touch the master branch because I want anyone who watches the tutorial series to be able to refer to the original code base of this repository. I do have ideas, but I will comment them on this issue once I am actually actively working on those new features.
If anyone else has any suggestions for useful features for better learning GameLift that can possibly be added on to this project, please leave a comment on this issue!
--------- New feature ideas and modifications ----------
InitSDK
fails (link)if (Ptr != nullptr)
can be if (Ptr)
GetPlayerSessionsCount
method that I added in the GameLift Server SDK since GetPlayerSessions
sets an integer parameter passed in addition to returning a pointer to a collection of player sessions in the result from a call to DescribePlayerSessions
.GetWorld()->URL.Port
and assign it to ProcessParameters
passed to ProcessReady
so still not scalable) <- apparently Unreal handles port assignment automatically and all you have to do is GetWorld()->URL.Port
?A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.