Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Don't forget to read Tuesday's email newsletter for your chance to win a free copy of Construct 2!


MisterVicodin

Member Since 02 Apr 2013
Offline Last Active Apr 24 2013 10:43 PM

Posts I've Made

In Topic: C++ and MySQL for the server

24 April 2013 - 10:47 PM

If you do not understand that description, then you need to first do step 0: Learn to effectively develop software. This includes being good at at least two different programming languages, and being able to read and understand the manual pages and documentation of the system libraries.
If you do not yet have those skills, you cannot develop a robust game server. Right now, you're trying to learn calculus, from a textbook written in Latin, without knowing any Latin. You need to learn the Latin before you can learn the calculus.

If you want one-on-one help, there are many contractors and consultants that will spend their time helping you out. That will cost money, though.

Actually, i have successfully coded many many things in about 6 or 7 other languages. And learning to effectively code has nothing to do with it. I was asking what requirements i need. Suchas the include files. I have now coded a server btw. I was simply asking for the required information needed to be able to code a server. And actually, calculus is a good suggestion but is not actually necessary. Anyways. Thanks guys for all your help. I followed a WinSock tutorial to get started and coded the rest of the server myself. Hoping that i will have my MMORPG done by December. Good day everyone.


In Topic: C++ and MySQL for the server

09 April 2013 - 05:18 PM

The FAQ for this forum has links to game network coding.

In very brief, to create a server, you can start as such:

1) Call socket() to create a TCP socket.
2) Call bind() to bind the socket to your given port, and IP address 0.0.0.0 (IPADDR_ANY).
3) Call listen() for basically historical reasons.
4) Now, enter a loop that does the following:
4.1) Put all active sockets in an FD_SET.
4.2) Call select() with that FD_SET to test readability of sockets. Perhaps use a timeout so you can run periodic events even if the server is idle.
4.3) For the listening socket, if it returns readable, it means someone is connecting; call accept() on it and allocate a data structure with incoming buffer and client information. (This is empty for now.) Put the mapping from socket ID to buffer/client information into a hash table.
4.4) For each connected socket that is readable by select(), call recv() once to attempt to fill up the incoming data buffer in the per-socket data structure. Recv() will not block the first time you call it after select() says it is readable.
4.4.1) Decode, remove, and dispatch any complete packet(s) that are in the receive buffer for this socket/client.
4.4.2) If recv() returns 0, or the client sends a "quit/disconnect" command, or the client is sending bad packets, close the socket, and de-allocate the buffer/client information structure for this socket.
4.5) Goto 4.1

That's really all there is to the basic server loop, based on select(). This will easily get you to many hundred simultaneous users.

I did not understand any of this except how to open a socket. Can someone just add me on Skype so in case i need help i will have someone to help me out?


In Topic: C++ and MySQL for the server

06 April 2013 - 06:05 PM

What i mean is, what should i use to make the server? Is there a tutorial on this?

You should use tools that are available to you, and that you are comfortable in using.
Successful game servers have been written using a variety of technologies, including but not limited to C++, Java, C#, Python, Visual Basic, Erlang, JavaScript, and C.

So, the first question is: What do you already know, and what do you have available to you?

What i meant is how do i make a server? Idek how i would do any of this but no-one is even giving me a hint on how to start coding a server.

 

What i already know is basically how to do everything needed to make an online game except how to code a server. So any help would be great!


In Topic: C++ and MySQL for the server

05 April 2013 - 09:02 PM

What i mean is, what should i use to make the server? Is there a tutorial on this? 


In Topic: C++ and MySQL for the server

05 April 2013 - 09:00 PM

I already suggested how this is done: You create a game server (application server) that talks to the database, and provides the necessary view of the data to the client.
Separately, it accepts requests from the client, computes the result of those requests, and returns the authoritative response to the client, as well as stores important outcomes back into the database.

Yes but you never explained how i would do this. Not everyone here have a Game Programming degree in C++ :P Lol. But do you have any suggestions on how i could do this?


PARTNERS