Opened 6 months ago
Closed 2 months ago
#125 closed enhancement (fixed)
component system (for GUI windows)
| Reported by: | Carsten | Owned by: | Carsten Fuchs <carsten.fuchs@…> |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Cafu Engine | Version: | svn-head |
| Keywords: | Cc: | ||
| Platform: |
Description
Overview
In the forum thread at http://www.cafu.de/forum/viewtopic.php?f=6&t=1099, author "midix" suggested to use a "component system" for game entities in the Cafu Engine.
Whereas until now we used class hierarchies to introduce new features, component systems are a way to break the inherent limitations and inflexibility. Composing game entities of components to bring in new features in an additive manner removes the combinatorial complexity that exists with class inheritance, can improve encapsulation (features are encapsulated in components), and gives users both more flexibility and control.
The forum thread subsequently gathered a lot of additional and related information, see there for all the details.
GUI Windows
During my research, it turned out that the windows of a GUI essentially profit from a component system as much as game entities do.
In Cafu we already have a pretty good GUI system with an existing class hierarchy for GUI windows. The window class hierarchy starts to suffer (mildly still) from the very problems that a component system is supposed to solve, and at the same time is much smaller than our game entity class hierarchy.
As we're still relatively new to component systems, at this time we cannot foresee all the ramifications and consequences or obligations that switching to a component system will bring. As such, the GUI window class hierarchy seems to be a very good field to introduce a component system to Cafu. It being both "small" but also seeing use in real life makes it the ideal ground for gathering experience, making experiments and learning more about it. The experiences gathered in the course of the implementation of this ticket are intended to facilitate the future migration of the game entities to a component system, too.
Therefore, the objective of this ticket is to introduce a component system that is supposed to replace the current GUI window class hierarchy.
Change History (94)
comment:1 Changed 6 months ago by Carsten
comment:2 Changed 6 months ago by Carsten
comment:3 Changed 6 months ago by Carsten
(In [685]) GuiSys: Have components have references to their parent window.
Components can never have NULL pointers to their parent window, so better use a reference instead.
(I think that in the course of the development of the component system we will still need non-const references before we will eventually be able to make them const.)
References #125.
comment:4 Changed 6 months ago by Carsten
(In [687]) GuiSys: Update ComponentBaseT::UpdateDependencies() method.
It becomes clear that ComponentBaseT::ResolveDependencies() is called not only when a window and its components have been loaded (a one time issue at init time), but also when a window is copied or when it has been modified in the GUI editor.
This change reflects this insight by renaming the method and updating its documentation.
References #125.
comment:5 Changed 6 months ago by Carsten
comment:6 Changed 6 months ago by Carsten
comment:7 Changed 6 months ago by Carsten
(In [690]) CaWE: Introduce component system to GUI Editor.
The recently added component system for GUI windows is now also introduced to the GUI Editor in CaWE:
The GUI Editor gets a "Component" menu and a "add component" command so that the user can add components to windows.
(At this time however, the "Window Inspector" has not yet been updated, so that the newly added components are not yet visible in the user interface.)
References #125.
comment:8 Changed 6 months ago by Carsten
comment:9 Changed 6 months ago by Carsten
In 693/svn:
comment:10 Changed 6 months ago by Carsten
In 694/svn:
comment:11 Changed 6 months ago by Carsten
In 695/svn:
comment:12 Changed 6 months ago by Carsten
In 696/svn:
comment:13 Changed 6 months ago by Carsten
In 697/svn:
comment:14 Changed 5 months ago by Carsten
In 698/svn:
comment:15 Changed 5 months ago by Carsten
In 699/svn:
comment:16 Changed 5 months ago by Carsten
In 700/svn:
comment:17 Changed 5 months ago by Carsten
In 701/svn:
comment:18 Changed 5 months ago by Carsten
In 702/svn:
comment:19 Changed 5 months ago by Carsten
In 703/svn:
comment:20 Changed 5 months ago by Carsten
In 704/svn:
comment:21 Changed 5 months ago by Carsten
In 705/svn:
comment:22 Changed 5 months ago by Carsten
In 706/svn:
comment:23 Changed 5 months ago by Carsten
In 707/svn:
comment:24 Changed 5 months ago by Carsten
In 708/svn:
comment:25 Changed 5 months ago by Carsten
In 709/svn:
comment:26 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:27 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:28 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:29 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:30 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:31 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:32 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:33 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:34 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:35 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:36 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:37 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:38 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:39 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:40 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:41 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:42 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:43 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:44 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:45 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:46 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:47 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:48 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:49 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:50 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:51 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:52 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:53 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:54 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:55 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:56 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:57 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:58 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:59 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:60 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:61 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:62 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:63 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:64 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:65 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:66 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:67 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:68 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:69 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:70 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:71 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:72 Changed 3 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:73 Changed 2 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:74 Changed 2 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:75 Changed 2 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:76 Changed 2 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:77 Changed 2 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:78 Changed 2 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:79 Changed 2 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:80 Changed 2 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:81 Changed 2 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:82 Changed 2 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:83 Changed 2 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:84 Changed 2 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:85 Changed 2 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:86 Changed 2 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:87 Changed 2 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:88 Changed 2 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:89 Changed 2 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:90 Changed 2 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:91 Changed 2 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:92 Changed 2 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:93 Changed 2 months ago by Carsten Fuchs <carsten.fuchs@…>
comment:94 Changed 2 months ago by Carsten Fuchs <carsten.fuchs@…>
- Owner set to Carsten Fuchs <carsten.fuchs@…>
- Resolution set to fixed
- Status changed from new to closed

(In [683]) GuiSys: Introduce component system.
This change is a first sketch for introducing a component system for GUI windows.
It does not add any new functionality yet, but just shows some outline how this might be conceptually done.
References #125.