Forum Multiplayer Need help with Tic Tac Toe example.

Discussion and help relating to the PlayerIO Multiplayer API.

Need help with Tic Tac Toe example.

Postby Alonski » February 13th, 2010, 9:02 pm

First of all there were a few display problems with the original file which I had to fix.

Now I wanted to add a "Back to lobby" button. I have built the button and set everything up and put it under the chat and everything. The only problem is that when I get out of a game my username stays inside the chat and the game thinks that I am still in the game. I tried using the function removeUser() in Chat.as to no avail.

I wouldn't mind giving someone the source if they want to look at it. But I just need to know how to:
1. get the id of the user
2. send that id into removeUser() so that it removes the User from the chat and thus from the game.

BTW I love this site =D

Also another problem:
While testing out my Lobby button I managed to get a room with 0 users in it... There is one user in it but he is something of a ghost as in he doesn't have anyone controlling him. Is there anyway to delete rooms? Maybe check if a room has 0 people and delete it?
Alonski
 
Posts: 9
Joined: February 13th, 2010, 1:32 pm

Re: Need help with Tic Tac Toe example.

Postby Cyclone103 » February 13th, 2010, 11:54 pm

The lobby issue with 0 users has been an issue, the problem is that the rooms are not being closed often enough, but it is not a major problem.

Sorry, I have no idea how to help you with the game.
Cyclone103
 
Posts: 155
Joined: January 18th, 2010, 6:47 pm

Re: Need help with Tic Tac Toe example.

Postby Oliver » February 15th, 2010, 10:03 am

While testing out my Lobby button I managed to get a room with 0 users in it... There is one user in it but he is something of a ghost as in he doesn't have anyone controlling him. Is there anyway to delete rooms? Maybe check if a room has 0 people and delete it?


The room should time out after a minute or so... You'll pretty much only see this during development.
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Need help with Tic Tac Toe example.

Postby Benjaminsen » February 15th, 2010, 11:31 am

I will look into updating the Tic Tac Toe example with a back to lobby button as the sample lobby needs to get updated to support it regardless.

Best
Chris Benjaminsen
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: Need help with Tic Tac Toe example.

Postby Alonski » February 15th, 2010, 5:55 pm

Oliver the rooms were open for a few hours =/ Anyways could you guys possibly make some heavily commented examples? The Tic-Tac-Toe example is pretty complicated.

I really love the playerio API and now that I have started to mess around with it I have found it to be really powerful but the documentation isn't very well documented. I think some more examples would help out a lot and get people interested in this.
Alonski
 
Posts: 9
Joined: February 13th, 2010, 1:32 pm

Re: Need help with Tic Tac Toe example.

Postby Oliver » February 16th, 2010, 9:22 am

Commenting in the examples is on the todo list now

We can easily expand on the documentation, but we need more specific feedback about what should be better explained or extended or formatted differently. Do you have any specific examples?

Chris has been talking about writing a "this is how you build a simple game from scratch" type tutorial and we have a building multiplayer games tutorial also coming soon.
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Need help with Tic Tac Toe example.

Postby Alonski » February 17th, 2010, 12:16 pm

I think just commenting the examples or maybe have a tutorial to build the examples. Some of the functions don't make a lot of sense and I am not sure if it has something to do with the server or if its something that I don't understand with flash. Anyways I will wait for more tutorials.

Also I know this isn't relevant to Tic Tac Toe but in the DrawPad example it seems to lag A LOT when drawing. Is it supposed to be like this? I haven't really looked the code just tested it out.
Alonski
 
Posts: 9
Joined: February 13th, 2010, 1:32 pm


Return to Multiplayer



cron