Stencyl 3.4.0 is now out. Get it now!

Multiplayer Extensions Resource List

SadiQ

  • Posts: 1738
I think the best way to go about it is to download about 10 or 20 scores at a time in chunks, usually starting where the player is and allowing the option to download the next/previous chunk.

If I'd want to see my score I'd want to see me(preferably in the middle of the list), a few other players above and below me, and I'd probably want to know how far away I am from the first/last place.
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

RulezTeam

  • *
  • Posts: 223
hi mdotedot,

yes, my idea is to get about 50 scores before my score and as SadiQ says it's good to know the first .
I think that 50 is a good solution, but as SadiQ says download chucks is a good idea too.

So, what's do you think about it? Is it possible to create a block ? is it simple ?

Thank you mdotedot for your support.

mdotedot

  • *
  • Posts: 1270
Hi RulezTeam,

Today I worked on the implementation. I've encountered some problems relating the combination of text,number and time lists.
Also I think it is not something that most people need, so I made an extension seperately from the ' base ' extension.

RulezTeam Scoreboard
* ScoreIndicator
* new score.php for your server (or you can use mine from the free-server)

All the blocks are the same and I added one extra block with which you can get a list that include the previous and next scores of a ' base '  score.

So if your player scored 2300 points you can use that score (2300 ) in the block.
The list will contain the scores before and after the limit-number of items.

Check if you can use this. If not I have to think harder but I spend about 4 to 5 hours already and I fear it will become a too large impact on the code that is there already.

Hopefully it wil be sufficient. We will see.
Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

RulezTeam

  • *
  • Posts: 223
Thank you a lot mdotedot.
I'll test this mod asap.

RulezTeam

  • *
  • Posts: 223
Hi mdotedot,
do you know about some problem with MariaDB 10.1 ?
I have these strange errors :

Code: [Select]
11-08 12:09:47.640: I/trace(28796): Lobby.hx:719: encrypted send: Ykc5aVluayxhVzVwZEEsUXpjME1UQSxUMDFCUzBSQ1MwUSxNVGd3TWpBNU9UTSxVbEJIVkVwR1ZFdyw
11-08 12:09:47.640: I/trace(28796): Lobby.hx:722: Calling :https://myserver/stencyl.php?c=C7410&a=Ykc5aVluayxhVzVwZEEsUXpjME1UQSxUMDFCUzBSQ1MwUSxNVGd3TWpBNU9UTSxVbEJIVkVwR1ZFdyw&t=MjAxNy0xMS0wOCAxMjowOTo0Nw
11-08 12:09:48.246: I/trace(28796): Lobby.hx:324: In onData: [Event type=complete bubbles=false cancelable=false]
11-08 12:09:48.246: I/trace(28796): MultiPlay.hx:75: RETURNING: [C7410,init,NON_EXIST,-1,-,1-,1,]
11-08 12:09:48.246: I/trace(28796): Lobby.hx:328: Data: Qzc0MTAsaW5pdCxOT05fRVhJU1QsLTEsLSwxLSwxLA.. Decoded: C7410,init,NON_EXIST,-1,-,1-,1,

mdotedot

  • *
  • Posts: 1270
Hi RulezTeam,

No, I don't know about problems. I don't have that version running.
Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

RulezTeam

  • *
  • Posts: 223
Hi mdotedot,

what about error from Multiplay.hx ? Seems that there is a wrong return code. Probably the encryption base64 ?

Another question: is there a reason if you have set some table with MyISAM engine ? Can I convert it to InnoDB ?

Thank you

RulezTeam

  • *
  • Posts: 223
Hi mdotedot,

I've found these other errors from apache/nginx :

Code: [Select]
AH01071: Got error 'PHP message: PHP Warning:  Missing argument 2 for turn_nextturn(), called in /myserver/turn.php on line 80 and defined in /myserver/turn.php on line 146\n'
Edit : I've found other error like this :

Code: [Select]
AH01071: Got error 'PHP message: PHP Warning:  mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /myserver/turn.php on line 126\n
Are these errors expected bacause I'm using a newer PHP version (5.6 or 7.0) ?

