Skip to content

Naming conventions

StanPlayzz edited this page Dec 30, 2025 · 5 revisions

Style guide for this project

This page is intended for contributors to this project

Note

For formatting please refer to the .editorconfig and .clang-format files in the repo.

Naming conventions

Files

Use snake_case, ie player_controller.hpp

Types

Use PascalCase, ie struct FooCreateInfo or class Engine

Variables

Local Variables: Use camelCase, ie auto rendererCreateInfo Member Variables Use camelCase with a prefix m_, ie m_playerController

Functions

Use camelCase, ie void setPosition(glm::vec2 const position)

Constants

Use camelCase and add the suffix _v, ie auto constexpr playerMoveSpeed_v

Macros

Use SNAKE_CASE_ALL_CAPS

Abbreviations

Use caps, ie contextCreateInfo -> contextCI

Another notice for functions/methods

Never use auto foo() -> Type, just put the type in front for readability.