Group name standard practice

Hi all! I wanted to ask about the “standard” way of naming groups. I know it’s not the most interesting thing in the world, but I want to make some plugins and feel it would be good to know what people expect.

In your opinion, how should the group name be written? Sentence case? Snake case? Do you write the word pluralised or not?

Let’s take an example of having a group of power ups. I would call the group “power_ups”, would you do the same?

I use singular snake case
“power_up”
“interactable”
“player_spawn”

Just select one way and keep it consistent across the project.
Snake case and plural like “power_ups” seems reasonable.

1 Like

My personal preference is to create a class to hold constants for the group names, and then access them in code from there, e.g. Groups.BOSS_GROUP.

class_name Groups

const BOSS_GROUP : String = "boss"
const EXIT_GROUP : String = "exit"
const KEY_REPELLER_GROUP : String = "key_repellers"

The names are then broadly irrelevant, as you only ever see them in the Groups file.

2 Likes