PO iOS Networking

Discussion in 'Development General' started by poatface, Jan 18, 2013.

  1. poatface

    poatface New Member

    Joined:
    Nov 11, 2012
    Messages:
    18
    Likes Received:
    0
    I'm ready to start working on the networking aspect of the PO app. Is there a collection of information somewhere on how to do this? I need to know:

    - How is the server list populated?
    - What is handled server-side/what is handled client-side?
    - How do I retrieve user information, such as ratings in various tiers?
    - What is the format for battle choices sent to the server from the client?
    - Any other information associated with communication between servers and clients?
     
  2. Ethan

    Ethan Member

    Joined:
    Nov 6, 2011
    Messages:
    238
    Likes Received:
    0
  3. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    To view the list of servers connect to registry.pokemon-online.eu:5090 (or 8080). It will automatically send you messages. To check how to parse message refer to wiki page or src/Teambuilder/analyzer.cpp on the source code. You can read the network message enum from src/Shared/network.h

    Maybe you should start by implementing a code to send and receive PO packets (the 4-byte prefix + number of bytes indicated by prefix). Then write code to parse the server list packets. Afterwards you can start working on logging into servers. Only command you need to send from client side is Login command. If you choose unregistered name then the server will send you tons of information.

    After logging in, proceed into battles or channels, your choice. The first thing will keep you busy for a while thouhg.
     
  4. Navy

    Navy Member

    Joined:
    Apr 21, 2010
    Messages:
    101
    Likes Received:
    8
    Can't wait for this!!!