From 1d4a487116e37026fd3258466d8be2dfc9d1f4c8 Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Mon, 20 May 2024 14:10:46 -0400 Subject: [PATCH 1/4] First pass --- docs/discussion/gom.drawio.svg | 4 ++++ docs/discussion/gom.rst | 39 ++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 docs/discussion/gom.drawio.svg create mode 100644 docs/discussion/gom.rst diff --git a/docs/discussion/gom.drawio.svg b/docs/discussion/gom.drawio.svg new file mode 100644 index 00000000..3669affb --- /dev/null +++ b/docs/discussion/gom.drawio.svg @@ -0,0 +1,4 @@ + + + +
Engine
Engine
System
System
System
System
System
System
Scene
Scene
Sprite
Sprite
Sprite
Sprite
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/discussion/gom.rst b/docs/discussion/gom.rst new file mode 100644 index 00000000..7fc0860d --- /dev/null +++ b/docs/discussion/gom.rst @@ -0,0 +1,39 @@ +============= +The Game Tree +============= + +Games in PursuedPyBear organize their objects into a tree, with the +:class:`Engine` as the root, and then :class:`System` and :class:`Scene`, and +then :class:`Sprite`. + +.. figure:: gom.drawio.svg + + +Game Objects +============ + +All of these are instances of :class:`GameObject`, which manages things like +tree operations and children searching and such. + +Other than the :class:`Engine` and its direct children, you may structure the +tree however you want. You can define your own game objects and put them in your +scenes (they won't render, but they'll receive events). + + +Event Dispatch +============== + +Events are dispatched breadth first: top to bottom, starting from the +:class:`Engine`, and then the :class:`System`, and then the :class:`Scene`, and +then their children. + +In the above diagram, events would be dispatched in the following order: + +1. Engine +2. System +3. System +4. System +5. Scene +6. Sprite +7. Sprite +8. Sprite From 93031f0524be1587ceedb5608b49d67657287d01 Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Mon, 20 May 2024 14:30:24 -0400 Subject: [PATCH 2/4] Fix links --- docs/discussion/gom.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/discussion/gom.rst b/docs/discussion/gom.rst index 7fc0860d..d1976ac4 100644 --- a/docs/discussion/gom.rst +++ b/docs/discussion/gom.rst @@ -12,10 +12,10 @@ then :class:`Sprite`. Game Objects ============ -All of these are instances of :class:`GameObject`, which manages things like +All of these are instances of :class:`.GameObject`, which manages things like tree operations and children searching and such. -Other than the :class:`Engine` and its direct children, you may structure the +Other than the :class:`.Engine` and its direct children, you may structure the tree however you want. You can define your own game objects and put them in your scenes (they won't render, but they'll receive events). @@ -24,8 +24,8 @@ Event Dispatch ============== Events are dispatched breadth first: top to bottom, starting from the -:class:`Engine`, and then the :class:`System`, and then the :class:`Scene`, and -then their children. +:class:`.Engine`, and then all of the :class:`.System` instances, and then the +:class:`.Scene`, and then their children. In the above diagram, events would be dispatched in the following order: From 55ad6a7d57000c3619844619b44aa1e562da5d88 Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Mon, 20 May 2024 14:36:06 -0400 Subject: [PATCH 3/4] More link fixes --- docs/discussion/gom.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/discussion/gom.rst b/docs/discussion/gom.rst index d1976ac4..9314d7d9 100644 --- a/docs/discussion/gom.rst +++ b/docs/discussion/gom.rst @@ -3,8 +3,8 @@ The Game Tree ============= Games in PursuedPyBear organize their objects into a tree, with the -:class:`Engine` as the root, and then :class:`System` and :class:`Scene`, and -then :class:`Sprite`. +:class:`.GameEngine` as the root, and then :class:`.System` and :class:`.Scene`, and +then :class:`.Sprite`. .. figure:: gom.drawio.svg @@ -15,7 +15,7 @@ Game Objects All of these are instances of :class:`.GameObject`, which manages things like tree operations and children searching and such. -Other than the :class:`.Engine` and its direct children, you may structure the +Other than the :class:`.GameEngine` and its direct children, you may structure the tree however you want. You can define your own game objects and put them in your scenes (they won't render, but they'll receive events). @@ -24,7 +24,7 @@ Event Dispatch ============== Events are dispatched breadth first: top to bottom, starting from the -:class:`.Engine`, and then all of the :class:`.System` instances, and then the +:class:`.GameEngine`, and then all of the :class:`.System` instances, and then the :class:`.Scene`, and then their children. In the above diagram, events would be dispatched in the following order: From 60f7d03dcc18e73e609dfee475d28427a7e1d9ff Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Mon, 20 May 2024 14:41:58 -0400 Subject: [PATCH 4/4] Add gom.rst to toc --- docs/discussion/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/discussion/index.rst b/docs/discussion/index.rst index 9721634b..b9376635 100644 --- a/docs/discussion/index.rst +++ b/docs/discussion/index.rst @@ -11,5 +11,6 @@ advanced users. values/index assets + gom maintenance-schedules default-branch