[Tutorial] Developing a server
#1

How to develop a server (Brief tutorial)
Introduction:

This is guide on developing a server, I will NOT show you have to code a server, or how get it online. This is all about the development process of creating a server. When most people create a tutorial on creating a server, they always forget the most vital parts of developing a server, this is what I'm going to illustrate here.

First stage - Scoping:

I bet your thinking scoping? What is scoping? Scoping is when you start to analyse what you're going to do with the project, this is when you decide if your going to create a Roleplay, DM, TDM or any other gamemode. In this stage you also need to decide what platform your going to go with, if it's Linux or Windows. You will also decide how you will store the servers data, for example debating whether or not to choose YSI or MySQL (there are alot more). You will NOT start coding or designing your server at this stage, this is all about analysing the project. This is a key stage in developing a SAMP server. Also you will discuss financial needs for the server, cost for keeping the server online, website, forums and if there's going to be a donation system. Also discuss the requirements for the server, like how much CPU you will need, how many player slots you will be starting with, and how much you intend to get, also discuss if your going to get a hosted tab or not.

Second Stage - Design:

This is when you design the servers good stuff, NOT coding just yet. You will need to discuss on what the server will bring to the player base, such as if your creating a roleplay server, what jobs, factions and other realistic features the server will have. I think it would also be a good idea to open notepad and list all commands that will be used in your server, based on the features you have listed. I would recommend during this stage to create a pseudocode dictionary, and a data dictionary this makes it so much easier to code the server, and will save time. Make sure you stick to it. A data dictionary is where you will create a table, with every variable that will be created in the server. It will also show the datatype of the variable, if it's global or local as well as the name and use for it. For example:

Data Dictionary
Variable NameData TypePurposeLocal / Global
PNameString (MAX_PLAYER_NAME)Stores the players name.Global
Pseudocode shows the code that we understand better. For example:

Код:
if player dies
{
	spawn player at los santos hospital
}
Do NOT pseudocode every line of code, just key parts ie Callbacks / functions ect.

Third Stage - Coding:

The stage that most people are frightened of. This is the stage where you're actually implement the code in to the server, where your data dictionary and pseudocode dictionary is going to become useful. First thing you need to do when starting the coding, is to know your readability. This is of course a very extremely humongous vital part of coding. It makes it a lot less confusing for you, and anyone else that's going to be working on the server. Make sure to comment key parts of the code, have good indentation (tutorials on SAMP forums about indentation), and if your code becomes to large to handle, separate it in to different files. Also make sure to name variables appropriate to there usage. If it's storing a players name: 'PlayerName', or PName. I don't think there will be much problems when it comes to coding, given that you have created a Psuedocode, and a data dictionary. Also, it doesn't hurt to test parts of the code as your coding it, it's time consuming though.

Forth stage - Testing:

The most stressful stage, I would say is testing. I hate it, this is where you will test the full server to make sure there are no loop holes in the code and that everything is working as it should. Remember treat the server as if it was your own program. Document every bug that's found with a description of how it can be fixed. Also get a team of testers that can help you examine on what can be improved and to scope out bugs. Make sure to test EVERY little aspect of the code, as they could be abused as the server progresses.

Fifth Stage - Maintenance:#

This is the stage that you can relax! Take time off, you deserve it. If you have followed every stage of development above, CONGRATULATIONS, your at the best and well deserved stage. This is the MAINTENANCE stage. You will make sure that the server is up to date with includes, plugins, and the SAMP version. Your server is also free to get released so that people can join and have fun, with a tested well planed server.

Tips on development:
  • Choosing the right development team, don't do this on your own. I mean you can if you have a good knowledge on development. It's always better to have another set of eyes. Get a friend who you can trust, and know well.
  • Don't give up on the dream of having your own server, we all know that creating a server isn't easy, but it's worth the stress and time that goes in to it.
  • Schedule yourself. Don't code all day long, or design all day long. This will put alot of stress on yourself and sooner or later you will loose interest.
Thanks for reading my tutorial, please leave a comment below on how it can be improved. As this is my first tutorial, don't hate too much? please. If you enjoyed the tutorial and found it helpful, please do leave us a REP+ although I ain't forcing it on you.
Reply
#2

Useless because plenty of these exist already.
Reply
#3

Good Job Mate. Fairly Explained... Good enough for the one whos planning a server (except the scripting part xD)
Reply
#4

This is not useless at all. It's a great guide for those who have acquired experience coding but don't know the steps to make a working server.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)