Results 1 to 9 of 9

Thread: AI and online multiplayer

  1. #1
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default AI and online multiplayer

    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

  2. #2
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    *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?

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  3. #3
    Join Date
    Apr 2007
    Posts
    581
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Richard View Post
    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.

  4. #4
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Quote Originally Posted by ShawnjohnSJ View Post
    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.

  5. #5
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    456
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Richard View Post
    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.

  6. #6
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    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.
    Working on: Tithe Farmer

  7. #7
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default

    Quote Originally Posted by DeSnob View Post
    ETA's don't exist in SRL like they did in other communities. Want a faster update? Help out with updating, otherwise just gotta wait it out.

  8. #8
    Join Date
    Apr 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    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?).

  9. #9
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    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.
    There used to be something meaningful here.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •