Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (120)
games submitted by our members
Games in WIP (577)
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  
  Starting point for multiplayer development needed!  (Read 10189 times)
0 Members and 1 Guest are viewing this topic.
Offline neuronich

Junior Duke


Medals: 5



« Posted 2012-02-29 14:34:16 »

Hello!
Can Someone suggest me how can I introduce multiplayer in my game. Somehow I can't find anything to start with.
I NEED SOME NICE OVERVIEW with routes to follow.
Does LibGDX have anything to do with it?

Thank you in advance!
Offline Nyhm

Senior Duke


Medals: 3
Projects: 1


Island Forge


« Reply #1 - Posted 2012-02-29 15:15:31 »

Could you elaborate? Are you looking for technical assistance regarding network programming?

Island Forge: Create Islands with Stories for Others to Explore!
Free-to-Play with Membership and Upgrade options!
Offline neuronich

Junior Duke


Medals: 5



« Reply #2 - Posted 2012-02-29 15:34:57 »

Something like this.
I want to learn common methods for network programming. What language, packages are used? Where can I find the introduction, manuals and so on to finally implement my knowledge into multiplayer game?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline sproingie

JGO Kernel


Medals: 202



« Reply #3 - Posted 2012-02-29 16:18:10 »

90% of what you need is simply the standard library for Java.  For a networked multiplayer game, the obvious thing to learn is networking, and for that you need to learn basic IO.  There are dozens of tutorials at http://docs.oracle.com/javase/tutorial/ that can get you started.

LibGDX does not contain any networking classes.  For that you'd use the Android platform APIs which are pretty much the same as what's in the standard Java SDK, plus some extras like Apache HTTPClient. 
Offline Nyhm

Senior Duke


Medals: 3
Projects: 1


Island Forge


« Reply #4 - Posted 2012-02-29 16:30:47 »

Start with the java.net.Socket class.

Island Forge: Create Islands with Stories for Others to Explore!
Free-to-Play with Membership and Upgrade options!
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 78
Projects: 15


★★★★★


« Reply #5 - Posted 2012-02-29 16:39:52 »

A nice clean and simple networking library that I can recommend is KryoNet, if I was going to make a networked games its what I would use.

Also just by way of information since you asked about LibGDX, the above library was created by one of LibGDX's main contributors.
Offline kalkitus

Senior Newbie


Medals: 1
Exp: 6 years



« Reply #6 - Posted 2012-02-29 16:51:51 »

If you have never touched sockets before, I suggest you try implementing a chat server, before you undertake a multiplayer game.

http://pirate.shu.edu/~wachsmut/Teaching/CSAS2214/Virtual/Lectures/chat-client-server.html

Also +1 for the KryoNet library

Offline Nyhm

Senior Duke


Medals: 3
Projects: 1


Island Forge


« Reply #7 - Posted 2012-02-29 17:01:25 »

I just had a look at KryoNet - looks like a well designed library. I'd be interested in trying it.

Island Forge: Create Islands with Stories for Others to Explore!
Free-to-Play with Membership and Upgrade options!
Offline neuronich

Junior Duke


Medals: 5



« Reply #8 - Posted 2012-02-29 17:14:21 »

Wow! Thanks for this fruitful discussion!
It's a good idea to make a chat!
Kryonet looks also nice!
Offline DzzD
« Reply #9 - Posted 2012-02-29 17:34:24 »

I would advice to start by trying & playing with standard network object (Sockets) than once you understand how it work you may want to switch to a library (as it is IMO always important to understand how things works).

Also start with TCP it is a lot easier, you should be able to build you first client/server pretty quickly with a good tutorial

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Nyhm

Senior Duke


Medals: 3
Projects: 1


Island Forge


« Reply #10 - Posted 2012-02-29 17:56:45 »

I would advice to start by trying & playing with standard network object (Sockets) than once you understand how it work you may want to switch to a library (as it is IMO always important to understand how things works).

Also start with TCP it is a lot easier, you should be able to build you first client/server pretty quickly with a good tutorial

I second all of this advice. Always start at the bottom and work your way up. Once you understand how basic sockets work, then you can decide whether you want to (a) keep using them, (b) learn a new API, (c) write your own library, (d) switch to someone else's library. TCP is definitely the way to go for almost all applications. Certainly read about UDP in order to learn the differences, but focus initial coding on TCP sockets.

java.net.Socket and java.net.ServerSocket will get you along way toward your goals.

Island Forge: Create Islands with Stories for Others to Explore!
Free-to-Play with Membership and Upgrade options!
Offline ChexWithRaisins

Senior Newbie


Projects: 1


SphereCCG.com


« Reply #11 - Posted 2012-03-06 02:55:21 »

I'd like to second the recommendation for KryoNet.  I am using it in my own game and it has greatly simplified the process of setting up my game for multiplayer support.

There's still a learning curve for it, but I'd recommend just looking at the source code for some of the example programs that are on the Kryonet site and just modify them to suit your needs.

Help Beta test SphereCCG!
Offline evilfrenchguy

Junior Duke


Medals: 3



« Reply #12 - Posted 2012-03-08 00:26:45 »

I did a small MMO demo with a few classmates in college using just the standard java stuff.

The number one thing I learned is to keep the number of server-side objects to a min. Strings are the number 1 culprit...Bastards. (Can I say that?)
Offline msiggy

Senior Newbie





« Reply #13 - Posted 2012-03-14 02:48:01 »

We just finished networking for our game. I strongly recommend using Kryo to make your life easier, unless you want to challenge yourself and write your own Socket code. Here are a few articles that we based our multiplayer framework on.

https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking

https://developer.valvesoftware.com/wiki/Latency_Compensating_Methods_in_Client/Server_In-game_Protocol_Design_and_Optimization

http://gafferongames.com/networking-for-game-programmers/
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 (52 views)
2014-10-17 03:59:02

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

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

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

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

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

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

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

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

BurntPizza (86 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!