Reddit Reddit reviews Java Network Programming

We found 4 Reddit comments about Java Network Programming. Here are the top ones, ranked by their Reddit score.

Computers & Technology
Books
Networking & Cloud Computing
Computer Networks, Protocols & APIs
LANs
Java Network Programming
Used Book in Good Condition
Check price on Amazon

4 Reddit comments about Java Network Programming:

u/MirageRealms · 7 pointsr/libgdx

I'm the developer of Mirage Realms (www.miragerealms.com) which is an MMORPG written using LibGDX and I also had absolutely no idea wtf I was doing when I started.

I looked into Kryonet as another user has suggested but in the end found I wanted to know a lot more about networking so ended up just writing my own stack. The book that helped me was Java Network Programming https://www.amazon.co.uk/Network-Programming-Elliotte-Rusty-Harold/dp/1449357679 which I mainly used as a reference for TCP sockets and streams - if that's what you need.

The first steps are really figuring out if you are going TCP or UDP, and if you are going to have a hard split between client / server or not. An example of a hard client / server would be world of warcraft or counterstrike. An example of a soft server would be something like quake 2 where the host client is effectively the server.

There is also platform to consider, if you are going for a networked game on mobile phones you are going to have lag and are going to have to figure out ways of working around it via either interpolation or some other means. It's not all packet loss and internet speeds either, the radios in phones suck and you have some random milliseconds of delay just getting the incoming data from the radio depending on how it is currently power cycling, so if its really time critical you can forget the overheads of reflectively looking up packet handlers and such.

If you are just on the PC, life is easy and you can take serious liberties given how fast peoples machines and internet connections generally are these days.

TLDR;

Sounds dumb but figure out what you want before starting anything in terms of a basic architecture and network requirements. Learn the trade-offs between TCP and UDP. You can then focus your time on finding tutorials that fit those requirements i.e. googling "thread per connection TCP server socket" will give you much more to work with than googling "how to make a multiplayer game"!

Liam

u/JavaAndMIPS · 3 pointsr/javahelp

Make a personal project. I made a game editor.



Read more books.

Java Swing:

https://www.amazon.com/Java-Swing-Second-James-Elliott/dp/0596004087

Java I/O:

https://www.amazon.com/dp/0596527500/

Java Generics and Collections:

https://www.amazon.com/Java-Generics-Collections-Development-Process/dp/0596527756/

Java Concurrency:

https://www.amazon.com/Java-Threads-Understanding-Concurrent-Programming/dp/0596007825/

Java Network Programming:

https://www.amazon.com/Network-Programming-Elliotte-Rusty-Harold/dp/1449357679/

Java Web Services:

https://www.amazon.com/dp/1449365116/

Java Database Programming:

https://www.amazon.com/dp/1565926161/

Java Performance:

https://www.amazon.com/dp/1449358454/

Intro to Design Patterns w/ Java:

https://www.amazon.com/Head-First-Design-Patterns-Brain-Friendly-ebook/dp/B00AA36RZY/

Design Patterns (not Java and very dry, but much more in depth):

https://en.wikipedia.org/wiki/Design_Patterns

If you read every O'Reilly book on Java and do two or three big projects (or ten small ones) with what you learn in each book, you will learn how to do anything with Java. Java can do anything any other language can, but it takes longer to get there. Once you get there - once you build it - it will run forever, provided it's built well.



Online resources.

http://www.tutorialspoint.com/swing/

https://www.javatpoint.com/java-swing

The javax.swing class:

https://docs.oracle.com/javase/7/docs/api/javax/swing/package-summary.html

The Java API specification:

https://docs.oracle.com/javase/7/docs/api/

Never took one of these, defer to someone else's advice:

https://www.udemy.com/java-swing-complete/

It takes a while to figure out how to effectively use google. Look up my posting history to see how to format posts. You may need to make a test class to simplify things or provide a simple (and obviously safe) thing that people can execute and debug, if they decide to help you.

You will spend a lot of time on the Java API spec, so make sure that you know how to read a method header and signature. You'll get used to it after a few weeks.

*

General advice.**

Debugging is the single most important thing you do. If you can't see what's going wrong, you won't fix it except via trial and error (which is frustrating and takes forever). Any time something goes wrong, either walk through it with a debugger or get print statements working. Getting print statements working is often a job in itself.

I spend more time debugging than I do programming, because when things are going right it's a breeze but when they aren't it takes ages.

Take up some other hobby that keeps you active.

When you're frustrated and nothing is working, do something else. Go for a walk, garden for a bit, cook something. Make sure you have a notepad or note-taking program on your phone so you can stop and take notes when the solution comes to you.

If nothing else is working, just screw around with things and make print statements to see what they do. That's how I learned everything.

Try to break everything.

Don't be afraid of embarassing yourself.

u/Rigermerl · 2 pointsr/rmit

When I did Network Programming last year I found most of the work and assessed material matched closely to what's in this book:https://www.amazon.com/Network-Programming-Elliotte-Rusty-Harold/dp/1449357679

Java Network Programming: author = Rusty Harold.
The tutorials were pretty much all lifted directly from this book.

Just following that will probably be enough to get you through.

Had a good lecturer when I did it though.

u/Zolomon · 1 pointr/gamedev

Java Network Programming (http://www.amazon.com/Network-Programming-Elliotte-Rusty-Harold/dp/1449357679/) is actually a very good book that introduces network programming in the Java language. Don't mind that it is focused on Java, the concepts it walks through can be found in almost any programming language (same shit, different name).

It talks about writing multithreaded applications, using UDP, TCP, etc. However, if you wonder how to incorporate physics simulations I would suggest you google for Gaffer On Games for his networking guide.