-
Notifications
You must be signed in to change notification settings - Fork 21
Coding Style
triverske edited this page Mar 20, 2016
·
1 revision
Note: Currently the code base does not conform to this style and is not a priority. When the game is fully implemented, the code convention can be applied during refactoring stage.
Coding style can be based on the following example source code.
- Indent: tab, always
- Resource naming: prefix, then underscore, then camelcase name (ex. obj_testResource)
- Brackets: go on the line after the statement and the line after the code block ends
obj_camelCaseTitle
/// Make sure to say what this particular code does here
// One line comment
/*
Multi
Line
Comment
*/
test = 0;
testVariable = 0;
var testVariableLocal = 0;
//If your if or four statement contains only one line of code, don't bother with brackets
for(i=0;i<10;i++)
test += 2;
//If your if or four statement contains several lines of code, use brackets
for(i=0;i<10;i++)
{
test += 2;
testVariable++;
}