Richard
2012-03-12 09:45:20
I have a couple of questions about game developing, the first being the best way to design a simple AI. To give it some context, this is a card game in which the AI must decide whether playing their cards at a given time would be a good idea. Secondly, I'd like to know how to design a multiplayer online system. I know how I could make a very slow, very insecure one, sending post data to a server, which then adds it to a database. But surely packet watchers could see this, and it would also be pretty slow.
The code would be in Java (I welcome flame), if that helps.
Thanks
Flight
2012-03-12 09:52:40
*Totally bashes Java*
Anyways, I don't have a clue of how to do that, but I can suggest you try looking around on Mopar's GameDev branch of the forums; it's focused on things such as this.
http://gamedev.moparscape.org/smf/There's an Engine sub-forum (possibly for your AI issues) as well as MultiPlayer & Networking sub-forums. It's worth a shot, no?
ShawnjohnSJ
2012-03-12 21:21:55
From: Richard
I have a couple of questions about game developing, the first being the best way to design a simple AI. To give it some context, this is a card game in which the AI must decide whether playing their cards at a given time would be a good idea. Secondly, I'd like to know how to design a multiplayer online system. I know how I could make a very slow, very insecure one, sending post data to a server, which then adds it to a database. But surely packet watchers could see this, and it would also be pretty slow.
The code would be in Java (I welcome flame), if that helps.
Thanks
What type of multiplayer system? I was researching different ways to create a game server yesterday. I've seen a few articles which say you should split up components: the login server, game server, save server, etc. From what I know, RuneScape splits up their login server and game server at the minimum.
Richard
2012-03-13 04:45:48
From: ShawnjohnSJ
What type of multiplayer system? I was researching different ways to create a game server yesterday. I've seen a few articles which say you should split up components: the login server, game server, save server, etc. From what I know, RuneScape splits up their login server and game server at the minimum.
It'd be very basic, literally just sending the information of the dealt deck, and each individual players' hand to the server. It would then also send data every time they player a card/cards.
I wouldn't trust Runescape's method, as they apparently use TCP for literally everything, which is probably why it's so damn laggy all the time.
ReadySteadyGo
2012-03-17 07:21:46
From: Richard
It'd be very basic, literally just sending the information of the dealt deck, and each individual players' hand to the server. It would then also send data every time they player a card/cards.
I wouldn't trust Runescape's method, as they apparently use TCP for literally everything, which is probably why it's so damn laggy all the time.
If you are interested in using python at all, I highly recommend Twisted. I used it to create a Poker server/client.
http://twistedmatrix.com/trac/I know you're probably set on Java, I just thought I'd throw that in there because I was very impressed with it.
masterBB
2012-03-17 07:48:32
I once created a fast one. Will post if I remember how I did that. I believe I used python on the server side and java on the client side.
matessim
2012-05-26 15:11:34
Good luck not using TCP and verifying and synchronizing states in the application level, you'll just be writting a shitton of boilerplate code that will be much less reliable, its not like your sending a ton of data, like in a huge MMO, with 40 people attacking mobs, tracking movements and spells and what every person is targeting at all times, TCP is appropriate here and if its your first client-server application i'd heavily recommend you'd use TCP.
The simplest way you could probably do it is constantly serialize game-states and pass them around the clients, although this is a bit insecure and "heavy"(although for such a small game, again, its tiny overhead,and its just learning, right?).
Frement
2012-05-26 15:15:24
Use sockets, you need a server to handle all the player data etc, so that they can't be tampered with on client-side.
Client only displays the data and sends commands to server on how to proceed.