A simple client/server app [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm fairly new to Java coding (and to programming in general) and I'm studying a lot to catch up and having been through a lot of fundamentals (the language, OO concepts, Genrics, Concurrency,Collections etc..)and my future goal being Android programming, I'm trying to get started with networking (simple apps, just to get the grasp of it, and I know it's alot of stuff).
So, I set off trying to convert my simple tic-tac-toe GUI game (with a little bit of swing and Java2D) into a server/client game but I soon understood that it's a daunting task, at least without networking knowledge.
So, I know this may be a wrong question,or the wrong place, but please, could someone point me to where I can start to achieve my goal (it being a simple client/server application, I don't care if it's a simple messaging app or a useless minigame). I'm not interested in multithreaded servers or stuff like that, just the basics that can get me to code something actually working!
thanks a lot, please help me!
Luca

Take a look at this question:
Java: Best Place to Begin Learning Basic Networking
I've never done networking in Java, but my suggestion would be to read, read, read about networking in Java. Learn the appropriate libraries, learn how they work, what people have done with them.
First figure out what kind of app you'd like to build and then don't touch a line of code until you have a good idea how that type of app would be built, which means a lot of research.

Here is how to make a client / server app from Oracle with a working example: http://docs.oracle.com/javase/7/docs/technotes/guides/rmi/hello/hello-world.html

Related

How to make a simple Java LAN server for a game [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I'm currently making a simple game in Java where players move around a maze that is constantly generating around them and killing monsters that spawn. However, I wanted to improve this by adding a simple co-op functionality across their LAN. I've never looked into networking at all and thought it would be a good idea to learn a bit about it by trying it out in my game.
Are there any simple useful tutorials on how to make a basic peer-to-peer server which would let people connect over LAN, specifically Java but how they work too?
There are several ways you could develop a LAN multiplayer game. I suppose that the easiest one would revolve around using Sockets.
With this in mind you'll need to create a server application that will accept incoming connection from clients and would then marshal the whole operation. With that in place you'll need to create the clients that will connect to said server.
I suppose that other than plain sockets you could also implement the same functionality using Java's RMI. You can take a look at an example here:
https://docs.oracle.com/javase/7/docs/technotes/guides/rmi/hello/hello-world.html
A simple Google search though should yield quite a lot of results and examples regarding this matter (LAN games in Java).

Can I use Python for Android development? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Can I create simple programs for Android using Kivy or do I have to learn Java?
By simple, I mean some graphics (some rotating lines, a timer, a highscore), a memo etc not real-time games.
I've created this kind of programs for Windows/Linux and I'd really like to extend to Android.
On Google, most of the answers say that I should learn Java, whereas the remaining answers say that Python is pretty good. I also asked this question on chat, and some said 'yes', while others said 'no' and finally someone said "All programming languages get to be translated to JavaScript, so it is not much of a difference".
No. And may be Yes. Let me explain.
No:
The app will not look native if you use Kivy
There will be a lag in startup
You can call native Java API using Pyjnius but sometimes it won't work fine or you will need to work very hard to get simple things done.
Because you can not use the native UI, crafting a good looking android app might be a lot of work.
Yes:
You can build an app that works
Many games and apps don't use native UI but they are still very usable
You can use projects like Plyer and Pyjnius to get the common android functionality
Kivy might be an excellent choice for games
My recommendation:
Please do check out the apps and games built with Kivy on Play Store. Play with them on your phone or tab. See how they look and feel. Checkout the Kivy docs and see what they offer.
PS: I am a big time Python fan and I do like Kivy. I hope and believe that it will offer better widgets and UI integrations in the future. I wish Kivy offered something like NativeScript where I could use Python to create native widgets.

making games in C++ or making games in java? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm programming games in java, because i really love java and it's much more easier, but i keep seeing c++ games, c++ engines on the internet. It looks like video game world turning around c++. But still i don't like c++.
I know, there is too many librarys and engines for c++, java has less.
So, i was wacthing videos about GDC and new game engines and the idea of start making games in c++ came my mind but like i said; i dont like c++.
I just wanted to ask should i keed going with java or should i move to c++? and why?
Btw, i'll game developer, it's not just hobby.
I suppose the best thing you can do is ask yourself if you currently feel limited by Java. You mention that there are lots of C++ libraries out there. If you're having trouble finding Java libraries to do the things you're looking to do, but can find plenty of C++ libraries that would have done what you wanted, it would probably be worth switching.
On the other hand, if you're not felling held back by Java, and you're able to get things done, switching to C++ isn't going to be needed. Other people 'seeming' to use C++ isn't a reason for you to leave Java if you like and are comfortable with it.

I'm looking for a graphics library for Java [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
My task is to make a 2D 8-bit game with a couple of friends. All of us are fairly novice programmers, and only I have any experience with graphics programming (just a little though), so this will mostly be a learning experience for us. So, I have a few questions...
What is a good graphics library for our needs?
Does Java have any native graphics capabilities or do I have to use
additional libraries? If yes, how are they?
Is Java a good choice for writing a game in? (we don't have to use
Java)
Will any graphics library allow you to make animations or any sort or do you actually have to code that kind of thing?
Thanks for your time.
Java2D: http://java.sun.com/products/java-media/2D/index.jsp
If you are not making serious game, try processing
http://processing.org/
althogh it's designed to make visual and interactive product, I think it is worth considering.
The ACM (http://jtf.acm.org/index.html) library is good for basics.
Java has some native graphics, but libraries are far better.
Java is good for games (far better than python even with PYGame). If your game is complex, then you definitely want to use C(++).
There are libraries that allow animations, although you could just program it yourself.
As previously mentioned, Processing is good for non-serious applications. But if you want a full-fledged IDE then you definitely want Eclipse.

Simple open source DHT implementation in Java for learning purposes [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking for recommendations for a simple open source implementation of a Distributed Hash Table in Java to play around with. No fancy features, just for learning purposes, no production functionality needed. It should be simple to set up (e.g. 1 physical machine with n-JVMs) and well documented preferably with some examples, tutorials or starting guides.
Research yields these candidates: FreePastry and OpenChord but I'm not fully convinced they meet my criteria simplicity-wise.
Have you got any experience with these or other implementations? Recommendations?
Thanks & adios
There is TomP2P on Github.
Maybe JDHT will fit the bill. I haven't checked it out myself, but it's written at a university, sometimes that means it's simple and used for teaching. :-)
I have been working on an implementation of Kademlia lately. It's very simple to setup and use and it's well documented. There are several tests written that demonstrate the different functionality as well as a starting guide in the Readme.md file itself.
You can use openkad
I started with free pastry..I've had a great experience with it. It was very simple to set up and run a ring of nodes. I've been mainly using PAST (File storage) and its been quite easy to get running. I'd suggest having a look at the PAST tutorial here. https://trac.freepastry.org/wiki/tut_past
The code is over simplified in my opinion but you say that is all you need so I guess thats ok.

Categories

Resources