Stencyl 3.4.0 is now out. Get it now!

Multiplayer Extensions Resource List

mdotedot

  • *
  • Posts: 1259
Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

RulezTeam

  • *
  • Posts: 217
Hi mdotedot,

I've configured my server and all works well. I've only a question: this extension works with https ?
 I have some problem with this protocol.

Thank you

« Last Edit: April 25, 2017, 01:48:04 am by RulezTeam »

mdotedot

  • *
  • Posts: 1259
It could be that there are problems with HTTPS.  I only recently aquired a HTTPS certificate for my webcam things.
I had to make a change to the PHP code to accomodate things but I forgot if that was for WebSockets or if that was for the turnbased mechanism.

Anyhow try adding this to the PHP file(s) . It can be the second line (after the <?php)
Code: [Select]
header("Access-Control-Allow-Origin: *");

If that doesn't work please explain what exactly isn't working so that I can test it myself.
Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

RulezTeam

  • *
  • Posts: 217
Hi mdotedot,

now, i'm using turn and lobby, so i've not tested websocket. I'll try to add that line at every php and test it.
I'll report here my success or not.

Thank you

RulezTeam

  • *
  • Posts: 217
Hi mdotedot,
I've a strange problem with this extension. A month as passed and now my app cannot login to the server. It seems how that the apps ID is expired. If I look at DB there isn't any data in the table, but I have played with it a couple of day ago.

So, my question is about if this extension have some sort of timer to expired the appID or something like this.

Thank you.

P.S.: I've tried to create a new app and it appears in the DB. So the old (first) appID is been deleted. It's like that the old appID is expired and deleted automatically. Why ?

« Last Edit: May 17, 2017, 02:28:08 pm by RulezTeam »

mdotedot

  • *
  • Posts: 1259
Indeed the default is that you can use it for a month and a limited number of access (10.000 as I recall).
If you have your own server you can modify the stencyl_apps and change the free column to 'N'.

My server is only for demonstration purposes.
Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

RulezTeam

  • *
  • Posts: 217
Hi mdotedot,

yes, I have my own server. So, where should I do these modify (month and number of access)?
Which files should I mod to delete these limits for all multiplayer extension ?

Thank you.


P.S.: I've seen in create_db.php this string :

Code: [Select]
$sql="CREATE TABLE IF NOT EXISTS stencyl_apps (id INT PRIMARY KEY  NOT NULL AUTO_INCREMENT , app_id VARCHAR(12), email VARCHAR(30), secret_id INT, accessed BIGINT(8),isdebug VARCHAR(20), created DATETIME, free VARCHAR(2))";
Is it the last var (freeVARCHAR(2)) that I should change ?  This modify delete the limit for a month and numbers of access ?

« Last Edit: May 18, 2017, 01:03:15 am by RulezTeam »

mdotedot

  • *
  • Posts: 1259
free is the column that will store 'Y' default. So you use mysql console or phpmyadmin to change that column to N so it will not be removed.
Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

RulezTeam

  • *
  • Posts: 217
Thanks mdotedot, but I don't understand if this change (from Y to N) also bypass the limit of numbers of access. Or is there another column that I should change ?

Thank you.

mdotedot

  • *
  • Posts: 1259
The colum is 'free' handles both. So maximum 1 month and maximum x access. When free is NO it is 'paid' , so to be ready  when I had 50 customers a week that would spam my server using the free codes, so I envisioned a paid-model :)


Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

RulezTeam

  • *
  • Posts: 217
Hi mdotedot,

I'm trying to understand how turn and lobby works together. I would like to know if some data as name, id, are the same for turn and lobby or every extension use its data though use the same DB.
I would create a turn base game with only username (so no lobby rooms and other), so I create the user with lobby and get the name with turn extension. Is this possible ?

Thank you

mdotedot

  • *
  • Posts: 1259
Turn and Lobby use the same database. There is a block to transfer Lobby data (playerid etc) to the Turn extension.
Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

RulezTeam

  • *
  • Posts: 217
Hi mdotedot,

I know about lobbyturn block, but with this block I must pass all the variables, and I must create the room.
I would like that the room will be created automatically by turn extension. So, this is my little question: lobby can create the room (and its name) but if I want more room (if one is full), how can do this ? And if I use lobby with room, a player can be redirect to the first free (or partial free) room  ? I haven't see an option for room partial free, but only for room full...

Thank you for your support.

mdotedot

  • *
  • Posts: 1259
I'm not sure if I understand the question. There are blocks to join a room. There is a block that automatically join a room that is not full.. When you look at the tic-tac-toe game it has a mechanism to wait for new players until there are sufficient players to play the game (for tic-tac-toe that is 2 and not more).
join or create a room is it called. So if there are no rooms available it will create a new room. If there is a partial room available that block will join that game.
If that is not what you are looking for can you describe it more detailed what you need?!?
Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

RulezTeam

  • *
  • Posts: 217
Hi mdotedot,

excuse me for my bad explanation... in tic-tac-toe there isn't any lobby block, but only turn extension is used, so no problem for room, user name and others.
In turn extension the "room" isn't present to the player, but they are created only if a room is full. A user take a seat and the room is create automatically. He's waiting for a player. When a new player join a turn for a seat,  he look at his seat (1 or 2) and the user take seat 2 otherwise he take seat 1 (and a new room is created) and waiting.

In lobby extension, I must create a room with a name, so, this is my misunderstanding; I don't "see" how can I create a room with a name and the user check if a room have a free seat and join it, or create a new room (with a new name?).
If there are much player how can I set the rooms ?

Should I create only a big room (about 100 seat) and then the player choose an opponent to play ? (because tic-tac-toe have only two players)

Thank you.