aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaro <jarorutjes07@gmail.com>2024-10-26 19:34:32 +0200
committerJaro <jarorutjes07@gmail.com>2024-10-26 19:34:32 +0200
commite147d964f22257035da954e398f6b898b942c3ac (patch)
tree0ffc331f4253eae95240c97ac6946929d71d3357
parent314baff9cdc711eee2f307f22e1def778360d9e8 (diff)
Notulen notes en collision diagram en research toegevoegd
-rw-r--r--figs.drawio105
-rw-r--r--notulen/wk8-1.txt57
-rw-r--r--research.tex67
3 files changed, 227 insertions, 2 deletions
diff --git a/figs.drawio b/figs.drawio
index 5082752..5e6fc7a 100644
--- a/figs.drawio
+++ b/figs.drawio
@@ -736,7 +736,7 @@
</mxGraphModel>
</diagram>
<diagram id="ehgrrEZq6aIl9GSG0JpL" name="Main diagram 2">
- <mxGraphModel dx="1400" dy="828" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="3300" pageHeight="2339" math="0" shadow="0">
+ <mxGraphModel dx="2100" dy="1242" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="3300" pageHeight="2339" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
@@ -1486,7 +1486,7 @@
<mxCell id="5-8bWhzpOWirDYeo3-Cj-177" value="&lt;font color=&quot;#0000ff&quot;&gt;Systems&lt;/font&gt;" style="shape=folder;fontStyle=1;spacingTop=10;tabWidth=40;tabHeight=14;tabPosition=left;html=1;whiteSpace=wrap;strokeColor=#0000FF;" parent="1" vertex="1">
<mxGeometry x="520" y="645" width="70" height="40" as="geometry" />
</mxCell>
- <mxCell id="3iqK6Q-Owgr1maHwc76Q-3" value="" style="endArrow=block;html=1;rounded=0;movable=1;resizable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;endFill=0;strokeWidth=1;endSize=14;edgeStyle=orthogonalEdgeStyle;" edge="1" parent="1" source="5-8bWhzpOWirDYeo3-Cj-131" target="5-8bWhzpOWirDYeo3-Cj-106">
+ <mxCell id="3iqK6Q-Owgr1maHwc76Q-3" value="" style="endArrow=block;html=1;rounded=0;movable=1;resizable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;endFill=0;strokeWidth=1;endSize=14;edgeStyle=orthogonalEdgeStyle;" parent="1" source="5-8bWhzpOWirDYeo3-Cj-131" target="5-8bWhzpOWirDYeo3-Cj-106" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="1200" y="240" as="sourcePoint" />
<mxPoint x="974" y="200" as="targetPoint" />
@@ -1495,6 +1495,107 @@
</Array>
</mxGeometry>
</mxCell>
+ <mxCell id="V-ZVI1K5bxIVrfWjpJuH-1" value="ParticleEmitter" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;rounded=0;shadow=0;strokeWidth=1;movable=1;resizable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;direction=east;strokeColor=#2020ff;" vertex="1" parent="1">
+ <mxGeometry x="1650" y="265" width="160" height="102" as="geometry">
+ <mxRectangle x="330" y="540" width="160" height="26" as="alternateBounds" />
+ </mxGeometry>
+ </mxCell>
+ <mxCell id="V-ZVI1K5bxIVrfWjpJuH-13" style="text;align=left;verticalAlign=bottom;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=1;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;strokeWidth=1;horizontal=1;movable=1;resizable=1;deletable=1;editable=1;locked=0;connectable=1;" vertex="1" parent="V-ZVI1K5bxIVrfWjpJuH-1">
+ <mxGeometry y="26" width="160" height="17" as="geometry" />
+ </mxCell>
+ <mxCell id="V-ZVI1K5bxIVrfWjpJuH-5" value="" style="line;html=1;strokeWidth=1;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=1;labelPosition=right;points=[];portConstraint=eastwest;fontSize=12;perimeterSpacing=0;movable=1;resizable=1;deletable=1;editable=1;locked=0;connectable=1;verticalLabelPosition=middle;" vertex="1" parent="V-ZVI1K5bxIVrfWjpJuH-1">
+ <mxGeometry y="43" width="160" height="8" as="geometry" />
+ </mxCell>
+ <mxCell id="V-ZVI1K5bxIVrfWjpJuH-6" style="text;align=left;verticalAlign=bottom;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=1;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;strokeWidth=1;horizontal=1;movable=1;resizable=1;deletable=1;editable=1;locked=0;connectable=1;" vertex="1" parent="V-ZVI1K5bxIVrfWjpJuH-1">
+ <mxGeometry y="51" width="160" height="17" as="geometry" />
+ </mxCell>
+ <mxCell id="V-ZVI1K5bxIVrfWjpJuH-7" value="Particles" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;rounded=0;shadow=0;strokeWidth=1;movable=1;resizable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;direction=east;strokeColor=#2020ff;" vertex="1" parent="1">
+ <mxGeometry x="1870" y="268.5" width="160" height="95" as="geometry">
+ <mxRectangle x="330" y="540" width="160" height="26" as="alternateBounds" />
+ </mxGeometry>
+ </mxCell>
+ <mxCell id="V-ZVI1K5bxIVrfWjpJuH-14" style="text;align=left;verticalAlign=bottom;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=1;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;strokeWidth=1;horizontal=1;movable=1;resizable=1;deletable=1;editable=1;locked=0;connectable=1;" vertex="1" parent="V-ZVI1K5bxIVrfWjpJuH-7">
+ <mxGeometry y="26" width="160" height="17" as="geometry" />
+ </mxCell>
+ <mxCell id="V-ZVI1K5bxIVrfWjpJuH-11" value="" style="line;html=1;strokeWidth=1;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=1;labelPosition=right;points=[];portConstraint=eastwest;fontSize=12;perimeterSpacing=0;movable=1;resizable=1;deletable=1;editable=1;locked=0;connectable=1;verticalLabelPosition=middle;" vertex="1" parent="V-ZVI1K5bxIVrfWjpJuH-7">
+ <mxGeometry y="43" width="160" height="8" as="geometry" />
+ </mxCell>
+ <mxCell id="V-ZVI1K5bxIVrfWjpJuH-12" style="text;align=left;verticalAlign=bottom;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=1;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;strokeWidth=1;horizontal=1;movable=1;resizable=1;deletable=1;editable=1;locked=0;connectable=1;" vertex="1" parent="V-ZVI1K5bxIVrfWjpJuH-7">
+ <mxGeometry y="51" width="160" height="17" as="geometry" />
+ </mxCell>
+ <mxCell id="V-ZVI1K5bxIVrfWjpJuH-15" value="Force" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;rounded=0;shadow=0;strokeWidth=1;movable=1;resizable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;direction=east;strokeColor=#2020ff;" vertex="1" parent="1">
+ <mxGeometry x="2060" y="265" width="160" height="95" as="geometry">
+ <mxRectangle x="330" y="540" width="160" height="26" as="alternateBounds" />
+ </mxGeometry>
+ </mxCell>
+ <mxCell id="V-ZVI1K5bxIVrfWjpJuH-16" style="text;align=left;verticalAlign=bottom;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=1;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;strokeWidth=1;horizontal=1;movable=1;resizable=1;deletable=1;editable=1;locked=0;connectable=1;" vertex="1" parent="V-ZVI1K5bxIVrfWjpJuH-15">
+ <mxGeometry y="26" width="160" height="17" as="geometry" />
+ </mxCell>
+ <mxCell id="V-ZVI1K5bxIVrfWjpJuH-17" value="" style="line;html=1;strokeWidth=1;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=1;labelPosition=right;points=[];portConstraint=eastwest;fontSize=12;perimeterSpacing=0;movable=1;resizable=1;deletable=1;editable=1;locked=0;connectable=1;verticalLabelPosition=middle;" vertex="1" parent="V-ZVI1K5bxIVrfWjpJuH-15">
+ <mxGeometry y="43" width="160" height="8" as="geometry" />
+ </mxCell>
+ <mxCell id="V-ZVI1K5bxIVrfWjpJuH-18" style="text;align=left;verticalAlign=bottom;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=1;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rounded=0;shadow=0;html=0;strokeWidth=1;horizontal=1;movable=1;resizable=1;deletable=1;editable=1;locked=0;connectable=1;" vertex="1" parent="V-ZVI1K5bxIVrfWjpJuH-15">
+ <mxGeometry y="51" width="160" height="17" as="geometry" />
+ </mxCell>
+ <mxCell id="V-ZVI1K5bxIVrfWjpJuH-19" value="" style="endArrow=block;html=1;rounded=0;movable=1;resizable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;endFill=0;strokeWidth=1;endSize=14;edgeStyle=orthogonalEdgeStyle;strokeColor=#2020ff;" edge="1" parent="1" source="V-ZVI1K5bxIVrfWjpJuH-1" target="5-8bWhzpOWirDYeo3-Cj-106">
+ <mxGeometry width="50" height="50" relative="1" as="geometry">
+ <mxPoint x="1786" y="293" as="sourcePoint" />
+ <mxPoint x="1730" y="130" as="targetPoint" />
+ <Array as="points">
+ <mxPoint x="1720" y="80" />
+ <mxPoint x="884" y="80" />
+ </Array>
+ </mxGeometry>
+ </mxCell>
+ <mxCell id="V-ZVI1K5bxIVrfWjpJuH-20" value="" style="endArrow=block;html=1;rounded=0;movable=1;resizable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;endFill=0;strokeWidth=1;endSize=14;edgeStyle=orthogonalEdgeStyle;strokeColor=#2020ff;" edge="1" parent="1" source="V-ZVI1K5bxIVrfWjpJuH-15" target="5-8bWhzpOWirDYeo3-Cj-106">
+ <mxGeometry width="50" height="50" relative="1" as="geometry">
+ <mxPoint x="1730" y="275" as="sourcePoint" />
+ <mxPoint x="894" y="150" as="targetPoint" />
+ <Array as="points">
+ <mxPoint x="2140" y="80" />
+ <mxPoint x="884" y="80" />
+ </Array>
+ </mxGeometry>
+ </mxCell>
+ <mxCell id="V-ZVI1K5bxIVrfWjpJuH-21" value="" style="endArrow=open;html=1;rounded=0;movable=1;resizable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;endFill=0;endSize=8;edgeStyle=orthogonalEdgeStyle;" edge="1" parent="1" source="V-ZVI1K5bxIVrfWjpJuH-1" target="V-ZVI1K5bxIVrfWjpJuH-7">
+ <mxGeometry width="50" height="50" relative="1" as="geometry">
+ <mxPoint x="1870" y="546" as="sourcePoint" />
+ <mxPoint x="1780" y="469" as="targetPoint" />
+ </mxGeometry>
+ </mxCell>
+ <mxCell id="V-ZVI1K5bxIVrfWjpJuH-23" value="0..*" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="V-ZVI1K5bxIVrfWjpJuH-21">
+ <mxGeometry x="0.6214" y="-1" relative="1" as="geometry">
+ <mxPoint x="-19" y="14" as="offset" />
+ </mxGeometry>
+ </mxCell>
+ <mxCell id="V-ZVI1K5bxIVrfWjpJuH-24" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=diamondThin;endFill=1;strokeColor=#7878f0;" edge="1" parent="1" source="V-ZVI1K5bxIVrfWjpJuH-1" target="5-8bWhzpOWirDYeo3-Cj-170">
+ <mxGeometry relative="1" as="geometry">
+ <mxPoint x="1550" y="377" as="sourcePoint" />
+ <mxPoint x="870" y="647" as="targetPoint" />
+ <Array as="points">
+ <mxPoint x="1730" y="660" />
+ </Array>
+ </mxGeometry>
+ </mxCell>
+ <mxCell id="V-ZVI1K5bxIVrfWjpJuH-25" value="0..*" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="V-ZVI1K5bxIVrfWjpJuH-24">
+ <mxGeometry x="-0.9593" y="-3" relative="1" as="geometry">
+ <mxPoint x="-7" y="-6" as="offset" />
+ </mxGeometry>
+ </mxCell>
+ <mxCell id="V-ZVI1K5bxIVrfWjpJuH-26" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=diamondThin;endFill=1;strokeColor=#7878f0;" edge="1" parent="1" source="V-ZVI1K5bxIVrfWjpJuH-15" target="5-8bWhzpOWirDYeo3-Cj-170">
+ <mxGeometry relative="1" as="geometry">
+ <mxPoint x="1740" y="377" as="sourcePoint" />
+ <mxPoint x="870" y="670" as="targetPoint" />
+ <Array as="points">
+ <mxPoint x="2140" y="660" />
+ </Array>
+ </mxGeometry>
+ </mxCell>
+ <mxCell id="V-ZVI1K5bxIVrfWjpJuH-27" value="0..*" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="V-ZVI1K5bxIVrfWjpJuH-26">
+ <mxGeometry x="-0.9593" y="-3" relative="1" as="geometry">
+ <mxPoint x="-7" y="-6" as="offset" />
+ </mxGeometry>
+ </mxCell>
</root>
</mxGraphModel>
</diagram>
diff --git a/notulen/wk8-1.txt b/notulen/wk8-1.txt
new file mode 100644
index 0000000..7702dfd
--- /dev/null
+++ b/notulen/wk8-1.txt
@@ -0,0 +1,57 @@
+ Documents
+ Research Document
+ Continue adding research information
+ Project plan
+ -
+ Document standard
+ Add updates when needed
+ Requirement
+ physics sub-requirements -> Jaro write document
+ eventmanager sub-requirements -> Wouter write document
+ gameloop sub-requirements -> Wouter write document
+ ecs sub-requirements
+ particles sub-requirement -> Jaro write document
+ resourceManager sub-requirement -> Niels write document
+ rendering sub-requirement
+ script requirements added.
+ design document
+ [closed] Discussing top-down
+ API in design document
+ Game design
+ -
+ Git
+ Code standard -> LOEK update
+ Show updates
+ Code standard with examples not in main? -> niels
+ Environments
+ -
+ Research (POC)
+ research eventmanager -> Wouter POC (goede voortgang) knoppen uitlezen
+ [closed] resource manager -> POC check datatype for conversion (na meeting afgerond) alleen implementatie tiled
+ start research ui -> wouter
+ start research ai
+ start research playback -> Max
+ start research scenes -> Max
+ star research camera -> Niels
+ start research savedata -> loek
+ start research renderer -> niels (sprite & color & transform) POC simple (SDL_GPU voor efficiency verbetering)
+ [closed] start research scripting -> loek
+ start research physics Starting POC -> Jaro
+ More research about physics
+ start reasearch collision detection -> Jaro
+ [closed] research ecs -> Loek will add fix for derived class for scripts
+ start research particles Starting research -> Jaro (start lifetime. spawning area)
+ Design
+ Adding design asset class -> niels
+ Adding design resource holder -> niels
+ How does a game designer make a scene?
+ Product
+ -
+ Test
+ -
+ Question Bob
+ mag de API gewoon een interface worden voor wat onderliggend een ECS is.
+ Overig
+ Timers voor systems (profiler van systems)
+
+
diff --git a/research.tex b/research.tex
index 791e9f1..01f25a0 100644
--- a/research.tex
+++ b/research.tex
@@ -670,6 +670,73 @@ The benefit of ECS is that all physics and collsions are handled by one system.
What EC can not provide compared to ECS is a physics world. A physics world would be the physics that apply to all dynamic physics components. If you want to create gravity you can add the force to the world. The physics system would read all the Physics forces in the world and apply them to all dynamic entities. This would create an easier to use interface for the user and improve the efficiency of the physics because the total forces can be calcualted ones and then applied to all dynamic entities.
+\subsubsection{Components physics}
+This is a list that could be needed for additonal phisics components
+
+\begin{itemize}
+ \item Gravity
+ \begin{itemize}
+ \item Rigidbody (for mass, gravity scale, etc.)
+ \item Transform (to modify position based on gravity)
+ \end{itemize}
+
+ \item Directional Force (e.g., wind or gravity in a specific direction)
+ \begin{itemize}
+ \item ForceComponent (for direction and magnitude of the force)
+ \item Rigidbody (for mass and velocity affected by force)
+ \item Transform (to update position based on force)
+ \end{itemize}
+
+ \item Collision (detection + handling)
+ \begin{itemize}
+ \item Rigidbody (for collision detection mode and velocity handling)
+ \item ColliderComponent (defines the shape and behavior of the collider, like bounce)
+ \item Transform (for object position, rotation updates)
+ \end{itemize}
+
+ \item Player Movement
+ \begin{itemize}
+ \item MovementComponent (for handling player input and movement speed)
+ \item Rigidbody (to handle physics-based movement, like velocity changes)
+ \item Transform (to apply movement to the object's position)
+ \end{itemize}
+
+ \item Bounce (elastic collisions)
+ \begin{itemize}
+ \item Rigidbody (for bounce coefficient and velocity adjustments)
+ \item ColliderComponent (to detect collisions and calculate bounce)
+ \item Transform (to adjust position after bouncing)
+ \end{itemize}
+
+ \item Rotation (torque or angular forces)
+ \begin{itemize}
+ \item Rigidbody (for rotational inertia and angular velocity)
+ \item Transform (to apply rotation to the object)
+ \end{itemize}
+
+ \item Directional Force (e.g., explosions, pushing)
+ \begin{itemize}
+ \item ForceComponent (to apply the force in a direction with a magnitude)
+ \item Rigidbody (for velocity changes due to the force)
+ \item Transform (to update position based on the force)
+ \end{itemize}
+
+ \item Particles (e.g., smoke, explosions)
+ \begin{itemize}
+ \item ParticleComponent (to define particle effects like lifetime, velocity)
+ \item Transform (to emit particles from the object’s position)
+ \end{itemize}
+\end{itemize}
+
+
+1. Input Processing
+2. Run Scripts (custom logic, AI, player input, etc.)
+3. Apply Forces (gravity, directional forces, user-applied forces)
+4. Calculate Movement (update positions based on velocity)
+5. Collision Detection and Resolution
+6. Post-Collision Adjustments (e.g., friction, constraints)
+
+
\subsection{Conclusion}
More components need te be created for both EC and ECS with the diagram provided by the customer. With ECS having the benefit of creating a world where all dynamic object can have a force they interact with. A physics system has the benefit that all physics functionalities are located within one system instead in each component. The flow of Physics updates can be change within the physics system instead of in the gameloop itself.