How to store data in multiplayer.

Get help using Construct 2

Post » Mon Mar 17, 2014 3:59 am

Eg login and password its data.
I want to make a chat with him and other storage ranking.
I think it will not soon add :mrgreen:
Last edited by GodSpear on Mon Mar 17, 2014 10:06 am, edited 1 time in total.
B
21
S
4
G
2
Posts: 66
Reputation: 2,741

Post » Mon Mar 17, 2014 9:27 am

English title Pleach
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Mon Mar 17, 2014 11:53 am

You need to know PHP or some similar language. Put an Ajax object in your game and use it to talk to your PHP script. You can encode all your data into a query string and send it to the PHP side using an Ajax request. Your PHP script does whatever it does and sends some data back, which triggers an Ajax On completed event with the data your PHP script sent back appearing in the Ajax.LastData system expression. You can use the tokenat system expression to parse it and put it in your in-game variables.
B
9
S
3
Posts: 37
Reputation: 749

Post » Mon Mar 17, 2014 2:55 pm

nusbaumc wrote:You need to know PHP or some similar language. Put an Ajax object in your game and use it to talk to your PHP script. You can encode all your data into a query string and send it to the PHP side using an Ajax request. Your PHP script does whatever it does and sends some data back, which triggers an Ajax On completed event with the data your PHP script sent back appearing in the Ajax.LastData system expression. You can use the tokenat system expression to parse it and put it in your in-game variables.

Are you a moron? Ajax will not sustain the server and it will fall. I do multiplayer and web socket.
B
21
S
4
G
2
Posts: 66
Reputation: 2,741

Post » Mon Mar 17, 2014 3:55 pm

GodSpear wrote:
nusbaumc wrote:You need to know PHP or some similar language. Put an Ajax object in your game and use it to talk to your PHP script. You can encode all your data into a query string and send it to the PHP side using an Ajax request. Your PHP script does whatever it does and sends some data back, which triggers an Ajax On completed event with the data your PHP script sent back appearing in the Ajax.LastData system expression. You can use the tokenat system expression to parse it and put it in your in-game variables.

Are you a moron? Ajax will not sustain the server and it will fall. I do multiplayer and web socket.
Yes it can. It's been done before. Maybe not with high traffic or a large game, but for most projects on C2, it will suffice.
ImageImageImageImage
B
62
S
19
G
51
Posts: 633
Reputation: 30,836

Post » Mon Mar 17, 2014 5:10 pm

Are you a moron?

I think you misunderstood the definition of that word, I think the definition is something like,
"Someone who is rude to someone who is going out of their way to help"
B
14
S
3
G
4
Posts: 61
Reputation: 3,519

Post » Mon Mar 17, 2014 5:23 pm

Ajax can load the server and the drop is desirable on the web-socket
or multiplayer.
The entire system has been done MMORPG only store data as.
B
21
S
4
G
2
Posts: 66
Reputation: 2,741

Post » Tue Mar 18, 2014 12:41 am

GodSpear wrote:Are you a moron? Ajax will not sustain the server and it will fall. I do multiplayer and web socket.


He's asking for login, chat, and high scores. None of that requires a constant connection, you can just poll the server with Ajax 30 seconds or so. It's fast and easy and suited for someone like the OP who obviously isn't versed in such things.
B
9
S
3
Posts: 37
Reputation: 749


Return to How do I....?

Who is online

Users browsing this forum: dop2000, kurtbal and 8 guests