×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jun 2006
    Posts
    14

    Challenge player - how to do it?

    I'm trying to start a challenge match but I have some problems. I'm doing things according to "SNAP game dev guide". Here is how I do it:

    - Client 1 (C1) challenges Client 2 (C2): buddy message is sent (it contains uniqe room name based on challanging player userID)
    - just after sending message C1 calls gameStart(..)
    - C2 recieves message (with the same roomID that C1 sent)
    - C2 accepts challange and calls gameStart(..) with exactly the same parameters as C1

    I thought once both clients call gameStart (with the same lobby and game room parameters) they would both join the specified game room. However, for both C1 and C2 gameStart doesn't return (it returns after timeout for both clents).

  2. #2
    Registered User
    Join Date
    Jun 2006
    Posts
    25

    Re: Challenge player - how to do it?

    Likely you need to change the leader flag for the C2 client.
    C1 has leader set to 1. C2 has leader set to 0.
    This indicates that C1 is the challenger, C2 the challengee.

    Cheers,
    Matt

  3. #3
    Registered User
    Join Date
    Jun 2006
    Posts
    25

    Re: Challenge player - how to do it?

    Also, there are instructions for downloading a complete 2-player SNAP Mobile sample game here:

    http://discussion.forum.nokia.com/fo...ad.php?t=83172

    This game implements challenge and response gamestarts between two clients, so you can inspect the implementation.

    Hope this helps!

    Tx,
    Sam

Similar Threads

  1. Create 3GP player with J2ME for Mobile
    By dexxa05 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 57
    Last Post: 2012-01-10, 11:44
  2. Challenge player - forcing time out
    By czubaka in forum Mobile Java Games
    Replies: 3
    Last Post: 2006-07-17, 19:06

Posting Permissions

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