×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    2

    Sending messages - via server or directly to opponent?

    Hi,

    I'm working on a 2-player SNAP Mobile game for the first time here and I have a question regarding sending game messages:

    Upon initialising gameplay, I have to initialise some random map/terrain coordinates of my game. Because of the random values, I have to ensure that both clients have the same values.

    If that's the case, I'm thinking of having the leader of the game room doing this initialisation and having the opponent to standardise. How then can I pass these values to my opponent?

    1. sendBuddyMessage - sending these values directly to him? like when issuing a game challenge? is this possible?

    2. sendGamePacket - sending a game packet to server? this requires me to pass in a byte array. what if i have a large array of integer values? is this method feasible for me?

    appreciate any kind of help or comments here, thanks!

  2. #2
    Regular Contributor
    Join Date
    Mar 2006
    Posts
    59

    Re: Sending messages - via server or directly to opponent?

    Hi,

    all messages from a player to another go via the SNAP Mobile server.

    Both of your solutions sound feasible, though 2) you can only send game packets when you have already started a game/ you are in the same gameroom with the other player. How large array of integer values are you talking about here? Big packets (over 5KB) will make the packet sending and receiving slower depending on the network.

    Cheers!

    - Heidi

Similar Threads

  1. SIP send messages directly
    By sebflash in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2006-08-19, 13:12
  2. how to use udp, for sending data server to client
    By acayir in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2006-08-02, 19:18
  3. error sending data to the server. SymbianOS error -1
    By dihex in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2005-11-15, 18:55
  4. Sending USSD Messages
    By dfahy in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2005-04-28, 09:20
  5. Sending SMS messages with multi-byte characters in Java
    By derek_ocallaghan in forum Mobile Java General
    Replies: 0
    Last Post: 2002-05-17, 16:02

Posting Permissions

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