You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bryan Abrams edited this page Aug 6, 2013
·
19 revisions
wtf
This page tells you what you should know before you start coding.
Compiling
Current main compiler is clang on Linux systems. (others may or may not work)
Makefile building is managed with premake4. (Ubuntu repositories have the old version that doesn't work) Updating makefiles directly doesn't work, makefiles are on the repository only for the Travis support.
Code style
We try to maintain clean and consistent codebase. The rules are not yet set on stone, this should be fixed in the near future.
USE TABS, NOT SPACES
Naming Conventions
// Class names always begin with a capital letter// Words that follow have their first letter capitalized classClassExampleName {};
// Variables and functions begin with a lower case letter// Words that follow have their first letter capitalized int variableExampleName = 0;
voidfunctionExampleName() {}
Always use curly brackets by conditions
if(something){
doSomething();
}
Line up contextually similar variables when possible
int someVariable = 213;
int shortVar = 123;
int anotherVar = 123;
Use long clear variable names over short names.
wpnDmgMltplr is bad to read and write, while weaponDamageMulti is nice.