1

I'm currently making a game with my friends. It will be mmorpg so I need a game launcher which will display news, update the game and allow login. All this things needs a connection to take information. At first I thought that I will have to make my custom server with custom protocol. Then I found that for checking the version for update I could use HTML and then download new files from ftp. Then I had an idea in mixing ftp with database such as MySQL which will contain passwords, news and versions of game. The problem of ftp is that it will have to download the database to read it which is very unsafe with passwords. Is there any way to make a server which will contain all those things above (news, password check, game version and update files) and allow users to login safely and fast?

Kara
  • 6,115
  • 16
  • 50
  • 57
Kuba Wasilczyk
  • 1,118
  • 3
  • 11
  • 20

2 Answers2

1

I don't know if this would be an option, but it seems you need to implement a client-server architecture, or, client-server (for authorization and coordination) combined with P2P here (for playing).

You could try to create a web service on a server (WebApi or WCF service hosted on an IIS, for instance or a cheaper PHP on an nginx server) that would handle the login logic and client authorization.

This way, you won't need to download the database, just to synchronize the logic with the players. The server would tell you the connection info of your mates, and you could connect to them via P2P, or relay the communication in case you will be playing behind firewalls.

On the other hand, you may try to implement this solely via P2P.

grizzly
  • 1,146
  • 12
  • 26
  • So you think that for playing p2p will be the best option? I thought that creating several servers is better but more expensive. As to launcher you gave me the perfect information. – Kuba Wasilczyk Mar 13 '14 at 06:43
  • 1
    @KubaWasilczyk Well, it really depends on the nature of your game, this option naturally has some drawbacks. Many commercial games work in P2P modes, although they usually use a host. Some of these work in either server or client modes depending on the role (ie. Age of Empires, Supreme Ruler, Liero). Usually the game is capable of creating a host/server and the clients connect to it. Check out this thread, these people might help you more than I am able to: http://gamedev.stackexchange.com/questions/3887/how-can-i-make-a-peer-to-peer-multiplayer-game – grizzly Mar 13 '14 at 07:06
  • I think that I won't use p2p. As for web service. Are there any good tutorials for making a server and then application in c# that will be able to collaborate with server? I searched but I didn't found anything. – Kuba Wasilczyk Mar 13 '14 at 11:00
  • The Microsoft docs on Web API 2 are pretty decent: http://www.asp.net/web-api/overview/getting-started-with-aspnet-web-api , with a decent example of working with WPF here: http://www.asp.net/web-api/overview/advanced/calling-a-web-api-from-a-net-client . – goobering Apr 17 '15 at 07:40
0

You shouldn't be downloading passwords. You should be hashing/salting as well as encrypting the password on the client before sending it up to the server.

The client should not even know there is a sql database on the backend.

As for a good encryption solution, check out this: Hash and salt passwords in C#

Community
  • 1
  • 1
payo
  • 4,501
  • 1
  • 24
  • 32
  • I know this. That's why I am not going to use ftp. I don't know at this point how to do all this things on one server. – Kuba Wasilczyk Mar 12 '14 at 23:51
  • @KubaWasilczyk ok but to be clear, I'm saying the client shouldn't be downloading passwords, even hashed/enc'd passwords. Only sending hashed/enc'd passwords to the server. – payo Mar 13 '14 at 00:00