OpenPF2 / Plugin

Core C++ Game Logic for OpenPF2 (Status: Pre-alpha)
https://www.openpf2.org/
Other
23 stars 6 forks source link

[Developers] Implement Standard Naming Convention for C++ vs. Blueprint Event Notifications and Replication Callbacks #26

Closed GuyPaddock closed 1 year ago

GuyPaddock commented 1 year ago

As a Developer, I'd like it if there was a standard naming convention for replication and event callbacks in C++ code so that I don't get confused about what code will handle a particular event and I don't have to worry that the name of a C++ method will clash with the name of a BlueprintImplementableEvent method.

Conditions of Acceptance

  1. Given I'm adding an event callback to a class (e.g., APF2PlayerControllerBase) and that event will need to be handled both in C++ code and Blueprint:
    1. I'd expect there to be a standard naming convention I can follow for the event notification that:
      1. Clearly communicates whether the code being called is implemented in C++ or Blueprint.
      2. Guarantees no naming clash between the C++ event and Blueprint BlueprintImplementableEvent.
    2. I'd expect to find that all existing event callbacks in the OpenPF2 and OpenPF2Playground code and Blueprints have been updated to follow the new naming convention.
  2. Given I'm implementing a replication callback: I'd expect there to be a standard naming convention for replication callbacks so that they don't conflict with other types of event callbacks.

Conventions from Other Projects

The UE4 RTS project from Daedalic Entertainment has the following naming convention:

Proposed Naming Convention

Rationale: This seems more consistent with what Epic does in several places of the engine itself.