Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (523)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (591)
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 1568 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

Greetings,
Pegaseus
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): http://gedankenweber.wordpress.com
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 »

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

Quote
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 (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.

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

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

Gibbo3771 (9 views)
2014-11-24 19:59:16

trollwarrior1 (35 views)
2014-11-22 12:13:56

xFryIx (73 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50

digdugdiggy (46 views)
2014-11-12 21:10:15

digdugdiggy (40 views)
2014-11-12 21:09:33

kovacsa (66 views)
2014-11-07 19:57:14

TehJavaDev (70 views)
2014-11-03 22:04:50

BurntPizza (68 views)
2014-11-03 18:54:52

moogie (83 views)
2014-11-03 06:22:04
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!