i'am new member here, but i wanted to share my knowledge about how to make your own Client Server Games...
i'am not the best one, it's just basic and using console.
here i'am using Java Code to make a client server, but if you have question about other language programming like C#,VB,and other...i'll try help..
This is just basic, we just need a logic to creating the games..many game engines out there to provide ease of making games (MMORPG,Or Single Game) Like Unity, Unreal 3, Cry, Hero and many others.
First i'll explan the MMO Games Logic.. it's my logic, everyone has a different logic to achieve the same goals.
Ok for example we'll create a Online Game Rock,Paper,Scissors..not bad idea ha?..
Basic client activity for client server game
- Client need IP server and port to connecting to server and send the packet what user doing inside game.
- Client will continuesly read stream input from server and the client will show the result (We need threading this activity).
- Client will Send user ingame input to server continuesly (We need threading this activity).
Basic server activity for client server game
- Server need IP and port for listening to client.
- Server'll send everything happen in server (Threading) like other user inpun, other user changed variable like position, etc.
- Server'll Recieve everything from client (We need threading this activity).
Ok that is what client have to do..
ok now lets we write the game logic.
- Frist User have to login : Client send username and password user then server check whether the account is exist if the account exists server will send back to client the result.
- If account exists : let the console show the player list at lobby games.
- Client waiting for user input the name of other player who'll be opponent.
- After User input the opponent : Client will send the opponent name to server then server check if the other user is available or not. then give the result to client.
- If not, client will show message player is in game or whatever he do.
- If yes, opponent'll be asked to play with u or no.
- If yes, then you play.. you must be choice Rock or Papper, or Scissors. and your opponent to. and Send your choice to server.
- Server'll give who the winner and send to both of them.
Ok that's just the logic. For the code I'm still making the code...
If the code is finish... i'll put it here..and explan the code..
Anyone Have Question ?.
This Is unfinish code Client Server Games
But i'll finish the code asap...
i have thesis right now, so believe i'll be finish this code..
I'am Sorry for my bad english...