Advertisement
Guest User

Untitled

a guest
Jan 26th, 2015
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. - Developers should agree on a standard for code formatting. Goal: a developer should be able to look at a class and not be able to determine who wrote it. Makes it easier for developers to fix eachother's bugs.
  2. - Not everything needs to be a MonoBehaviour
  3. - Gain control of the startup sequence of the scene. Do not blindly rely on Awake and Start.
  4. - If a class has a public property that needs it's reference set in the Inspector, provide valuable feedback when the property is null so that other developers, and your future you, knows how to fix the problem when you forget to set the value.
  5. - Think about code reuse, but don't be fanatic about it. Split your code into multiple generic classes that can be reused in other parts of the game, and possibly future games.
  6. - Think about performance, but don't try to fix a problem before it actually is a problem. Premature optimizations always eats up much more of your time than you think. Don't be sloppy about it. You don't want to paint yourself into a corner and have to rewrite all code when you actually need to optimize. Be a good architect and build your software in a way that you don't need to optimize, and that it makes it easier for you to change when you do need to optimize.
  7. - Decouple! When you need to setup a new scene to test a specific feature, you don't want to have hardcoded references to all other classes in your code. You should be able to take out only a few systems and make them run independantly.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement