Java-Gaming.org    
Featured games (78)
games approved by the League of Dukes
Games in Showcase (427)
Games in Android Showcase (89)
games submitted by our members
Games in WIP (466)
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]
 

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

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (76 views)
2014-04-15 18:08:23

BurntPizza (69 views)
2014-04-15 03:46:01

UprightPath (81 views)
2014-04-14 17:39:50

UprightPath (66 views)
2014-04-14 17:35:47

Porlus (81 views)
2014-04-14 15:48:38

tom_mai78101 (105 views)
2014-04-10 04:04:31

BurntPizza (165 views)
2014-04-08 23:06:04

tom_mai78101 (261 views)
2014-04-05 13:34:39

trollwarrior1 (210 views)
2014-04-04 12:06:45

CJLetsGame (220 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
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!