Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  How to develop multiplayer web based board game in java?  (Read 3959 times)
0 Members and 1 Guest are viewing this topic.
Offline sayantanrana

Junior Newbie

« Posted 2013-11-28 10:17:06 »

I want develop a multiplayer web based board game in Java (like chess possibly using applet) that can be played in browser. I have no problem with the logic of game. My only concern is how to make the game multiplyer(or multibrowser support). For example, suppose the game is hosted in any web server and two player is playing the game using their own browser. Now, any move given by player1 should be visible to player2 and vice-versa. How to achieve this type of functionality in Java?
Any help or suggestion is welcome.
Offline trollwarrior1
« Reply #1 - Posted 2013-11-28 10:37:13 »

I think you should first look at server programming.

There are 2 types or methods for sending data: TCP and UDP. TCP ensures that every single bit of data you send is delivered to the other side. However if you get dc just for 1 moment, you will need to reconnect. UDP doesn't do that. You can disconnect, but the data would still be sent to you, even if you are not receiving it.

You should just look at UDP programming, because it is best suited for games.

Take a look at this tutorial. It has some stuff with UDP. There are a lot more tutorials on the web Tongue
Offline sayantanrana

Junior Newbie

« Reply #2 - Posted 2013-11-28 10:48:31 »

Thanks for your suggestion.
Can it be possible using applet?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline trollwarrior1
« Reply #3 - Posted 2013-11-28 10:50:18 »

It doesn't matter what you're using.. Applet is just a way of drawing stuff. (In some sense)
Offline ctomni231

JGO Wizard

Medals: 99
Projects: 1
Exp: 7 years

Not a glitch. Just have a lil' pixelexia...

« Reply #4 - Posted 2013-11-28 13:37:46 »

Ummm... There was a huge legacy page on it.


It is a very long read but the verdict was TCP was better than UDP. Look at that link for all you practically need to know regarding the subject. :-)

Offline Opiop
« Reply #5 - Posted 2013-11-28 15:05:19 »

I really don't think either one is better. Sure, UDP has its faults, but so does TCP. If I were more advanced in networking, I'd use both in tandem. Of course, that introduces many issues.
Pages: [1]
  ignore  |  Print  

EgonOlsen (74 views)
2018-06-10 19:43:48

EgonOlsen (55 views)
2018-06-10 19:43:44

EgonOlsen (75 views)
2018-06-10 19:43:20

DesertCoockie (254 views)
2018-05-13 18:23:11

nelsongames (154 views)
2018-04-24 18:15:36

nelsongames (154 views)
2018-04-24 18:14:32

ivj94 (895 views)
2018-03-24 14:47:39

ivj94 (156 views)
2018-03-24 14:46:31

ivj94 (808 views)
2018-03-24 14:43:53

Solater (172 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!