Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Networking & Multiplayer / Re: Testing SGS wirelessly on: 2007-01-22 07:37:56
solved  Smiley
2  Game Development / Networking & Multiplayer / Re: Leaving an opened channel on: 2007-01-03 01:52:37
alright i'll work it out Smiley thanks!
3  Game Development / Networking & Multiplayer / Re: Leaving an opened channel on: 2006-12-29 02:02:37
Before you join the channel, set a ClientConnectionManagerListener for the client manager, when the join is succesful you get a joinedChannel(ClientChannel channel) call. Store the ClientChannel and then when you want to leave, just call close() on it.

HTH

Endolf

is ClientConnectionManagerListener  = JMEClientChannelListener ?
4  Game Development / Networking & Multiplayer / Leaving an opened channel on: 2006-12-22 04:12:27
Hi guys,

currently, I'm trying to make a simple mini game on cell phone using SGSJME. The game requires clients to open channels and leave channels frequently. Basically, i understand that by opening a channel, we use clientMgr.openChannel("channel1");

My problem is, how do we leave or close that particular opened channel?   Shocked
5  Game Development / Networking & Multiplayer / Testing SGS wirelessly on: 2006-12-01 03:46:53
Hi guys,

has anyone tried testing SGSME with an actual mobile device yet? I've tried running samples program like JMEChatClient on my iPAQ on a wireless network but not working well. I'm able to login into the SGSME server BUT the connection seems to die seconds after logging in.

1. Login success on mobile device (but gotta take quite some time, usually have to login more than once)
2. Login ChatTestClient (PC) <-- J2SE sample program

/** The Problem **/
3. PC able to see mobile device ID
4. BUT mobile device can't
5. PC sends a message to mobile device but mobile device didn't receive
6. Login 2nd PC Client
7. Mobile Device's userList still empty
/************************************************************************/

8. Login on mobile device Emulator
9. Mobile device Emulator able to see both PC's ID and able communicate

 Huh
6  Game Development / Newbie & Debugging Questions / Re: Question regarding StringUtils.bytesToHex() on: 2006-12-01 02:26:21
icic.., thanks for all the explanation. really appreciate it!  Wink
7  Game Development / Newbie & Debugging Questions / Re: Question regarding StringUtils.bytesToHex() on: 2006-11-30 04:41:26
wow, it works using this,
myId=new String(userId,0,userId.length>8?8:userId.length);
thanks!!   Grin

but could you roughly explain to me the meaning of this line?
userId.length>8?8:userId.length



8  Game Development / Newbie & Debugging Questions / Question regarding StringUtils.bytesToHex() on: 2006-11-29 05:12:34
Hi guys,

I'm trying to reduce the length of IDs to 8 characters in J2ME. From what i see in J2SE, it works  perfectly fine doin this way
myID = StringUtils.bytesToHex(userID, userID.length - 4);

however in J2ME, it didn't work that way.   Undecided
9  Game Development / Networking & Multiplayer / Re: Having problem sending message to SGSJME server on: 2006-11-10 18:24:11
nvm, problem solved.  Smiley
10  Game Development / Networking & Multiplayer / Having problem sending message to SGSJME server on: 2006-11-06 04:59:54
Hi Guys, I tried sending a simple message to the SGSJME Server but no luck.  Undecided 
The error prompt: Uncaught exception java/lang/NullPointerException.
Below are part of my codes.

public void run()
   {
      
      while( true )
      {
         tick();
         sendServerMessage();
      
      }
   }

public void tick()
   {
      int myImageSpeed = 8;
      switch( imageDirection )
      {
         case LEFT:
         myImageX-=myImageSpeed;
         break;
         
         case RIGHT:
         myImageX+=myImageSpeed;
         break;
         
         case UP:
         myImageY-=myImageSpeed;
         break;
         
         case DOWN:
         myImageY+=myImageSpeed;
         break;
      }
      
      repaint();
      serviceRepaints();
   }

protected void keyPressed( int keyCode )
   {
      if (this.getGameAction(keyCode) == UP) {
         imageDirection = UP;
         keyStatus = KEY_NUM2;
       }
       else if (this.getGameAction(keyCode) == DOWN) {
          imageDirection = DOWN;
          keyStatus = KEY_NUM8;
       }
       else if (this.getGameAction(keyCode) == LEFT) {
          imageDirection = LEFT;
          keyStatus = KEY_NUM4;
       }
       else if (this.getGameAction(keyCode) == RIGHT) {
          imageDirection = RIGHT;
          keyStatus = KEY_NUM6;
       }
       
       else {
          keyStatus = keyCode;
       }

}


protected void keyReleased( int keyCode )
   {
      imageDirection = 0;
      keyStatus = 0;
   }

   
   private void sendServerMessage() {
      
      String message = "";
      String dataString = message.toString();
      
      switch(keyStatus) {
        // UP
        case KEY_NUM2:
           System.out.println("UP");
           
           message = "Up";
         ByteBuffer data = ByteBuffer.wrap(dataString.getBytes());
         clientMgr.sendServerMessage(data);
         
            break;
        // DOWN
        case KEY_NUM8:
           System.out.println("DOWN");
           
           message = "Down";
         ByteBuffer data1 = ByteBuffer.wrap(dataString.getBytes());
         clientMgr.sendServerMessage(data1);
         
            break;
        // RIGHT
        case KEY_NUM6:
           System.out.println("RIGHT");
           
           message = "Right";
         ByteBuffer data2 = ByteBuffer.wrap(dataString.getBytes());
         clientMgr.sendServerMessage(data2);
         
         break;
        // LEFT
        case KEY_NUM4:
           System.out.println("LEFT");
           
           message = "Left";
         ByteBuffer data3 = ByteBuffer.wrap(dataString.getBytes());
         clientMgr.sendServerMessage(data3);
         
            break;
        // FIRE
        case 5:
           
            break;
        default:
           
    }
      
   }
   
Pages: [1]
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars and Titan!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (76 views)
2013-05-17 21:29:12

alaslipknot (88 views)
2013-05-16 21:24:48

gouessej (117 views)
2013-05-16 00:53:38

gouessej (113 views)
2013-05-16 00:17:58

theagentd (125 views)
2013-05-15 15:01:13

theagentd (112 views)
2013-05-15 15:00:54

StreetDoggy (156 views)
2013-05-14 15:56:26

kutucuk (178 views)
2013-05-12 17:10:36

kutucuk (178 views)
2013-05-12 15:36:09

UnluckyDevil (186 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.547 seconds with 21 queries.