I want to move my game from single player to MP

Hello, I have created mini basketball. Actually, there is a player(oval) who moves around the basketball court, there is also a ball, player can pick the ball, pass it to the all directions, move around with it. I was keeping in mind, that I would like to publish this game on the internet. Now It is that time, I want to know few things, maybe you can give me the answer.

Does server can be created only with java?
I mean, I used to write mini chat programs. When Client is created with Java, and server also, is a java class which uses threads to communicate with clients. Is here the same situation?

If the answer to the first question is “yes”, then what I need to put my server 24/7 available?
I was thinking about the idea, to let for players to download the client program and keep server inside somewhere. So, do I need to offer Virtual private server, or I can live on with hosting?

How should I run my server?
Do I need to upload server in the FTP? How should I make that server running? Does it is done with some commands?

Does the game logic should be in the server?
I have read, that client should just listen for inputs and updates the view. Is that mean that my all work is worthless? Because my game logic is inside client class.

Thank your for your answers.

I’m kind of running into the same problem. I’ve been working around 3 months on my 2D RPG game and i would like to make it multiplayer so i can play it with my friends.
Thanks for asking this question and i guess i’ll give you a free bump :smiley:

Greetings,
Pegaseus

You can implement a games server side logic in java for sure. But you also need some hardware or virtual machine to run it on.

For 24/7 best will be to rent one, or have a decicated machine at your home with a permanent internet connection.

If you want to make hacks and cheats difficult, move as much game logic to the server as possible. IMO most of the game logic should be in the server, but at times performance issues will arise and you need some of it in the clients to achieve good performance (low latency in game actions).

Yes, no problem. Minecraft for example does exactly this and it works just fine.

Well, you “could” host it from your home-machine and get yourself a dyndns account (dyndns.com), although that probably isn’t the solution you’re looking for. Like Varkas said you can rent a dedicated server or vServer (linux or windows). Judging by the question I’d say you should look at a windows machine (which are a bit more expensive) but you can easily remote-desktop them.

Just start it on the remote machine, console or double click :smiley:

It should be, usually. For “mini basketball” I wouldn’t even bother tho, yet. If you have players who love the game and there are a ton of cheaters about, you can always update the game later to support server-side-game-logic :slight_smile: For a first start I’d just go with whatever works :slight_smile:

You can also implement a web interface to the server using some simple HTTP Classes.
This way you can administer it from anything that has a browser. (like a phone)

So you only need to use a terminal if you have a serious crash, or need to update the software.

Anyhow, fist let the server run locally at home, before you decide to spend $$ on a hosting service.

You should first only think about actually making it work instead of where you should host it. If you’re going to make it secure, than you have a problem there. It is really hard to implement. If you’re just going to make it so you can play with your friends, than it should be easy. I would go for secure-way, because it would give you experience by working on a simple project.

If you are intending to, you can release the server application, so any of your friends can open a server and call anyone to play.

This way you don’t even need a permanent server. That is, until the point you’d want a server browser in your client, which would require having a master list server, responsible for receiving all the information of all online servers (server name, ip, etc.) and propagate it.