Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
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  
  I want to move my game from single player to MP  (Read 4469 times)
0 Members and 1 Guest are viewing this topic.
Offline dudeperfect

Junior Newbie

« Posted 2013-10-09 14:56:34 »

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.
Offline Pegaseus

Innocent Bystander

« Reply #1 - Posted 2013-12-04 14:33:50 »

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 Cheesy

Offline Varkas
« Reply #2 - Posted 2013-12-04 14:41:41 »

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).

if (error) throw new Brick(); // Blog (german):
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline seismic

Senior Devvie

Medals: 4
Projects: 1

« Reply #3 - Posted 2013-12-05 06:22:51 »

Does server can be created only with java?
Yes, no problem. Minecraft for example does exactly this and it works just fine.

If the answer to the first question is "yes", then what I need to put my server 24/7 available?
Well, you "could" host it from your home-machine and get yourself a dyndns account (, 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.

How should I run my server?
Just start it on the remote machine, console or double click Cheesy

Does the game logic should be in the server?
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 Smiley For a first start I'd just go with whatever works Smiley
Offline Damocles
« Reply #4 - Posted 2013-12-05 06:35:53 »

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.
Offline trollwarrior1
« Reply #5 - Posted 2013-12-05 07:19:38 »

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.

Offline Rorkien
« Reply #6 - Posted 2013-12-05 15:57:35 »

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.
Pages: [1]
  ignore  |  Print  

EgonOlsen (45 views)
2018-06-10 19:43:48

EgonOlsen (25 views)
2018-06-10 19:43:44

EgonOlsen (47 views)
2018-06-10 19:43:20

DesertCoockie (202 views)
2018-05-13 18:23:11

nelsongames (127 views)
2018-04-24 18:15:36

nelsongames (126 views)
2018-04-24 18:14:32

ivj94 (867 views)
2018-03-24 14:47:39

ivj94 (128 views)
2018-03-24 14:46:31

ivj94 (771 views)
2018-03-24 14:43:53

Solater (143 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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‑
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!