When it comes to documentation, we’ve always documentated some stuff. Some handlers are perfectly documented, other’s however are badly documented. We want to have one form of documenting in the future. Both ingame as on the trac.
There are several ways to document the gamemode. We can document both ingame and on trac. As many coders say, a good in-source documentation lessens the need for a lot of outside documentation. I would suggest we document ingame features quite a lot. New functions, new variables, checks, changes, we want everything documented, so that everyone who reads the code and knows scripting gets how it works. Document a variable by adding where it gets called, document a function and say where it gets called, document checks to say what gets checked, and what for. This will help other people in the team get the code, and will smoothen the fixing of bugs and the adding of features.
Handlers/Tips.pwn
timer.pwn
So what about the trac? We will use that to document essential things. It will function as an overview. Which file does what, which can mostly be copied from the file header, and some general lists such as a list of NPCs. We will then have a nice overview, which can help us find things in the gamemode faster.
If you have any suggestions or ideas, please react in this topic within 5 days.
There are several ways to document the gamemode. We can document both ingame and on trac. As many coders say, a good in-source documentation lessens the need for a lot of outside documentation. I would suggest we document ingame features quite a lot. New functions, new variables, checks, changes, we want everything documented, so that everyone who reads the code and knows scripting gets how it works. Document a variable by adding where it gets called, document a function and say where it gets called, document checks to say what gets checked, and what for. This will help other people in the team get the code, and will smoothen the fixing of bugs and the adding of features.
Handlers/Tips.pwn
Code:
/*******************************************************
This file handles the tips that get shown to a player at certain times.
It includes the function ShowPlayerTip, and the Tips itself.
Author: Fireburn
Date: 11-11-1111 (DD-MM-YYYY)
Version: 2.91
*******************************************************/
new aTips [SLOTS]; // This var is used to store the amount of tips a player recieved in.
/*******************************************************
ShowPlayerTip
Show's the textdraw for the player which displays the tip. The textdraw is created
from the InitTip function, which is called from OnGameModeInit. This function is called
per-player every minute, in timers.pwn.
// Author: Jay
// Date: 13th Sept
*******************************************************/
ShowPlayerTip (playerid)
{
TextDrawShowForPlayer (playerid, Text:sometip);
}timer.pwn
Code:
public SecondTimer(playerid)
{
ShowPlayerTip (playerid); // Found in handlers/tip.pwn
}So what about the trac? We will use that to document essential things. It will function as an overview. Which file does what, which can mostly be copied from the file header, and some general lists such as a list of NPCs. We will then have a nice overview, which can help us find things in the gamemode faster.
If you have any suggestions or ideas, please react in this topic within 5 days.