Tic Tac Toe Cant Start Game

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

johnckl3d
Posts: 1
Joined: 24 Jul 2016, 04:26

Tic Tac Toe Cant Start Game

Postby johnckl3d » 24 Jul 2016, 04:30

Hi, I've managed to run the server and created the client using unity. I opened two clients using different username and joined the same room. However, the game didn't start and it says waiting for opponent even though the room chat still works. I've used the zone configurator to run the tris extension. Any idea what could be the problem? thanks in advance.
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Tic Tac Toe Cant Start Game

Postby Lapo » 25 Jul 2016, 08:12

Hi,
are you running one of our official examples or is it your own game?

If the latter you should explain what in your code triggers the start of a game. Are you using the SFSGame Room? A regular Room?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
Ardito
Posts: 128
Joined: 12 Sep 2016, 11:26
Location: Italy

Re: Tic Tac Toe Cant Start Game

Postby Ardito » 14 Sep 2016, 15:31

It's true, it's impossible starting game on official example Tic Tac Toe
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Tic Tac Toe Cant Start Game

Postby Bax » 15 Sep 2016, 08:58

Not sure what's wrong with your setup, but the demo works as expected.
Did you check the server and client logs for errors?
Paolo Bax
The SmartFoxServer Team
Ardito
Posts: 128
Joined: 12 Sep 2016, 11:26
Location: Italy

Re: Tic Tac Toe Cant Start Game

Postby Ardito » 15 Sep 2016, 09:11

When you connect to a game with 2 accounts, the "Start Game" button is not clickable.

I checked the server and everything works perfectly.

In the error log of Unity remains empty.
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Tic Tac Toe Cant Start Game

Postby Bax » 15 Sep 2016, 09:23

After logging in, one of the clients clicks the "Start new game" button, creating and joining the Room.
The other client clicks on the Room name and joins the same game, and the match starts.
In the code the start button is never set to interactable=false, so something else must be going on.
What version of Unity are you using?
Also, are you using the latest version of both SFS2X and the Tris example?
Paolo Bax
The SmartFoxServer Team
Ardito
Posts: 128
Joined: 12 Sep 2016, 11:26
Location: Italy

Re: Tic Tac Toe Cant Start Game

Postby Ardito » 15 Sep 2016, 10:05

I make this procedure you said:
After logging in, one of the clients clicks the "Start new game" button, creating and joining the Room.
The other client clicks on the Room name and joins the same game, and the match starts.

The start button is set interactable=false and never forget interactable=true

My Unity Version: 5.3.5f1

I use SFS2X version 3, downloaded from Assets Store, but I downloaded the latest .dll from the official site
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Tic Tac Toe Cant Start Game

Postby Bax » 15 Sep 2016, 10:22

I don't know what "SFS2X version 3" means, sorry.

The latest version of SFS2X (server) is 2.11.1, available here:
http://www.smartfoxserver.com/download/sfs2x#p=updates
(requires v2.9 to be installed previously.

The latest version of the client API is 1.6.6, available here:
http://www.smartfoxserver.com/download/sfs2x#p=client
(first C# entry)

Please make sure you get the latest version of the example too:
http://www.smartfoxserver.com/download/sfs2x#p=examples
(Unity 5 examples pack)
Paolo Bax
The SmartFoxServer Team
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Tic Tac Toe Cant Start Game

Postby Bax » 15 Sep 2016, 10:25

Also, full instructions on the examples can be found here:
http://docs2x.smartfoxserver.com/Exampl ... troduction
(including dedicated tutorials for all the examples)
Paolo Bax
The SmartFoxServer Team
Ardito
Posts: 128
Joined: 12 Sep 2016, 11:26
Location: Italy

Re: Tic Tac Toe Cant Start Game

Postby Ardito » 15 Sep 2016, 10:58

Yes!! I used these instructions, now I'm downloading the latest examples package:
Version: 1.0.3
Release date: Aug 22nd, 2016

Perhaps it was already corrected
Ardito
Posts: 128
Joined: 12 Sep 2016, 11:26
Location: Italy

Re: Tic Tac Toe Cant Start Game

Postby Ardito » 15 Sep 2016, 11:43

I've updated the examples is the problem remains:
https://drive.google.com/open?id=0Bzb18 ... TlodFRtUzg
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Tic Tac Toe Cant Start Game

Postby Bax » 15 Sep 2016, 13:17

Ok, you are referring to a different Restart button, the one in-game.
That button gets enabled when the match is over only.
The problem in your case is that the game doesn't seem to start even if two players are inside the Room. It seems they are both still waiting for the other player to join.
The game start is triggered by the server side Extension, which sends a response received by the TrisGame class (line 187).
If your clients are not receiving the message, then something is wrong with the Extension. Are you sure you installed and configured it?
Paolo Bax
The SmartFoxServer Team
Ardito
Posts: 128
Joined: 12 Sep 2016, 11:26
Location: Italy

Re: Tic Tac Toe Cant Start Game

Postby Ardito » 15 Sep 2016, 14:05

I had not entered "TrisExtension.jar" in the correct folder, the folder name should be "tris".
Thank you for the support you have given me.

Now work!!
avinash.c
Posts: 15
Joined: 05 Nov 2018, 09:29

Re: Tic Tac Toe Cant Start Game

Postby avinash.c » 05 Nov 2018, 10:10

Hello Bax.

I had the same problem. I have gone through all the progress which mentioned here. http://docs2x.smartfoxserver.com/ExamplesUnity/tris
I copied the /Volumes/Workspace/Downloads/SmarFoxServer/SFS2X_Unity_Examples/04 Tris/server/Extension_Java/deploy/Tris folder to /Applications/SmartFoxServer_2X/SFS2X/extensions/ folder.
Even though it acting same. Showing waiting for opponent for both players but chat is working for both.

Please help me on this.
Thanks Avinash
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Tic Tac Toe Cant Start Game

Postby Bax » 05 Nov 2018, 10:20

First of all you should check the server log: there's a chance an error occurred for some reason, and you should find it there after the second player joined the same game Room of the first one.
If you find it, can you please report it here? Thanks.
Paolo Bax
The SmartFoxServer Team

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 58 guests