« Last Edit: November 08, 2017, 08:38:22 am by RulezTeam »

mdotedot

  • *
  • Posts: 1270
These are the versions I work with:

PHP 5.3.3
mysql  Ver 14.14
httpd-2.2.15

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

RulezTeam

  • *
  • Posts: 223
Hi mdotedot,

I've tried php 5.4 but I have error with connect.php too.  I'm using httpd 2.4 but I think that the "problem" is the syntax of php because from version 5.4/5.5 some of mysql request are been deprecated.

mdotedot

  • *
  • Posts: 1270
Hi RulezTeam,

It will take some time before I'm going back to multiplayer stuff. Lately I'm playing with 3D and a Drawing App.
Maybe in 2018 I will pick up the multiplayer stuff again and I might upgrade to some newer versions and see what is working and what is not.
Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

RulezTeam

  • *
  • Posts: 223
Hi mdotedot,

ok. Thank you.

RulezTeam

  • *
  • Posts: 223
Hi mdotedot,
I have a question about logout from lobby and turn. I have used this block when a player finish the game and go to the menu. But I have seen that the client (the game) continue to send data (heartbeat?) to the server. Why ?
There is a block to connect to the server (lobby and turn) but there isn't a block to disconnect from the server.
Is there a command or a method to stop this communication with the server ?

Thank you.

mdotedot

  • *
  • Posts: 1270
Hi RulezTeam,

There is a Logout block for the turn.
But I noticed that the isConnect is not set to false.

So to make sure that the heartbeat stops beating add this line to the Logout code in Turn.hx:
Code: [Select]
isConnect=false;

Maybe that will solve your issue?!?

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

RulezTeam

  • *
  • Posts: 223
Hi mdotedot,

I have added the line code, but the client continue to connect to the server every heartbeat.

I have logged my android device and I see that turn continue to get heartbeat every 2 seconds.

Look :

