Building a Real-Time Multiplayer Game With Unity3D and Amazon GameLift

Sdílet
Vložit
  • čas přidán 7. 09. 2024

Komentáře • 38

  • @celestialvamp
    @celestialvamp Před rokem

    Thank you for the video, it was very informative and easy to follow! Looking forward to more of your videaos in the future.

  • @AB-tx5rd
    @AB-tx5rd Před 11 měsíci

    Very good, Alex. Thank you for your videos!

  • @ericyen5926
    @ericyen5926 Před 11 měsíci

    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.

    • @ericyen5926
      @ericyen5926 Před 11 měsíci

      It's offten haapened when i open multiple windosws for testing.

    • @alexandrebruffa
      @alexandrebruffa  Před 11 měsíci

      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.

  • @bixaobs2945
    @bixaobs2945 Před rokem +1

    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.

    • @alexandrebruffa
      @alexandrebruffa  Před rokem

      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.

    • @bixaobs2945
      @bixaobs2945 Před rokem

      @@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.

  • @rikomamadesu
    @rikomamadesu Před 6 měsíci

    may I ask what version of .net framework you used in order to create the "Release" folder of the Gamelift Server SDK?

    • @alexandrebruffa
      @alexandrebruffa  Před 5 měsíci +1

      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.

    • @rikomamadesu
      @rikomamadesu Před 5 měsíci

      @@alexandrebruffa Okay thanks !! do you have any discord?

    • @rikomamadesu
      @rikomamadesu Před 5 měsíci +1

      @@alexandrebruffa Thank you !! really appreciate it.

    • @eqzurbano9785
      @eqzurbano9785 Před 5 měsíci +1

      @@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 🤔

    • @rikomamadesu
      @rikomamadesu Před 4 měsíci

      Any updates ? @alexandrebruffa

  • @batuhans2035
    @batuhans2035 Před rokem

    Thanks for the video, so so so great job :) Could we reach the Unity project?

    • @alexandrebruffa
      @alexandrebruffa  Před rokem +1

      Thanks for the feedback!
      Sure, please check the Medium article in the description, you can find there the Unity package of the project 👍

  • @akshatkumar1315
    @akshatkumar1315 Před rokem

    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🙏

    • @alexandrebruffa
      @alexandrebruffa  Před rokem

      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?

    • @akshatkumar1315
      @akshatkumar1315 Před rokem

      Connection is finally established. Thankyou so much🙏🙏

    • @alexandrebruffa
      @alexandrebruffa  Před rokem

      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.

    • @akshatkumar1315
      @akshatkumar1315 Před rokem

      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.

    • @alexandrebruffa
      @alexandrebruffa  Před rokem

      Awesome, thanks for the update!

  • @Himanshusingh-mu2qf
    @Himanshusingh-mu2qf Před 10 měsíci

    HELLO SIR CONSOLE 0 ERROR BUT ON LOG AMAZONE RUNTIME ERROR SHOWING ME HOW TO FIX THIS PLZ HELP ME

  • @akshaysharma726
    @akshaysharma726 Před rokem

    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

    • @akshaysharma726
      @akshaysharma726 Před rokem

      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

    • @alexandrebruffa
      @alexandrebruffa  Před rokem +1

      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.

  • @user-sk1ej6oz7f
    @user-sk1ej6oz7f Před rokem

    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.

    • @alexandrebruffa
      @alexandrebruffa  Před rokem

      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.

    • @ericyen5926
      @ericyen5926 Před 11 měsíci

      watch out your RegionEndpoint

  • @haziqahmad6802
    @haziqahmad6802 Před rokem

    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

    • @alexandrebruffa
      @alexandrebruffa  Před rokem

      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.

    • @haziqahmad6802
      @haziqahmad6802 Před rokem

      @@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?

    • @alexandrebruffa
      @alexandrebruffa  Před rokem

      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.