Find Jobs
Hire Freelancers

PHP Game Lobby Server and C++ Client Library(repost)

$100-500 USD

Cancelled
Posted almost 14 years ago

$100-500 USD

Paid on delivery
I require a game lobby server to be built in PHP, plus a C++ client library to go along with it. ## Deliverables I need a game lobby server with support for NAT hole punching assistance, e.g. helping players to communicate while the punching is being done. The server must be written in PHP, and it must communicate entirely over http and use a MySQL database if necessary. I also need a C++ library to go along with it that will talk to the server, written for the Win32 and Win64 platforms (to be compiled with Visual Studio 2008). First, the client initiates a connection and receives a unique ID. Then, for every connection it will supply a hash of this ID as to make it more difficult to hack, as a get parameter. The client has to choose a channel to enter which, if it does not exist, should be created. Then, the client can list all the information about the other players in the channel. The information returned for each player should be their name, their IP address, and a string simply known as userdata that may contain anything. The client should keep pinging the server at very regular intervals; probably once every 5 seconds or so, to tell it that it's still alive. If the server does not receive this ping or any other message from a client in a set time, it should disconnect them. When the client pings the server as mentioned above, we probably want it to respond with any messages that it has queued up for that user. In short, the server can send messages this way and they will be received fairly quickly. The more frequent pings we can get away with, the better. When a client wishes to disconnect, it will send a disconnect notice to the server which will then disconnect them immediately without waiting for a timeout. When a player wishes to connect to another, it will first ask the server for the most recent list of players and then specify who to connect to in another message, probably by giving the player ID or something similar. The server will then send a message to this player asking if they wish to have a game with the player trying to connect, to which they must answer either yes or no. If they answer yes, they must open up a UDP socket on their machine for player 1 to connect to. If the connection fails, player 1 will inform the server of this. The server will in turn tell player 2, who will then in turn attempt to connect to player 1. Now, since player 1 already has a connection open to player 2 it will very often work since most firewalls will believe that it was player 1 who actually connected, and so will accept the connection. Either way, player 2 will inform the server of the result of the connect attempt. If a connection is established between the two players, both should be disconnected from the lobby server. The C++ library must be written without STL or MFC, using either WinInet or Winsock directly; whichever is easiest. The UDP part of the C++ library will be handled by me, so if the library simply provided a callback function saying "connect to this IP address and give me a return code", this would be enough. There may also need to be other callbacks such as when a new user list is received etc, but this is up for discussion. The API must be as simple as possible without sacrificing control, however. It is very important that the PHP script and the C++ library work together to make the entire process as secure as possible. Rather take a few extra steps to ensure that the connection is not easily hacked by a third party, by using hashes back and forth for example and making sure that they match exactly for every step of the process. You must also protect against MySQL injection and hacking attempts as much as possible.
Project ID: 3482046

About the project

1 proposal
Remote project
Active 14 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
1 freelancer is bidding on average $425 USD for this job
User Avatar
See private message.
$425 USD in 30 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of SWEDEN
Sweden
5.0
22
Payment method verified
Member since Feb 10, 2006

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.