Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (483)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (550)
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: DataInputStream corruption on: 2007-04-03 22:58:45
Problem solved using PrintStream and BufferedReader.
Thanks for replies!
2  Game Development / Networking & Multiplayer / DataInputStream corruption on: 2007-04-03 18:34:22
Hey,
I'm sending messages like "J&0&1&john" to the server and the server sends the message to all the clients. The server receives and send the messages, but the client receives rubbish or nothing after a while. "J 0 1 john" becomes " 0 j hn" or something like that. The server sends the messages to all the sockets with a for loop. I'm using dataoutputstream and datainputstream. What could be the problem?
Sincerely

Here is the code where the server sends messages to the clients:
public void send(String text)
   {
      System.out.println("** sending: "+text);
      
      for(int i=0;i<oda.getClients().size();i++)
      {
         Client s=(Client)oda.getClients().elementAt(i);
         output=s.getOutput();
         try {
            output.writeUTF(text);
         } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
         }
      }
   }




and the code of the client:

public void run()
   {
      while(true)
      {
         try
         {
            message=input.readUTF();
            
            if(message==null)
               return;
            else
               interpret(message);
            
            System.out.println("** incoming: "+message);
         }
         catch(SocketException e)
         {
            stop();
            try
            {
               socket.close();
            }
            catch(IOException ex)
            {
               ex.printStackTrace();
            }
            e.printStackTrace();
         } catch(IOException e)
         {
            System.exit(0);
         }
      }
   }
3  Game Development / Networking & Multiplayer / Re: Establis Java Game 2500$ per a Game on: 2007-04-02 12:42:46
that's the point. you have to establish a certain amount of trust before I believe I would get paid for such a simple task Wink

right, but
numOfPosts != trust;
4  Game Development / Networking & Multiplayer / Re: Establis Java Game 2500$ per a Game on: 2007-04-01 11:49:58
typcal forum user comlexes, ha?  Tongue
here is a screenshot of the demo of the backgammon:


besides, no one joined this forum with 100s of posts. you had a few posts, too
5  Game Development / Networking & Multiplayer / JFrame from JApplet problem on: 2007-03-31 16:22:57
Hey,
I have a JApplet which calls a JFrame. When a JFrame is created using one of the JButtons in the JApplet, the JPanels in the JApplet get mixed when I scroll the JPanel. When I close the frame, everything works fine again. Besides, the elements in the JList (in the JApplet) dissapear when I add a new element to it using the JFrame. Everything is created and added in the init() method of the JApplet.
Sincerely
6  Game Development / Networking & Multiplayer / Re: Establis Java Game 2500$ per a Game on: 2007-03-31 16:22:26
I wrote the game, I got my money.
Don't blame people who you don't know..
7  Game Development / Networking & Multiplayer / Re: Estimating threads and connection of a server on: 2007-03-11 21:22:41
I planned to use a thread per client. The server is a dual core machine. Wouldn't it be a problem if thousands of clients send messages to one thread?
8  Game Development / Networking & Multiplayer / Estimating threads and connection of a server on: 2007-03-11 13:10:47
Hey,
I'm on a project which is about a board game. How can I approximately calculate max threads and max connections that the server can handle? Is there any way except waiting the server to throw any exception?
Sincerely

PS: The server sends all the clients a message about who joined a table or who quit one, and messages about the moves of the clients to a table (there are 4 players playing on a table)
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.

CopyableCougar4 (18 views)
2014-08-22 19:31:30

atombrot (28 views)
2014-08-19 09:29:53

Tekkerue (25 views)
2014-08-16 06:45:27

Tekkerue (23 views)
2014-08-16 06:22:17

Tekkerue (15 views)
2014-08-16 06:20:21

Tekkerue (22 views)
2014-08-16 06:12:11

Rayexar (63 views)
2014-08-11 02:49:23

BurntPizza (39 views)
2014-08-09 21:09:32

BurntPizza (31 views)
2014-08-08 02:01:56

Norakomi (38 views)
2014-08-06 19:49:38
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!