Name Agreements - e-ucm/ead GitHub Wiki

Our base code is kind of big, and we keep some name conventions.

Schema

We keep two separates schemas: the engine schema (representing objects understandable by the engine and the editor) and the editor schema (representing objects understandable only by the editor.)

Editor schema classes often extends an engine schema class, so to mark that, we use the convention to prefix editor schema with Editor. Some examples:

Engine schema Editor schema
Scene EditorScene
SceneElement EditorSceneElement

E.g., Scene represents a game screen, and contains information about its children (scene elements). EditorScene extends Scene and adds some useful information for the editor (like its name).

Engine objects

Many engine schema translates to objects that can be manipulated directly by the engine, with a state and a set of properties that can be modified during runtime. To mark the relation between the schema class and engine class, we use the suffix EngineObject. Some examples:

Schema class Engine class
SceneElement SceneElementEngineObject
TODO more examples when he have them

In the editor, we use a modified version of the engine to show some previews. Sometimes, the core engine object is not enough to represent an object in the editor (e.g., in the representation of scene elements in the editor, we could want to draw its collision polygons), so the engine object must be extended to fulfill the editor needs. We then change EngineObject to EditorObject.

Engine class EditorObject
SceneElementEngineObject SceneElementEditorObject
TODO more examples when he have them