Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (481)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (548)
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 / Newbie & Debugging Questions / Re: Problem with lwjgl on: 2013-11-06 04:18:04
You are doing this:

C:\Users\Ryan>java -jar C:\Users\Ryan\Desktop\MonMapEdit\MonstersMapEditor.jar

It means that your current working directory is c:\Users\Ryan.

I guess you want to have C:\Users\Ryan\Desktop\MonMapEdit\ as current working directory no?

Maybe you need to go inside this folder and run:

java -Djava.library.path=native/windows -jar MonstersMapEditor.jar

?

2  Game Development / Networking & Multiplayer / Re: Best way to measure latency between a client and a server on: 2013-10-30 21:54:01
When my game client connect to the server I exchange 5-10 UDP sockets in less than a second to sync both machines. The client run with the same clock as the server. After that, you could always guess the RTT during the game but is it less necessary since server send packets with the real timestamp when the event is happening (moving objects, damages, etc.). The client would know if it is in the past or not Smiley
3  Game Development / Networking & Multiplayer / Re: Board Game on Intranet on: 2013-10-30 21:51:39
A board game do not require a low-latency server, you could develop it with any technology you want.

You only need to implement a basic TCP server. I would start with this if I were you:

http://docs.oracle.com/javase/tutorial/networking/sockets/index.html

You might also want to use something already done for you like NAGA:

https://code.google.com/p/naga/
4  Game Development / Networking & Multiplayer / Re: [KryoNet] Networking only works on LAN? on: 2013-10-30 21:48:28
Please make sure Kryonet is not binding on your loop-back device (127.0.0.1).
You can verify with the command netstat in console:

On windows: netstat -an

On Linux: netstat -ln

You could also try to telnet the TCP port directly (with a software like putty on Windows, telnet command line on Linux/OSX).

Lastly, make sure your firewall is not simply blocking your application port, the first time you run your program a popup window asking a confirmation shows up. It only show once Smiley

HAMACHI is like being in a LAN, no need of port forwarding and both UDP and TCP would work (with extra latency).
5  Game Development / Networking & Multiplayer / Re: LWJGL, KryoNet on: 2013-10-30 16:50:04
Some suggestions:

- Separate your server simulation ticks into states. A state contains the position and velocity of all the entities in the simulator for a specific period of time. When you send the information to your clients specify the state too.

- On the client, do the same in reverse, create states based on packets you receive and store positions, velocity, etc. in them.

- Instead of extrapolating, interpolate between previous states. Add a 100ms lag to all your player. It might sound strange to add lag, but you will get stability in exchange (giving time to packets to get in). You could still extrapolate if you have missing states (intense lag).

- In my game I have 32 entities that I update 20 times per second. (640 small UDP packets).

- Since you are sending something every 50 ms, you could store all the packets to a specific player and send them in a batch (of 1400 bytes packets).

- To reduce bandwidth and packet count: add some line of sight detection, send only packets to players who can find the information useful.

- Use java.nio.ByteBuffers to pack your data. You can pre-allocate a big one and re-use it for all your packets (for both reading and writing packets).


 
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.

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

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

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

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

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

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

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

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

Norakomi (37 views)
2014-08-06 19:49:38

BurntPizza (67 views)
2014-08-03 02:57:17
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!