Introduction
Establishing a set of style guidelines is essential for maintaining a consistent and professional appearance in all our projects at RFG Studio's. This document outlines the general style guidelines that all developers should follow.
Code Style
- Indentation:
-
Use 4 spaces for indentation. Avoid using tabs to ensure consistency across different editors.
-
Naming Conventions:
- Use CamelCase for class names (e.g.,
PlayerController). -
Use snake case for variable and function names (e.g.,
player health,spawn_enemy). -
Comments:
- Use single-line comments (
-- Comment here) for brief explanations. - Use block comments (
--[[ Comment here ]]) for more extensive documentation.
File Organization
- Folder Structure:
- Organize files into logical folders based on functionality (e.g.,
/src,/assets,/scripts). -
Use clear, descriptive names for folders and files.
-
File Naming:
- Use lowercase letters for file names and do not use underscores for separation, please do space only (e.g.,
player health.lua). - Avoid spaces and special characters in file names.
UI Design
- Consistency:
- Maintain a uniform design language across all UI elements.
-
Use a defined color palette and typography throughout the project.
-
Alignment:
- Ensure elements are properly aligned to create a clean layout.
- Use grids and guides to maintain structure.
Documentation
- Readability:
- Write documentation that is clear and concise.
-
Use headings, bullet points, and numbered lists to improve readability.
-
Version Control:
- Document changes made in the codebase with clear commit messages.
- Maintain a changelog for significant updates and modifications.
Best Practices
- Code Reviews:
- Participate in regular code reviews to maintain code quality and consistency.
- Provide constructive feedback and be open to receiving it.
-
Send code review in discord.
-
Version Control:
- Use Asana for version control.
Conclusion
By following these general style guidelines, we can ensure that our projects at RFG Studio's are well-organized, maintainable, and professional. Consistency in style enhances collaboration and improves the overall quality of our work. If you have any questions or suggestions for these guidelines, please reach out.