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
{{ message }}
This repository has been archived by the owner on Oct 12, 2018. It is now read-only.
Each example should be as complete and straight forward as possible (including ample use of comments). Also, we should strive to use the best coding practices we can think of, considering users are likely to use this code as the framework for their own projects.
Watch this video, and this video, to learn more about the concept of "clean code", to learn some good coding practices.
In general:
Keep comment capitalization consistent.
Comment everything.
Avoid branches that just return if the condition is false at the top of a function, move that check upwards, and branch before calling the function (see example here).
We should keep this list updated, and turn it into a contributing guide, for those interested in adding their own examples.
The text was updated successfully, but these errors were encountered:
gamedevsam
changed the title
Standardize comments and optimizations across all bullet examples
Standardize comments and optimizations across all examples
May 5, 2014
"Commenting everything" is dangerous. You'll quickly run into comments that don't add any value, they just rephrase what the code already says and are pretty useless. Example:
// make the block immovablegroundBlock.immovable=true;
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Each example should be as complete and straight forward as possible (including ample use of comments). Also, we should strive to use the best coding practices we can think of, considering users are likely to use this code as the framework for their own projects.
Watch this video, and this video, to learn more about the concept of "clean code", to learn some good coding practices.
In general:
We should keep this list updated, and turn it into a contributing guide, for those interested in adding their own examples.
The text was updated successfully, but these errors were encountered: