Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Turn Based Multiplayer

Author
Message
greycheek
8
Years of Service
User Offline
Joined: 13th Mar 2016
Location:
Posted: 26th Apr 2017 13:27
The online multiplayer documentation describes real time multiplayer, but my game requires asynchronous multiplayer in a turn based strategy game, with turn information passed back and forth, and the players taking their turn in their own time. How would I set that up?
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 26th Apr 2017 14:45 Edited at: 26th Apr 2017 14:46
I would do this with the HTTP functions AppGameKit has: https://www.appgamekit.com/documentation/Reference/HTTP.htm

You'd need a database online with multiple tables storing user information, game and turn data etc.

Your game will send data to a server as POST data and you will have a page on the server (most likely written in PHP) that would read the data, and query/update the database. You can use the HTTP functions to read data from the databases too, all using scripts on the server to act as the go between.

There's an example or two in the projects that come with AppGameKit 2 that show how to use some of the HTTP functions.
CumQuaT
AGK Master
14
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 28th Apr 2017 17:09
I'm actually working on a TBM game and all I do is assign each player a unique index and have that index as the prefix to all network messages being sent out to know who is sending data, and then maintain a variable somewhere which indicates which player's turn it is. That way all network communication from other players can be ignore while it is one particular player's turn.
I work full-time making games in AGK2 and DBpro. Living the dream!
Jack
19
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 28th Apr 2017 21:03
Quote: "The online multiplayer documentation describes real time multiplayer"


You can decide when you send a message to the server by an if clause.

But, the http functionality, that Kevin Cross mentioned would be better, if you really plan to stay on round based multiplayer games.
The users could then play your game on phones with an old network adapter.

I the http(s) idea for round based online games!

[/url]
greycheek
8
Years of Service
User Offline
Joined: 13th Mar 2016
Location:
Posted: 30th Apr 2017 23:05
I'm afraid I don't have the chops to use the Post data http option.
JohnnyMeek
11
Years of Service
User Offline
Joined: 23rd Apr 2013
Location: Slovenia
Posted: 1st May 2017 14:18
You can try this service

XtraLife

Login to post a reply

Server time is: 2024-09-30 03:16:08
Your offset time is: 2024-09-30 03:16:08