Game Development Community

Questions about game server and client..

by Justin · in Torque 3D Professional · 07/05/2011 (5:42 pm) · 2 replies

I have now made a server thanks to this thread Here. I now have a couple questions.


1. How would I be able to have the client auto update when I make changes to the server/client? (the most important question)

2. How would I get my client to connect to my server/servers? (basically like WOW, where it shows a list of servers to connect to)

3. Do I build my level on the client side or the server side? If it is the server side how do I get into the file to make my level?

4. Do I need to take out the server from the client files or keep those in there? If so how would I do that?

5. how would I connect my game server to the web to be able to have people create usernames and passwords that they use to log in the game and the forums, also to save game data?


I know a lot of this is going to be coding in the files but thats not a problem. Just need to know how to do it or if you know some resources for it. Also what is the best book or video tutorials to get for torque 3d Pro v1.1 for beginners to advance, I check almost every day to see if there are books to buy from garagegames but i don't see any. Thanks for the help.

About the author

Recent Threads


#1
07/05/2011 (8:04 pm)
1. How would I be able to have the client auto update when I make changes to the server/client? (the most important question)

This all depends if your referring to "auto updating" in the development or Post-Release stages of your game


Development stage:
you would need to work on both server and client side simultaneously

e.g

lets say your adding a new weapon, the only differance would be that you may need to have two versions of the weapon one that hold all of the client side information and another that hold all the server side information

unfortunately there is no way to automate this process, as its a manual task.

Post-Release:
Server side: simply build/compile the new server and run on your hosting box

Client Side: build/Compile your release and then make available to the public, a lot of game these days will employ a programmer to create a "game Launcher" that induces the auto update feature, this simply works by checking the version of the game on the customers hdd against the version stored on the games master server or website.

if a version difference is found it then asks the master server or website for a list of files to update and with the customers permission downloads these files to the game directory.



2. How would I get my client to connect to my server/servers? (basically like WOW, where it shows a list of servers to connect to)

this would involve firstly creating or subscribing or being given access to whats known as a master server, master server hold all the information needed to connect to a game server, a master server can hold data for multiple game servers.

so your client would connect to the master server, and ask for a list of servers that are available, the master server would then send the requested data back and that would then be shown on your clients GUI (you would need to make the GUI for this im guessing.)

when the customer selects a server to connect to torque should automatically be able to parse the given data and connect straight to it (may require a slight modification to the current connection coding.)


3. Do I build my level on the client side or the server side? If it is the server side how do I get into the file to make my level?

Most likely you will have to create the level for both server and client, however as like i stated about adding a weapon, your not duplicating code, as only client side data needs to be place in tot he client and like wise with the server it only need to know about the server side coding.

4. Do I need to take out the server from the client files or keep those in there? If so how would I do that?

As you stated at the beginning of your post you followed my thread and have a server up and running, if you followed the thread all the way through you should have most of the client/server side files and coding already in their correct place.

however as the engine is always growing and becoming more powerful this is more than likely to change at some point, if it does i hope to update the guide i posted.

5. how would I connect my game server to the web to be able to have people create usernames and passwords that they use to log in the game and the forums, also to save game data?

Just like connecting to a master server that stores masses of data about different servers people can play on you will need to create a master database, most Connolly used database applications are MySQL and MSSQL

Your master database would be situated either on its own server, or on the same server your games website is hosted on for performance issued it is recommended to either have separate servers for database use or a really powerful server if your going to be hosting both web-services, a game server and a database server.

I believe if you perform a search on the forum for MySQL and or MSSQL there are already a few threads that have Guides on connecting torque3D to a MySQL database.

creating the database scheme and tables is up to you how you want them layed out and what data you which to store in to them.

once you have that figured out and have torque connecting to your database successfully and able to read test data, the next step would be to create some PHP pages on your website that would handle users registering and loggin in to your website to check their account, a quick Google search for php + MySQL will return countless pages on what you will need to do.

Hope this helps.

Regard

Lee
Founder of IGD Studios.
#2
07/06/2011 (4:17 am)
Thank you for all your help.

1. Yes I was talking about Post-Release. So the Game launcher takes care of auto update of the client?

2. So the master server would have the info on if the game server/servers are up and running? Will look more into this.

3. Not really understanding this.

4. I was talking more about the client side. I made a copy of a fresh full game client to make the server side. I was wondering on the client part do i leave the server files in there or do i need to take those files out? Not really understanding this. I just want them to connect up to the server and not be able to create one..

5. Will look more into this, thank you.