Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (769)
Games in Android Showcase (230)
games submitted by our members
Games in WIP (855)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Best way to handle networking? (MMO)  (Read 1948 times)
0 Members and 1 Guest are viewing this topic.
Offline nelsongames

Junior Devvie


Medals: 3



« Posted 2018-04-02 23:47:26 »

For 2D / Topdown 2D Pixel games

- What's the best way to handle networking (movement) on an MMO using WASD?
- What's the best way to handle networking (movement) on an MMO using point and click?
- What's the best way to handle networking (movement) on a non-MMO (so 4 player games)?
- What are the advantages of using Netty? What are the advantages of using Kroynoet?
- What are some good places / material to start learning about networking (specifically movement)?
- What are some open source projects that handle networking really well?

Most of my issues with networking come with movement. I would like to overcome this, but don't know where to start. Any advice would be appreciated.
Offline dime26

JGO Ninja


Medals: 72
Projects: 7
Exp: 12 years


Should traffic wardens be armed?


« Reply #1 - Posted 2018-04-03 00:46:18 »

My only experience is with KryoNet, I only really experimented with chunk data, movement and the direction a player was facing. I limited updates to only send 5 times per second rather than 60 which is the fixed FPS with LibGDX.

I setup an AWS free server but was soon getting charged as some testing hit the server a bit much for the free tier. The engine was simple to use but did mean writing a client and a server, the project was too big for a solo dev so I scrapped it.

Its worth trying out KroNet https://github.com/EsotericSoftware/kryonet as it was very easy to setup and there are tutorials out there to get you started. When you start testing on a live server you are likely to get some charges.
Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #2 - Posted 2018-04-03 10:12:31 »

I think the first thing you should understand is that these are the same question:

- What's the best way to handle networking (movement) on an MMO using WASD?
- What's the best way to handle networking (movement) on an MMO using point and click?

There should be no dependency between slightly different input methods and your networking code. If there is, you need to look again at what you are doing.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline SteveSmith
« Reply #3 - Posted 2018-04-03 12:07:31 »

I'm currently developing a multiplayer FPS engine (and games that use it) and I use Kryo for the networking.  Seems pretty good to me.  However, regarding your questions, volumes could (and have been) written on the "best way", and it mainly comes down to the specifics of your game.  For a "proper" game, you want to run the same events on the client and the server, with the client sending keypresses to the server.  The server then sends back it's interpretation of the current game state back to the clients, and they correct themselves if there's a discrepancy.

Offline VaTTeRGeR
« Reply #4 - Posted 2018-04-03 12:09:55 »

Quote
What are the advantages of using Netty? What are the advantages of using Kroynoet?
Netty gives you more options for customization at the cost of increased complexity.

Quote
What are some good places / material to start learning about networking (specifically movement)?
http://ithare.com/category/network-programming/
https://gafferongames.com/post/introduction_to_networked_physics/
http://www.gabrielgambetta.com/index.html
http://tutorials.jenkov.com/java-nio/index.html
https://0fps.net/2014/02/10/replication-in-networked-games-overview-part-1/
https://0fps.net/2014/02/17/replication-in-networked-games-latency-part-2/
Also search for presentations from game dev conferences like GDC or whatever, there are a lot of resources on network programming.

Quote
What are some open source projects that handle networking really well?
MTA SA is open source on github and handles hundreds of players. I don't think the source code for that is something you want to deal with though. That applies to most open source games i think, you will spend more time trying to understand the codebase than learning about networking by reading through the source code.
Offline nelsongames

Junior Devvie


Medals: 3



« Reply #5 - Posted 2018-04-04 02:30:27 »

I think the first thing you should understand is that these are the same question:

- What's the best way to handle networking (movement) on an MMO using WASD?
- What's the best way to handle networking (movement) on an MMO using point and click?

There should be no dependency between slightly different input methods and your networking code. If there is, you need to look again at what you are doing.

It's not the same thing, WASD spams packets to the server continuously and requires more checks to keep it clean (so only accept the W packet once, and then when they let go of the button, send that information to the server), but regardless of that it still depends a lot on predictions.

The second one spams less packets and depends more on pathfinding algorithms to find the route.

There are different techniques on handling both, and would like to know.



Quote
What are the advantages of using Netty? What are the advantages of using Kroynoet?
Netty gives you more options for customization at the cost of increased complexity.

Quote
What are some good places / material to start learning about networking (specifically movement)?
http://ithare.com/category/network-programming/
https://gafferongames.com/post/introduction_to_networked_physics/
http://www.gabrielgambetta.com/index.html
http://tutorials.jenkov.com/java-nio/index.html
https://0fps.net/2014/02/10/replication-in-networked-games-overview-part-1/
https://0fps.net/2014/02/17/replication-in-networked-games-latency-part-2/
Also search for presentations from game dev conferences like GDC or whatever, there are a lot of resources on network programming.

Quote
What are some open source projects that handle networking really well?
MTA SA is open source on github and handles hundreds of players. I don't think the source code for that is something you want to deal with though. That applies to most open source games i think, you will spend more time trying to understand the codebase than learning about networking by reading through the source code.

Incredibly helpful, thank you!
Pages: [1]
  ignore  |  Print  
 
 

 
EgonOlsen (1572 views)
2018-06-10 19:43:48

EgonOlsen (1632 views)
2018-06-10 19:43:44

EgonOlsen (1144 views)
2018-06-10 19:43:20

DesertCoockie (1572 views)
2018-05-13 18:23:11

nelsongames (1173 views)
2018-04-24 18:15:36

nelsongames (1639 views)
2018-04-24 18:14:32

ivj94 (2395 views)
2018-03-24 14:47:39

ivj94 (1606 views)
2018-03-24 14:46:31

ivj94 (2691 views)
2018-03-24 14:43:53

Solater (883 views)
2018-03-17 05:04:08
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46
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!