The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Game Freeze issue (Unity3D with PUN+) - help needed!

naz89
2014-08-02 00:07:21

Hello everyone, I guess I need your help. We are stuck in a very frustrating situation and I hope I can find someone to guide us through this here. So i'll get straight into the point and give you a brief about the situation.

We have created a Multiplayer card game for Android (currently live) & iOS (to be released) by outsourcing with an offshore game design company. I did some research and decided to use Unity3D with Photon Unity Networking Plus.

Here is an overview about the game: Each room has a table with 4 players which can be human players or A.I. Users can rejoin running games (they replace one of the A.I players when there are any). Each player has a 15 seconds timer that starts running when his turn comes, when the timer runs out, a random card is played and the turn is passed to the next player.

We are facing a major setback which is killing the game and most users are abandoning the game because of it. Basically the entire game freezes at some point during the game (I am unable to reproduce the bug during testing, but it occurs very frequently in the live version). The timer of one of the players runs out and the game freezes for all players. One of the players sees a different state than the others, and the other three players see the same state. The state of the game doesn't get back to normal operation until the player who caused the freeze leaves the room (I am also unable to figure out which player causes the freeze). The company which developed the game gave up on solving the issue and now we are left with these options:

  1. Find another company and send the entire source code again on the hope of getting the issue fixed.
  2. According to the recommendation of the head developer, using Photon Server instead of Photon Cloud "could" solve the problem because then we have more control and we can build our own backend. But this would also need rewriting the code.
  3. Release the iOS version with the bug present, and risk losing the good potential of the game.

I would like to hear advice from someone who had a similar situation. Could someone help me figure out at least what is causing this issue (Packet loss, Delay, loss of state synchronization, etc)?

Should we give up on solving the issue without changing the architecture of the game? We are bootstrapping the entire project and I am sure your guidance will save us a lot of time and money so I appreciate your support :D

Comments

Tobias
2014-08-04 10:45:09

This is a really tricky situation. It's very unfortunate that the developers gave up. I don't know if they got in contact with us before. It doesn't sound familiar.

The cause for this issue can be just about anything. Even though you describe it well, the symptoms fit for a lot of situations: logic issue, timing, badly handled networking issues, etc.

If you can't reproduce it, basically the only option is to get access to the client logs of games that broke. You can temporarily log to some string and then send it to a webpage on demand (button-press). Or you could send any log (including those loaded after a crash) and then make players report broken games. You could wrap up the player logs per game (room name) in best case.

The logs are a first step but maybe don't even help really. It's just comparatively easy. If it makes sense to look at the project depends a lot on the complexity, how readable the project is and how much you want to invest. Due to that, I could not give advice on that.

I will ask my colleagues to take a look. Maybe the business side has more ideas.

naz89
2014-08-08 12:00:02

Thank you for your response. We were previously able to reproduce the issue during testing sessions but as you said, the logs were not really of much help. The developers spent 2 weeks trying to figure it out but no luck. So we have made the decision to release a beta iOS version with the issue present and move to Photon Server in case the game looks promising. Even with the presence of this issue, the android version has 14000 active users (and increasing) and about 65000 downloads but it's not making a good revenue because in our target region most users do not connect their android phones with their credit cards. So I hope the case will be different with iOS and we might be able to monetize better. Then we can restructure the game and solve this issue for good. I'll update this thread whenever I have more information. I think a real life comparison between the difficulties of development using Photon Cloud and Photon Server would be helpful for future developers who are planning to use Photon.

Back to top