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 (408)
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: Bugs in nio? I'm paranoid! on: 2011-06-24 22:51:48
Thanks for the replys. I think I'm better off with a framework anyway.

I was leaning towards Kryonet. Does anyone have experience with both Netty and Kryonet?
2  Game Development / Networking & Multiplayer / Bugs in nio? I'm paranoid! on: 2011-06-24 18:29:35
Hey! I made a thread over at gamedev about a problem I had with networking. One respons I got said that Java nio has bugs that has not been fixed. Is this really true? I find it strange, but he sounded pretty sure. Take a look: http://www.gamedev.net/topic/604811-how-common-is-data-errors-in-tcp/

Also, I started thinking about using some sort of networking library instead. I want to make an MMO that can support a few hunderd players, and I want to use TCP. I want something that just works so that I can get on with my game. I have looked a bit at Mina, and it seems nice. Any tips or suggestions?
3  Game Development / Networking & Multiplayer / Strange problem with Objects streams on: 2006-06-11 14:38:42
Hey!

I'm writing a little multiplayer game and it goes kind of well. But right now I'm having a problem. The problem is that when I'm using ObjectInputStream/OutputStream the Objects are not transfered correctly...

I want to send a "ToServerPacket" to the server from the client. The ToServerPacket has only one instance variable (right now); a Position. The Position is a very simple class. It has only short x; and short y; and get/set methods. The ToServerPacket has a toString() which returns a String with the x and y values shown. Both ToServerPacket and Position implement Serializable.

What happends is that when I send a ToServerPacket, I receive a ToServerPacket on the other side, so far so good, but the values (x and y in the Position) are not correct! Whatever Position I send, I get x==0 and y==0 when I read them on the other side.

The way I tryed it was like this:
ToServerPacket p = new ToServerPacket(...);
System.out.println(p.toString());
out.writeObject(p);

and

Object o = in.readObject();
System.out.println(o.toString());

The toString() works but as I said the values after I read are always 0 and 0.

Bummer... Sad

Edit: It appears that the values are not always 0 and 0, but instead equal to the values in the very first packet that was sent.

Some code: http://rafb.net/paste/results/0ppUfA98.html
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 (110 views)
2013-05-17 21:29:12

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

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

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

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

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

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

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

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

UnluckyDevil (213 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.098 seconds with 21 queries.