Archived

This topic is now archived and is closed to further replies.

[java] multiplayer game source code

This topic is 5584 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, i''m seeking java source code examples of simple multiplayer games. Like tic-tac-toe, connect 4 or other basic turn based game. Does anyone know where to get fine stuff ? It''s not to see how to establish a communication and such things but to look at the global organisation. Some time ago, I''ve tryed to make a small turn-based multiplayer game (in VB) but the way i did it way evolving to a nightmare. So i''m interested in how others organise all that, especially how pros do it.

Share this post


Link to post
Share on other sites
Hello

Yes, programming multiplayer games is always complicated if you don''t organize your work very,very well.
Before you start writing the code, you must spend many hours planning what are you going to do. I have spent weeks between a lot of papers before I have all the concepts clear and well organized. In multiplayer games, the work is bigger. You have to deal with the user input, and the sinchronization with the other players. It''s a hard stuff, but not imposible.
What you want is some tutorial or guide to learn how to organize the comunications. I don''t know (haven''t search) documents like that, but I''m sure that they are there. I recomend you to look for programming methods, you will find interesting the diagram state-transition, that method helps to consider all the events of both sides, the client and the server. Once you have done well this diagram(it''s not dificult) then it''s not too dificult to translate into a table and then into your code.

Don''t give up, it''s great when you could see your game in two different computers (and working well

Share this post


Link to post
Share on other sites