Code: [Select]
11-28 10:27:57.108: I/trace(10573): Turn.hx:166: Sending Data : turn encode the arg: dEVRbg
11-28 10:27:57.108: I/trace(10573): Turn.hx:166: Sending Data : getheart encode the arg: Z2V1aHVRcnQ
11-28 10:27:57.108: I/trace(10573): Turn.hx:166: Sending Data : C11741 encode the arg: Qrb1NzE2
11-28 10:27:57.108: I/trace(10573): Turn.hx:166: Sending Data : ACLENEWW encode the arg: RQNVTE4PT3A
11-28 10:27:57.108: I/trace(10573): Turn.hx:166: Sending Data : 411 encode the arg: NXA0
11-28 10:27:57.109: I/trace(10573): Turn.hx:166: Sending Data : 25014389 encode the arg: CTQ4MiO1NjB
11-28 10:27:57.109: I/trace(10573): Turn.hx:166: Sending Data : VFWMQTRR encode the arg: C3QMBVJRVFI
11-28 10:27:57.109: I/trace(10573): Turn.hx:170: encrypted send: ........
11-28 10:27:57.109: I/trace(10573): Turn.hx:173: Calling :https://myserver/stencyl.php?c=C......
11-28 10:27:57.408: I/trace(10573): Turn.hx:202: In onData:  .....
11-28 10:27:57.409: I/trace(10573): MultiPlay.hx:75: RETURNING: [C11741,getheart,:SHD:xxxxxxxxx.::Og..:xxxxxxxxx..:]
11-28 10:27:57.409: I/trace(10573): Turn.hx:204: Data: xxxxxxxxx Decoded:  xxxxxxx
11-28 10:27:57.409: I/trace(10573): Turn.hx:207: CallID?: items[0]: C11741
11-28 10:27:57.409: I/trace(10573): Turn.hx:222: Inside dataAction : callID: C11741 text_func: getheart
11-28 10:27:57.409: I/trace(10573): Turn.hx:271: Inside getHeart.. callback routine
11-28 10:27:57.409: I/trace(10573): Turn.hx:273: Received: i=0 item: C11741
11-28 10:27:57.409: I/trace(10573): Turn.hx:273: Received: i=1 item: getheart
11-28 10:27:57.409: I/trace(10573): Turn.hx:273: Received: i=2 item: :SHD:xxxxxx.::Og..:xxxxxx..:
11-28 10:27:57.409: I/trace(10573): MultiPlay.hx:75: RETURNING: []
11-28 10:27:57.409: I/trace(10573): Turn.hx:281: GetHeart : HeartBeat data: cnt: 0 d before:  after:
11-28 10:27:57.409: I/trace(10573): MultiPlay.hx:75: RETURNING: [Hp]
11-28 10:27:57.409: I/trace(10573): Turn.hx:281: GetHeart : HeartBeat data: cnt: 1 d before: SHD after: Hp
11-28 10:27:57.409: I/trace(10573): MultiPlay.hx:75: RETURNING: [:xxxxxx:xxxxxxx]
11-28 10:27:57.409: I/trace(10573): Turn.hx:281: GetHeart : HeartBeat data: cnt: 2 d before: xxxxxxx. after: :xxxx:xxxxx
11-28 10:27:57.409: I/trace(10573): Turn.hx:1133: getCurrentPlayerInformation d: :xxxx:xxxx
11-28 10:27:57.409: I/trace(10573): Turn.hx:1137: PlayerData (cnt==2 currentplayer) :
11-28 10:27:57.409: I/trace(10573): Turn.hx:1137: PlayerData (cnt==2 currentplayer) : xxxxx
11-28 10:27:57.409: I/trace(10573): Turn.hx:1137: PlayerData (cnt==2 currentplayer) : xxxxx
11-28 10:27:57.409: I/trace(10573): Turn.hx:1139: cnt==2 = Current Player Information: decode: [:xxxx:xxxx]
11-28 10:27:57.409: I/trace(10573): Turn.hx:1140: Ts:0 Check on Player change (the shareddata should change BEFORE the turn has changed .. CurrentPlayerID:  Pdata: [,xxxxx,xxxxx]
11-28 10:27:57.409: I/trace(10573): Turn.hx:1152: cnt==2 CurrentPlayerID:  Pdata: [,xxxx,xxxx] CurrentPlayerID after convert: nan
11-28 10:27:57.409: I/trace(10573): MultiPlay.hx:75: RETURNING: [UNKNOWN]
11-28 10:27:57.409: I/trace(10573): MultiPlay.hx:75: RETURNING: []
11-28 10:27:57.409: I/trace(10573): Turn.hx:281: GetHeart : HeartBeat data: cnt: 3 d before:  after:
11-28 10:27:57.409: I/trace(10573): Turn.hx:286: GetHeart : SHD : only get the shareddata once when you are on turn : nan =? 411 AND Elapsed == 1? :nan And for all other players part:  ...
11-28 10:27:57.409: I/trace(10573): MultiPlay.hx:75: RETURNING: [:]
11-28 10:27:57.409: I/trace(10573): Turn.hx:281: GetHeart : HeartBeat data: cnt: 4 d before: Og.. after: :
11-28 10:27:57.409: I/trace(10573): Turn.hx:1103: cnt == 4 Get Players before decode: [:]
11-28 10:27:57.409: I/trace(10573): Turn.hx:1112:  cnt == 4 Players P:
11-28 10:27:57.409: I/trace(10573): Turn.hx:1112:  cnt == 4 Players P:
11-28 10:27:57.409: I/trace(10573): Turn.hx:1124:  cnt == 4 Players Pdata: [,]
11-28 10:27:57.409: I/trace(10573): MultiPlay.hx:75: RETURNING: [2017-11-28 10:28:25]
11-28 10:27:57.409: I/trace(10573): Turn.hx:281: GetHeart : HeartBeat data: cnt: 5 d before: xxxxx after: 2017-11-28 10:28:25
11-28 10:27:57.409: I/trace(10573): MultiPlay.hx:75: RETURNING: []
11-28 10:27:57.409: I/trace(10573): Turn.hx:281: GetHeart : HeartBeat data: cnt: 6 d before:  after:

« Last Edit: November 28, 2017, 01:43:48 am by RulezTeam »