Hi !
Featured games (87)
games approved by the League of Dukes
Games in Showcase (672)
Games in Android Showcase (194)
games submitted by our members
Games in WIP (727)
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: What to do to improve real time? on: 2008-04-02 05:32:48
In a real-time game it is better to send at intervals.  Otherwise, how do you deal with "when it moves"?  When the positional value changes you send a message? If you are constantly moving you could be sending thousands of messages a second depending on the frequency of updates in your game or however you are dealing with this.  Intervals are really the only way you can keep traffic to a consistent level as well as giving your network a consistent flow that keeps the game from getting jerky when lots of stuff is going on and really smooth when nothing is going on.  If programmed well you'll have a consistent flow throughout.

I would recommend taking a look at the synchronization system in JGN that provides exactly this:

For an example in jME that uses a synchronization implementation and allows multiple connected clients see here:

The "flagrush" is an example based on the FlagRush tutorial in jME.  As you can see from the JMEGraphicalController it is trivial to create implementations for other systems to allow JGN to work with them.

For more information on JGN see:

Thanks for the info,

By the way, can anyone help me by giving me which are the best time rates to send info (every ? milliseconds)
2  Game Development / Networking & Multiplayer / What to do to improve real time? on: 2008-04-01 18:34:40
Hi, I am trying to do a java real time networked game. Right know the client is only sending data to the server when it moves (change of position) and the server sends data to clients when any client has moved. My question is the following: Is it better this approach or maybe its better to constantly send the info every certain time. Thanks and any suggestions to improve real time are welcome.

3  Discussions / General Discussions / Real Time in Java on: 2008-04-01 09:55:00
Hi, I am currently working on a networked game. I want to know if with good socket programming and game design it is possible to make a real time game in Java, or is there the need of another tool? Thanks,

4  Game Development / Networking & Multiplayer / Re: About sending data on sockets on: 2008-03-28 00:21:26
Being more explicit:

Maybe I dont understand the theory on DataOutputStreams. Anyway I am going to try to be more explicit.
When I have the following:


I believe that the x is sent first in a frame that includes the address where it should go etc (IP frame). And then the y is sent on another independent frame with its header, address where it should go etc.

So if the aforementioned is true, wouldnt it better to send x and y in only one frame. I could make my own protocol to hande the data. For example


When I receive something like this, I will break it into parts by using .split("@") and then check that if it has a "P" is a Positional message. So I know the other two data splitted are X and Y.

If I have a out.writeUTF(M@HELLO); , The M will tell me its a textMessage and I will take the rest of the content as a message.

Does anyone has donde something like this? Please help.
5  Game Development / Networking & Multiplayer / Re: About sending data on sockets on: 2008-03-27 23:49:02
Does anyone here uses like a protocol or a communication frame. Maybe one frame could be :


When the other side receives it and do an split("@");. It will understand its a Position frame(because of the P) and then use x and y.

If the frame is :


M stands for message so it will manage the frame as a text message.

Anyone has used this kind of idea?
6  Game Development / Networking & Multiplayer / About sending data on sockets on: 2008-03-27 21:59:52

I am using right know dataOutput and Input Streams to send data between server and clients. Using WriteInt and ReadInt I send and receive positions over the net. What I understand is that if I have:


I am sending one packet after another, so Im trying to make like a frame protocol where I could send x and y in only one packet. Any ideas of how to do this?


7  Game Development / Networking & Multiplayer / If I want to have a little chat on my game what should I do? on: 2008-03-18 22:17:16
Do I work with another socket connection and declare a new DataInputStream or DataoutputSream?
8  Game Development / Networking & Multiplayer / Re: DataInput and Dataoutput Stream (approach for I/O) on: 2008-03-18 22:11:00
Thanks!!! Wink
9  Game Development / Networking & Multiplayer / Re: DataInput and Dataoutput Stream (approach for I/O) on: 2008-03-18 19:40:17

Someone tolde me to do this: Use a BufferedOutputStream between the DataOutputStream and the socket's output stream, and only flush() the DataOutputStream when you've sent all the data for a particular transaction.

What´s your opinion on this option?
10  Game Development / Networking & Multiplayer / DataInput and Dataoutput Stream (approach for I/O) on: 2008-03-18 07:38:56

I am currently working on a networked game. I was sending positions and that kind of stuff like this:

//out and in are DataOuput and DataInput Streams


and receiving it:


I then thought that it was a better practice to send x and y in a single outputstream like this (Thought it will generate less traffic if I send data once and not twice):


Then I will receive the data like this:

String data[] = in.readUTF.split("@");
x = Integer.parseInt(data[0]);
y = Integer.parseInt(data[1]);

I want to know if this is truly a good approach, is it faster than the one aforementioned. Or is there any other better approach or any suggestion. Thanks,

Pages: [1]
IanParcs (50 views)
2016-04-18 14:18:53

KaiHH (48 views)
2016-04-18 08:35:41

KaiHH (79 views)
2016-04-15 12:43:58

theagentd (82 views)
2016-04-14 02:16:17

theagentd (97 views)
2016-04-14 02:15:43

IanParcs (111 views)
2016-04-12 03:51:16

IanParcs (50 views)
2016-04-12 03:50:03

IanParcs (47 views)
2016-04-12 03:49:54

IanParcs (43 views)
2016-04-12 03:49:52

IanParcs (52 views)
2016-04-12 03:49:52
Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17

List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50

Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30 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‑
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!