Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (495)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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 20: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 16: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 12: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]
 

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

The first screenshot will be displayed as a thumbnail.

Dwinin (29 views)
2014-09-12 09:08:26

Norakomi (57 views)
2014-09-10 13:57:51

TehJavaDev (79 views)
2014-09-10 06:39:09

Tekkerue (39 views)
2014-09-09 02:24:56

mitcheeb (59 views)
2014-09-08 06:06:29

BurntPizza (45 views)
2014-09-07 01:13:42

Longarmx (30 views)
2014-09-07 01:12:14

Longarmx (36 views)
2014-09-07 01:11:22

Longarmx (36 views)
2014-09-07 01:10:19

mitcheeb (40 views)
2014-09-04 23:08:59
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!