I’m developing an online card game for Magic: The Gathering that will, at first, be only a 2 Player game. I am proficient in Java, but the Socket Programming is where I’m the most ignorant…
Firstly, I want this to be as live action as possible (basically, if I move a card on the table, then the other player sees me moving the card)…I don’t think this type of animation is too demanding, so I’m planning on using TCP/IP.
My questions is, once the connection between the two players is made (when connecting, one serving as the server, and the other the client), am I going to be able to have each of the players be able to send and receive messages simultaneously? And if so, how do I do that?
I guess my ignorance of SocketProgramming is showing through now, but I have this notion that in order to receive something, you have to be listening for that particular someting. Is it possible to have the GUI running on ONE thread, and when a message is needed to be sent, I can send that on ANOTHER thread? While simultaneously listening on yet ANOTHER thread for information coming from the other client (in case he plays/moves a card)?
Once again, I’m new to this socket programming thing…and any input will be helpful. Also, if I’m completely missing something, or if you think i’m looking too much into this, please, your other suggestions are welcome.
Thanx…
LordWilson