Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
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  
  Kryonet/Kryonet alternatives  (Read 3145 times)
0 Members and 1 Guest are viewing this topic.
Offline saucymeatman
« Posted 2013-12-18 20:22:52 »

Kryonet seems perfect for my first online project. But i've done alot of reading on TCP vs. UDP and UDP really sounds like a better option.

"KryoNet does not currently implement any extra features for UDP" - Kryonet's github

Is there a library like Kryonet that is UDP based? Or am I being silly and TCP is perfectly acceptable?
My game cannot lag for half a second while waiting for a packet resending and reorginizing.

Read this :
http://gafferongames.com/networking-for-game-programmers/udp-vs-tcp/

Very convincing.

But maybe he is wrong?
Offline Mac70
« Reply #1 - Posted 2013-12-18 20:30:32 »

You can send data via UDP using KryoNet - "connection.sendUDP(object);"

Check out my Devblog! Smiley
Offline opiop65

JGO Kernel


Medals: 156
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #2 - Posted 2013-12-18 21:58:04 »

UDP and TCP have their pros and cons. If you really want to get down and dirty with networking in a large scale game, use both. But for small games TCP should be fine. I doubt it would lag half a second behind unless you're doing something very network intensive constantly.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Mac70
« Reply #3 - Posted 2013-12-18 22:03:52 »

In my opinion:

Use TCP when you need to transfer data like: login/register data, entities data (when first time in view range).

Use UDP when you need to transfer data like: movement update, actions, entities state updates.

Check out my Devblog! Smiley
Offline opiop65

JGO Kernel


Medals: 156
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #4 - Posted 2013-12-18 22:06:49 »

+1 Events that need to be completed with a low chance of dropped packets should be sent using TCP. Any sort of login information, inventory changes etc..

Anything that doesn't absolutely need to actually make it to the client (movement updates) can be sent using UDP.

Offline Andre Lopes
« Reply #5 - Posted 2014-01-07 16:52:37 »

Question :
If i use libgdx + kryonet, will i be able to enjoy the cross-platform in android/desktop/html
OR NOT?

I know its stupid, kill me for asking that, but i dont know.

Offline opiop65

JGO Kernel


Medals: 156
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #6 - Posted 2014-01-07 17:15:50 »

Kryonet is not built off of the Android networking API, so as far as I know, no it will not.

Offline Andre Lopes
« Reply #7 - Posted 2014-01-07 17:17:59 »

Kryonet is not built off of the Android networking API, so as far as I know, no it will not.

Dang it. So it seems i will just make a desktop game.
Offline Andre Lopes
« Reply #8 - Posted 2014-01-07 17:24:30 »

Kryonet is not built off of the Android networking API, so as far as I know, no it will not.

Dang it. So it seems i will just make a desktop game.

Edit :
Kryonet is a networking library, that works both on desktop and android, and it is very easy to use (just look at the example from the page).
http://gamedev.stackexchange.com/questions/37232/can-networking-be-platform-independent-in-a-libgdx-game

I just dont know if it still applies, i guess i will risk it Smiley
Offline dishmoth
« Reply #9 - Posted 2014-01-07 19:57:15 »

Kryonet+LibGDX definitely works for both desktop and Android (evidence).

I can't comment on iOS or HTML.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Tinhorn
« Reply #10 - Posted 2014-01-30 20:53:40 »

UDP doesnt work with robovm
but tcp does

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

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

The first screenshot will be displayed as a thumbnail.

Longarmx (38 views)
2014-10-17 03:59:02

Norakomi (28 views)
2014-10-16 15:22:06

Norakomi (24 views)
2014-10-16 15:20:20

lcass (28 views)
2014-10-15 16:18:58

TehJavaDev (54 views)
2014-10-14 00:39:48

TehJavaDev (54 views)
2014-10-14 00:35:47

TehJavaDev (43 views)
2014-10-14 00:32:37

BurntPizza (64 views)
2014-10-11 23:24:42

BurntPizza (36 views)
2014-10-11 23:10:45

BurntPizza (78 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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
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!