summary at bottom
Channels are unarguably superior to wires. The only problem is that people often avoid them due to their apparent complexity. I have a fix for that.
I see a LOT of games have absolutely terrible channel names, like heal10HPPlayer or make_all_the_trees_appear. These make it impossible to debug your code, since you forget everything 10 seconds after you make it. Here are my tips for good naming conventions, so you never have a problem with your game. After that, I’ll tell you my personal style.
Tip 1: Sort
A lot of high-level creators will give you the advice to consolidate everything into one large processing unit or area. This is generally a good idea, since it saves memory and time spent finding each device. Your channel names should represent that. If you’re making channels for some randomly-generated loot chests, have names like lootGenerate and lootTriggered.
On top of that, you can even have subsystems (say I have a game controller and then within that I have timing and a shrinking border):
game.end
game.border.shrink
game.begin
Tip 2: Be Concise
Your channel names should say exactly what they need to for someone new to the game to understand, because that might be you! You might go back and check on your game in a year, and not have a clue what’s going on, but your channels should be clear about that.
At the same time, you should not have a channel called game.startgamebydistributingplayers. That’s inefficient and useless when you could just have game.start. Worst case, you can just leave a guide with a text device saying what each channel does.
Tip 3: Be Consistent
No matter what convention you use, stick to it. Even if you have something like heal10HPPlayer, don’t make the opposite channel playerdamageHP10. That makes debugging wayyyy harder.
Each point, but shorter
Tip 1: Sort channels by function.
Tip 2: The channel should say what it needs to, and only that.
Tip 3: Each channel should follow the same rules.
My personal method
I sort each subsystem with a period, so like in tip 1:
game.end
game.border
game.begin
I place a text device next to the collection of all my devices explaining what each general channel subsystem is if it’s too complicated to figure out easily.
Usually, my channels are first sorted by scope: player/game/team; then by subsystem: cast/boundaries/boost; then by individual mechanism: spell1/close/damage.
Thanks for reading all the way. No need to comment nice guide, that’s what the like button is for. I hope this helps newer GKC users!
shdwy out