8 Replies - 482 Views - Last Post: 06 January 2014 - 12:06 PM Rate Topic: -----

#1 novakasss  Icon User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 370
  • Joined: 11-July 12

Do Sockets are worth attention here?

Posted 04 January 2014 - 01:33 PM

I'm interested in creating basic BlackJack multiplayer game. It should work inside browser. I would like to ask, do ServerSockets and Sockets are worth my attention here? Or I should look for other solutions to work with Multiplayer mode?
Is This A Good Question/Topic? 0
  • +

Replies To: Do Sockets are worth attention here?

#2 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10803
  • View blog
  • Posts: 40,262
  • Joined: 27-December 08

Re: Do Sockets are worth attention here?

Posted 04 January 2014 - 01:37 PM

For real-time gameplay, rather than a turn-based game, sockets are what you'd want to use. Otherwise, how would you handle real time data?
Was This Post Helpful? 1
  • +
  • -

#3 novakasss  Icon User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 370
  • Joined: 11-July 12

Re: Do Sockets are worth attention here?

Posted 04 January 2014 - 01:39 PM

View Postmacosxnerd101, on 04 January 2014 - 01:37 PM, said:

For real-time gameplay, rather than a turn-based game, sockets are what you'd want to use. Otherwise, how would you handle real time data?

thanks, the problem is, that I have never created game like this before. If I use Sockets, do I still need hosting, that accepts Java Servers? Or for sockets it is unnecessary?
Was This Post Helpful? 0
  • +
  • -

#4 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10803
  • View blog
  • Posts: 40,262
  • Joined: 27-December 08

Re: Do Sockets are worth attention here?

Posted 04 January 2014 - 01:40 PM

You need some centralized server to handle sockets. The beauty is, with sockets, that you can pick a different language for the server. Java is one viable option.
Was This Post Helpful? 0
  • +
  • -

#5 novakasss  Icon User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 370
  • Joined: 11-July 12

Re: Do Sockets are worth attention here?

Posted 04 January 2014 - 01:43 PM

View Postmacosxnerd101, on 04 January 2014 - 01:40 PM, said:

You need some centralized server to handle sockets. The beauty is, with sockets, that you can pick a different language for the server. Java is one viable option.

So for example I can use Java to create Client. and then PHP to create Server? ( I know only these two languages :P). Then basic server should be enough?
Was This Post Helpful? 0
  • +
  • -

#6 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10803
  • View blog
  • Posts: 40,262
  • Joined: 27-December 08

Re: Do Sockets are worth attention here?

Posted 04 January 2014 - 02:10 PM

That is correct.
Was This Post Helpful? 1
  • +
  • -

#7 novakasss  Icon User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 370
  • Joined: 11-July 12

Re: Do Sockets are worth attention here?

Posted 05 January 2014 - 04:03 AM

I decided to stick with Java server. I want to ask.
Does this feature would let me to create Java server? I would like to buy one and do some tests, but I don't know if it is what Im actually looking for.

This post has been edited by novakasss: 05 January 2014 - 04:04 AM

Was This Post Helpful? 0
  • +
  • -

#8 v0rtex  Icon User is offline

  • Caffeine: db "Never Enough!"
  • member icon

Reputation: 223
  • View blog
  • Posts: 773
  • Joined: 02-June 10

Re: Do Sockets are worth attention here?

Posted 05 January 2014 - 07:54 AM

If you are going to stick to Java for the server then this might help you out. It also actually covers writing a Client/Server using Sockets in Java which is the most common networking method used for Games.

As for renting a server to use as your Client, I guess it all depends on how many users you intend to serve at once. For a 2D RPG game where you might have say 10-50 users connected at once, a beefy home computer may be able to do the job but yes as you get more users online at once, your servers would have to scale to meet the demand. I don't know exactly what you plan on building but if its a 2-player blackjack game then I don't think you will need to rent a server and could probably make do with a dedicated home computer but once again, I don't know how many clients you intend to have connected concurrently so...

Anyways, Good luck with your game!

This post has been edited by v0rtex: 05 January 2014 - 07:56 AM

Was This Post Helpful? 0
  • +
  • -

#9 The Adrian  Icon User is offline

  • New D.I.C Head

Reputation: 16
  • View blog
  • Posts: 47
  • Joined: 09-January 12

Re: Do Sockets are worth attention here?

Posted 06 January 2014 - 12:06 PM

A socket is a binding of an IP address and a port that you use to send and receive data from. If you wanted to do networking, you will need to use sockets. There are other options like writing/reading directly to the wire, but don't do this. If you're in Java, you'll need to use Socket and ServerSocket. (And by need I mean you definitely should, there are of course other options but I won't go into them)

There are a lot of things that you can do with the game you've proposed. You can use databases where you post and read to tables in the database, or you can actually use a client-server approach which is definitely the best choice starting out.

Good luck!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1