Game Database Connectivity Java

Posted by The Kraken on Game Development See other posts from Game Development or by The Kraken
Published on 2012-10-10T21:05:41Z Indexed on 2012/10/10 21:56 UTC
Read the original article Hit count: 225

I'm developing a simple multi-player puzzle game in Java. Both players should be able to view the same game board on his own computer. Then, when one player makes an action in the game (ex. drags an object onto a coordinate space), the game's view should update automatically on the other computer's game screen. I'd like all this to happen over the internet, not requiring both computers to be on the same LAN connection.

If I need to use SQL/PHP to accomplish this, I'm unsure how to design the database to accomplish something as simple as the following:

Player A drags element onscreen
Game sends coordinates of element to database/server

Player B's computer detects a change to an item in the database
Player B's computer grabs the coordinates of Player A's item
Player B's machine draws onscreen elements at the received coordinates

Could somebody point me in the right direction?

© Game Development or respective owner

Related posts about java

Related posts about multiplayer