How do I make a multiplayer turn based game [...]

Get help using Construct 2

Post » Thu Apr 16, 2015 7:43 am

Hello,

I was wondering if it's possible to make a 1vs1 turn based game, where data is based on a php application (basically a card game :) )

If so, do you have any advice ?

Thanks :)
B
6
S
1
Posts: 45
Reputation: 509

Post » Thu Apr 16, 2015 7:48 am

I'm going to do the same thing and will face same problem :D
B
6
S
1
Posts: 75
Reputation: 575

Post » Thu Apr 16, 2015 1:15 pm

I managed to handle rooms : 2 players / room maxi.

I guess the turn based gestion is the prettey the same as on a solo game.
B
6
S
1
Posts: 45
Reputation: 509

Post » Thu Apr 16, 2015 2:58 pm

If it is based on a PHP server (good luck with that btw), I guess you need to handle AJAX calls.
You can check out the How do I FAQ for usage examples interacting with PHP scripts as well.

You may also try the multiplayer plugin, and then only save the results of the game to the PHP server/database.
This is a different beast though.

As for the turn base gameplay, I had made a tutorial for a local turn based board game, I guess it needs a bit of modifications to be applied to an online multiplayer game but some of the logic may still apply.
As you say, it's pretty much the same as on local, except you will be awaiting the transition signals from online.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
296
S
119
G
96
Posts: 7,332
Reputation: 71,306

Post » Thu Apr 16, 2015 6:12 pm

Thanks a lot for this answer.
The PHP server is clearly not the problem, and of course, it'll be handled by AJAX in C2 app.

I'll check your tutorial as soon as I can :) Thanks !
B
6
S
1
Posts: 45
Reputation: 509

Post » Thu Apr 16, 2015 6:18 pm

You can also look at my Tic-Tac-Toe tutorial:
https://www.scirra.com/tutorials/1003/t ... th-a-lobby
ImageImageImage
B
71
S
22
G
259
Posts: 3,794
Reputation: 143,704


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 25 guests