Sign In Register

How can we help you today?

Start a new topic
Answered

Unreal Engine Tetris Example

I was able to get the Tetris example up and running only by packaging the project. If I open in PIE, clicking the Login button stops after the following logs. Has anyone else run into this issue? If so, is there a way around this, or will we need to package every time we need to test the game?


UGameSparksModuleLog: Send immediate request: {

    "@class": ".DeviceAuthenticationRequest",

    "deviceId": "player15867795",

    "deviceOS": "IOS",

    "displayName": "player15867795",

    "requestId": "1477971759_43"

}

UGameSparksModuleLog: WebSocket callback: {"@class":".AuthenticationResponse","authToken":"e290d65b-bc9c-44cb-b2dd-a3f7524ee3d6","displayName":"player15867795","newPlayer":true,"requestId":"1477971759_43","userId":"58180f2f9c5f348a0028444d"}

UGameSparksModuleLog: Received auth token

UGameSparksModuleLog: Send immediate request: {

    "@class": ".MatchmakingRequest",

    "matchShortCode": "testMatch",

    "skill": 1,

    "requestId": "1477971760_44"

}

UGameSparksModuleLog: WebSocket callback: {"@class":".MatchmakingResponse","requestId":"1477971760_44"}

UGameSparksModuleLog: Send immediate request: {

    "@class": ".DeviceAuthenticationRequest",

    "deviceId": "player15899534",

    "deviceOS": "IOS",

    "displayName": "player15899534",

    "requestId": "1477971762_45"

}

UGameSparksModuleLog: WebSocket callback: {"@class":".AuthenticationResponse","authToken":"61487db3-5bd2-4dbb-bd5c-c87b0ecc7c9a","displayName":"player15899534","newPlayer":true,"requestId":"1477971762_45","userId":"58180f319c5f348a0028444f"}

UGameSparksModuleLog: Received auth token

UGameSparksModuleLog: Send immediate request: {

    "@class": ".MatchmakingRequest",

    "matchShortCode": "testMatch",

    "skill": 1,

    "requestId": "1477971762_46"

}

UGameSparksModuleLog: WebSocket callback: {"@class":".MatchmakingResponse","requestId":"1477971762_46"}


Best Answer

Hi Chris,


You need two Editors opened to test the real time, because you're simulating two clients looking for a match. So:


- Open two editors

- Click button on each one

- When match is found both games will start

- Pieces are replicated, we found out a gameplay bug where the right shapes arent replicated because we forgot to change a variable, this is fixed for the next update. I'll attach the new classes to give you a better experience. Just replace them with the ones currently in your project.


I also advise you go to your Editor Preferences -> General -> Miscellaneous -> Untick Use Less CPU When in Background checkbox. The reason for this is when you have one editor in the background and you're focused on one Editor the one unfocused will run very slow and give you inaccurate results to the speed of your packets.


Hope this helps,

Omar


1 person has this question

Hi,


What version of the engine are you running the project on?


Cheers,

Omar

4.13.2. Sorry for not including that earlier. I had to convert the project to 4.13 in order for it to open.

Hi Chris, I ran it on 4.13 and it doesn't crash. 


From the logs you gave me it's behaving as it should. Did you change anything in the project? 


Does the crash dump have any useful information? Does a crash dump appear after the editor closes?


Cheers, 

Omar

I also noticed you said you converted the project. Did you delete the Intermediate and Saved file after doing so? This could cause some problems as some cached data is not compatible. 


Hope this helps,

Omar

Thanks, Omar. I should clarify that it's not actually crashing, just nothing happens after receiving the response from the server. I didn't delete the Intermediate and Saved folders, though, so I will try that.
Answer

Hi Chris,


You need two Editors opened to test the real time, because you're simulating two clients looking for a match. So:


- Open two editors

- Click button on each one

- When match is found both games will start

- Pieces are replicated, we found out a gameplay bug where the right shapes arent replicated because we forgot to change a variable, this is fixed for the next update. I'll attach the new classes to give you a better experience. Just replace them with the ones currently in your project.


I also advise you go to your Editor Preferences -> General -> Miscellaneous -> Untick Use Less CPU When in Background checkbox. The reason for this is when you have one editor in the background and you're focused on one Editor the one unfocused will run very slow and give you inaccurate results to the speed of your packets.


Hope this helps,

Omar

That's much better, but do you know why Play In Editor doesn't work the same if I set it to open 2 windows from one editor?

Hey Chris,


It's because

-A single GameSparks module lives in an instance of a game. 

-The module opens a socket for one user to the backend.

-An editor is considered a  game.

-There can't be two devices sharing one game instance.

-GameSparks authenticates one user per one device. The second user authenticating disconnects the first.

-Unreal's networking simulates two clients on one device.

-GameSparks SDK doesn't understand that and still considers it as one client, one device hence overwriting its previous authentication.


Hope this helps!

Omar

Makes perfect sense, thanks! Is there any possibility of a future fix/workaround for this as support grows for the UE4 SDK?

Nothing in the works right now unfortunately. Unless a lot of people demand it we will not support it since it requires the us to change our SDK from a fundamental level. It is a small inconvenience compared to the work that needs to be done for it.


Please let us know how you get on and if we can make your experience better!


Cheers,

Omar

Hi,

I tried everything and still both Unreal editors 4.17 acts like one, even after i delete saved and intermediate folders. I have checking to prevent multi logging from one account and after logging from the one editor the other disconnects like they are the same, although i am logging with different users!? Where could be the problem?


Tnx,

Mariyan

Ok,i used device authentication request and it works now.

Login to post a comment