I wanted to express my gratitude for your excellent teaching. I've learned a lot from your guidance. However, I've been facing some issues with my work lately. While the work itself is proceeding normally, I've been experiencing frequent disconnections. These disconnections tend to occur when I'm in the middle of performing a task, making it challenging for me to maintain productivity. I apologize for not being able to provide a more detailed description or reproduce the issue consistently. Nevertheless, I would greatly appreciate it if you could suggest any possible solutions or steps I can take to address this problem.
Hi Eric! Thanks a lot for your feedback, I really appreciate it! Regarding the problem you are facing, I implemented those disconnections to avoid consuming server resources when app is minimized or out of focus. To disable it, please go to the AppController script and comment the functions that cause the disconnection. Please tell me if it solved your problem.
Thank you for the video, it was very informative and easy to follow! BUT i Ran into a problem, in the script names as "ServerConnect", there is a line as InvokeResponse response = await client.InvokeAsync(request); InvokeAsync(request) is throwing an error. There is no argument given that corresponds to the required formal parameter 'callback' of 'AmazonLambdaClient.InvokeAsync(InvokeRequest, AmazonServiceCallback, AsyncOptions)'. What can i do to resolve this. Stuck on this since 10th Aug. PLEASE HELP!! Thanks.
Hi! Thanks for the feedback! About the error you got, the InvokeAsync function accepts only one parameter: the function name. docs.aws.amazon.com/sdkfornet/latest/apidocs/items/MLambdaLambdaInvokeAsyncStringNET45.html Are you sure you are using the version 2 of the AWS SDK for .NET? Please check the Medium article to get the download link. Please tell me if you could solve the problem.
@@alexandrebruffa Yeah, this issue is resolved. Instead of this AsyncOptions asyncOptions = new AsyncOptions(); InvokeResponse response = await client.InvokeAsync(request); i used this: AsyncOptions asyncOptions = new AsyncOptions(); AmazonServiceCallback callback = (result) => { if (result.Exception != null) { tcs.SetException(result.Exception); } else { tcs.SetResult(result.Response); } }; client.InvokeAsync(request, callback, asyncOptions); var response = await tcs.Task; Shared the code, it might be helpful for others.
Hi! Sorry for the delay, I missed your message. Thanks for watching my video. The GameLift website actually changed, let me perform some tests, and I answer you.
@@alexandrebruffa tried this on the latest .NET framework and there is no ''release' folder after the build, only the debug. There is also a bunch of warnings for possible error after I built it 🤔
Hey, the tutorial is really helpful. I did the complete Unity/gamelift setup, but the time I start the game in Unity UI shows "Connecting to Game Server" and Unity got completely crashed/stopped. After investigating(checking logs file) I realize it may happens when "_client.Connect(ipAddr, port, UDPListenPort, token);" get executed in ServerConnect.cs file. Please help me fix this issue🙏
HI! Thanks for the feedback! I'm sorry to hear that. In the Canvas of the Unity project, you can enable the "log" object; it will help you to see what's wrong. About the error you got, it seems that the game server has been created successfully, but you can not access it. Can you check in your GameLift console if your GameLift is running correctly? Can you check in CloudWatch if the Lambda function has been called successfully? If so, do you have some firewall or something installed on your machine that could block the ports and makes the connection fail?
This is excellent news!! What was finally wrong with your implementation? How did you manage to make it work? I'm thinking about creating a video with a debugging session of this implementation.
Actually my game and player sessions were getting created correctly (confirmed by checking logs of both server and client side), but my machine was configured with a proxy which was blocking the connection. I removed the proxy setup, and woah! my game started.
Thanks for the video Alex! I am getting this error: Assets\Scripts\ServerConnect.cs(7,7): error CS0246: The type or namespace name 'Amazon' could not be found (are you missing a using directive or an assembly reference?) I followed all the step you did in the video also seen the article on medium. Please help. thanks
but now on running the scene getting this: Unloading broken assembly Assets/Plugins/AWSSDK.CognitoIdentity.dll, this assembly can cause crashes in the runtime Unloading broken assembly Assets/Plugins/AWSSDK.Lambda.dll, this assembly can cause crashes in the runtime
Hi! Thanks a lot for the feedback! About the first error you mentioned, it seems to be because your Unity project does not recognize the AWS SDK dll files. Did you download the files and place them in the Plugins folder of your Unity project? About the second error, please check the Player Settings of your Unity project. The scripting backend should be "Mono", and the API Compatibility Level should be ".NET Standard 2.1". Please tell me if you could solve the problem.
Thank you very much for such a complete tutorial for creating an online game. I almost managed to repeat it, but I ran into a problem that I really can't figure out how to solve. Could you help me with this? The problem is related to GameLiftServer, there are no errors in Unity, but still the program just says "Error connecting to server". Maybe there are some restrictions in using AWS for my region, I don't know. If you have the opportunity to get in touch and help, I will be very grateful to you! This is my first game project.
Hi! Thanks for watching my video! What are the last messages you can see in the Unity console? Also, can you check the "Events" tab in your fleet dashboard? Just to be sure that the fleet is running correctly. If not, there is a problem with the script you uploaded.
Hi, thank you for this short video. This is amazing!!! I really need something like this. But I run into a problem when running the Unity game. The game cannot connect to the server. The UI display shows: "Connection with Game server has been lost, please try again." No error in the console. It just shows: "Reaching out to client service Lambda function". Lambda code source (No Error) Identity pool (Active) Gamelift fleet (Active) Please I need help... Thanks
Hi Aziz! Thanks for the feedback, I really appreciate it! Regarding this UI message, it displays when the application is out of focus. You can remove or comment the functions "OnApplicationFocus" and "OnApplicationPause" in the file AppController if you don't like this behavior. Please tell me if it solved the problem. You also can enable the "log" object in the Canvas hierarchy to show more log messages. Best.
@@alexandrebruffa Thank you for the fast feedback!! I followed your instructions, but the gameplay is stuck at "Matching Game Server.." and nothing happened. Should I change the other server? Or did I miss some steps?
Hi! No worries! Can you please enable the "Log" object located in the Canvas hierarchy and tell me what are the last messages you can see? Please send screenshots to my personal email: alexandre.bruffa@gmail.com, it will be easier to help you.
Thank you for the video, it was very informative and easy to follow! Looking forward to more of your videaos in the future.
Thanks for the feedback, I really appreciate it!
Very good, Alex. Thank you for your videos!
Thank you, I really appreciate it!
I wanted to express my gratitude for your excellent teaching. I've learned a lot from your guidance.
However, I've been facing some issues with my work lately. While the work itself is proceeding normally, I've been experiencing frequent disconnections. These disconnections tend to occur when I'm in the middle of performing a task, making it challenging for me to maintain productivity.
I apologize for not being able to provide a more detailed description or reproduce the issue consistently. Nevertheless, I would greatly appreciate it if you could suggest any possible solutions or steps I can take to address this problem.
It's offten haapened when i open multiple windosws for testing.
Hi Eric! Thanks a lot for your feedback, I really appreciate it!
Regarding the problem you are facing, I implemented those disconnections to avoid consuming server resources when app is minimized or out of focus. To disable it, please go to the AppController script and comment the functions that cause the disconnection.
Please tell me if it solved your problem.
Thank you for the video, it was very informative and easy to follow!
BUT i Ran into a problem, in the script names as "ServerConnect", there is a line as
InvokeResponse response = await client.InvokeAsync(request);
InvokeAsync(request) is throwing an error. There is no argument given that corresponds to the required formal parameter 'callback' of 'AmazonLambdaClient.InvokeAsync(InvokeRequest, AmazonServiceCallback, AsyncOptions)'.
What can i do to resolve this. Stuck on this since 10th Aug.
PLEASE HELP!!
Thanks.
Hi! Thanks for the feedback!
About the error you got, the InvokeAsync function accepts only one parameter: the function name.
docs.aws.amazon.com/sdkfornet/latest/apidocs/items/MLambdaLambdaInvokeAsyncStringNET45.html
Are you sure you are using the version 2 of the AWS SDK for .NET? Please check the Medium article to get the download link.
Please tell me if you could solve the problem.
@@alexandrebruffa Yeah, this issue is resolved.
Instead of this
AsyncOptions asyncOptions = new AsyncOptions();
InvokeResponse response = await client.InvokeAsync(request);
i used this:
AsyncOptions asyncOptions = new AsyncOptions();
AmazonServiceCallback callback = (result) =>
{
if (result.Exception != null)
{
tcs.SetException(result.Exception);
}
else
{
tcs.SetResult(result.Response);
}
};
client.InvokeAsync(request, callback, asyncOptions);
var response = await tcs.Task;
Shared the code, it might be helpful for others.
may I ask what version of .net framework you used in order to create the "Release" folder of the Gamelift Server SDK?
Hi! Sorry for the delay, I missed your message.
Thanks for watching my video. The GameLift website actually changed, let me perform some tests, and I answer you.
@@alexandrebruffa Okay thanks !! do you have any discord?
@@alexandrebruffa Thank you !! really appreciate it.
@@alexandrebruffa tried this on the latest .NET framework and there is no ''release' folder after the build, only the debug. There is also a bunch of warnings for possible error after I built it 🤔
Any updates ? @alexandrebruffa
Thanks for the video, so so so great job :) Could we reach the Unity project?
Thanks for the feedback!
Sure, please check the Medium article in the description, you can find there the Unity package of the project 👍
Hey, the tutorial is really helpful. I did the complete Unity/gamelift setup, but the time I start the game in Unity UI shows "Connecting to Game Server" and Unity got completely crashed/stopped.
After investigating(checking logs file) I realize it may happens when "_client.Connect(ipAddr, port, UDPListenPort, token);" get executed in ServerConnect.cs file.
Please help me fix this issue🙏
HI! Thanks for the feedback!
I'm sorry to hear that. In the Canvas of the Unity project, you can enable the "log" object; it will help you to see what's wrong. About the error you got, it seems that the game server has been created successfully, but you can not access it.
Can you check in your GameLift console if your GameLift is running correctly? Can you check in CloudWatch if the Lambda function has been called successfully? If so, do you have some firewall or something installed on your machine that could block the ports and makes the connection fail?
Connection is finally established. Thankyou so much🙏🙏
This is excellent news!!
What was finally wrong with your implementation? How did you manage to make it work? I'm thinking about creating a video with a debugging session of this implementation.
Actually my game and player sessions were getting created correctly (confirmed by checking logs of both server and client side), but my machine was configured with a proxy which was blocking the connection. I removed the proxy setup, and woah! my game started.
Awesome, thanks for the update!
HELLO SIR CONSOLE 0 ERROR BUT ON LOG AMAZONE RUNTIME ERROR SHOWING ME HOW TO FIX THIS PLZ HELP ME
I answered your email, hope it helps!
Thanks for the video Alex!
I am getting this error:
Assets\Scripts\ServerConnect.cs(7,7): error CS0246: The type or namespace name 'Amazon' could not be found (are you missing a using directive or an assembly reference?)
I followed all the step you did in the video also seen the article on medium.
Please help. thanks
but now on running the scene getting this:
Unloading broken assembly Assets/Plugins/AWSSDK.CognitoIdentity.dll, this assembly can cause crashes in the runtime
Unloading broken assembly Assets/Plugins/AWSSDK.Lambda.dll, this assembly can cause crashes in the runtime
Hi! Thanks a lot for the feedback!
About the first error you mentioned, it seems to be because your Unity project does not recognize the AWS SDK dll files. Did you download the files and place them in the Plugins folder of your Unity project?
About the second error, please check the Player Settings of your Unity project. The scripting backend should be "Mono", and the API Compatibility Level should be ".NET Standard 2.1".
Please tell me if you could solve the problem.
Thank you very much for such a complete tutorial for creating an online game. I almost managed to repeat it, but I ran into a problem that I really can't figure out how to solve. Could you help me with this?
The problem is related to GameLiftServer, there are no errors in Unity, but still the program just says "Error connecting to server". Maybe there are some restrictions in using AWS for my region, I don't know.
If you have the opportunity to get in touch and help, I will be very grateful to you! This is my first game project.
Hi! Thanks for watching my video!
What are the last messages you can see in the Unity console? Also, can you check the "Events" tab in your fleet dashboard? Just to be sure that the fleet is running correctly. If not, there is a problem with the script you uploaded.
watch out your RegionEndpoint
Hi, thank you for this short video. This is amazing!!! I really need something like this.
But I run into a problem when running the Unity game. The game cannot connect to the server. The UI display shows: "Connection with Game server has been lost, please try again." No error in the console. It just shows: "Reaching out to client service Lambda function".
Lambda code source (No Error)
Identity pool (Active)
Gamelift fleet (Active)
Please I need help... Thanks
Hi Aziz! Thanks for the feedback, I really appreciate it!
Regarding this UI message, it displays when the application is out of focus. You can remove or comment the functions "OnApplicationFocus" and "OnApplicationPause" in the file AppController if you don't like this behavior. Please tell me if it solved the problem. You also can enable the "log" object in the Canvas hierarchy to show more log messages.
Best.
@@alexandrebruffa Thank you for the fast feedback!!
I followed your instructions, but the gameplay is stuck at "Matching Game Server.." and nothing happened. Should I change the other server?
Or did I miss some steps?
Hi! No worries!
Can you please enable the "Log" object located in the Canvas hierarchy and tell me what are the last messages you can see? Please send screenshots to my personal email: alexandre.bruffa@gmail.com, it will be easier to help you.