Turn based multiplayer

Hi !

Ive hanging around in the forums for quite awhile, and learned to make flash with the tutorials provided in this site about 3 months ago =D

I have some questions concerning databases and multiplaying. Lets says I want to make is like a chess game (but Its not =D), I want to know how this system would work:

Im setting up a room for a match. I set gameroom # and pw. Lets say player1 got the whites, thus would have first turn. Player1 goes to the flash game, and is prompted to input gameroom # and pw. Upon confirmation, he is taken to the chess board to make his move. After moving his piece, he can leave. Player2, some time later, figure that the match has begun, so he heads to the flashgame input room # and pw, and is taken to chess board to make his move too…and so on until game ends.

My question is how could a database handle this: Multiple room # and pw so more than one match could be handled, memory of what the opponent did last turn. Im not too familiar with it, but Ive already read about mySQL and some Microsoft Access issues but found no real tutorial cover multiplaying like this…O, and avoid issues about how to code chess rules…

Thx in advance !

…wait, lemme guess: Not enough details and no code to read ? ><

Go to this site they have one for making a multiplayer game on the net, its a start i guess, i’ve not used it though but it seems pretty straight forward, this is the link anyone whos used it has any comments, i think it can only be used for 50 ppl at a time though

Thx for the reply ! I had already read that before, but that thing is for simultaneous multiplaying. What Im doing is much more database oriented… any more ideas people :frowning: ?

For database, you will have to learn programming PHP or ASP (PHP is best) and learn the query functions of a mysql database.

With PHP you will create the code needed to query the database and handle the result.

Oh so u want it so that u can start a game, then go back the next night and make another move? yes, php is want u want, search for ‘making a highscore table’, which most of them will write to a text file, then just need some different variables roomname, move, player no etc.
As Voglio says u can use php to write to a mySql database, which i have used but i didn’t set it up, which would be much better but harder

MySQL is a program that is loaded on a server. This program can be queried in order to return results based on the query that you send to him.

Let’s say that a database is a library and MySQL is the library clerk. You ask for the clerk about a specific information contained in a specific book. The clerk (mysql) will look into the library (database) for the book (table) and for the information (the query result).

A MySQL query looks like this :

SELECT ‘name’ FROM user WHERE id = ‘150’

Translated, it will ask to MySQL to look for all names in the table “user” where the id of the names is 150.

You CANNOT install by yourself a database system; it must be included in your hosting package. If you only have a hosting from your ISP, chances are really, really small that you have access to a mysql database (if they don’t tell you that you have one, it’s because you have none).

Each mysql system can handle an unlimited number of databases. Each database can handle unlimited amount of tables (books) and each book can have unlimited entries (information). The only limits are the space on the server (to store the database) and the amount of time that each sql query will take.