aboutsummaryrefslogtreecommitdiff
path: root/research.tex
diff options
context:
space:
mode:
Diffstat (limited to 'research.tex')
-rw-r--r--research.tex119
1 files changed, 119 insertions, 0 deletions
diff --git a/research.tex b/research.tex
index 1b8a5ab..29cee68 100644
--- a/research.tex
+++ b/research.tex
@@ -482,7 +482,126 @@ the most suitable (and only) audio library for use in this project.
\section{Scripting}
+%links
+%ragdoll info: https://learn.unity.com/tutorial/creating-ragdolls-2019#649c42abedbc2a04c2145ce7
+%softbody info: https://www.greenfoot.org/scenarios/29502
+.
+%2d box concepts: https://box2d.org/
+%liquidfun (fork of box2d): https://google.github.io/liquidfun/
+%Chipmunk2D: https://chipmunk-physics.net/
+% particel systemhttps://learn.unity.com/tutorial/introduction-to-particle-systems#
+%rigid body:https://docs.unity3d.com/ScriptReference/Rigidbody.html
+
\subsection{Introduction}
+This part of the research explains physcis concepts and the use of physics in a game engine. Furthermore, it examines the ease of using a physics engine compared to implementing physics from scratch. Ultimately, a recommendation will be provided on whether using a physics engine is more feasible than a custom implementation.
+
+
+\subsection{Physics concepts}
+
+
+%Physics core concepts: https://bluebirdinternational.com/game-physics/#:~:text=Game%20physics%20is%20implemented%20using,solid%20and%20deformable%20objects%2C%20respectively
+
+%ragdoll https://bluebirdinternational.com/ragdoll-physics/
+
+\subsubsection{Kinematics}
+Kinematics in game physics involves calculating the position, velocity, and acceleration of objects to simulate realistic motion. It affects everything from character movement to projectiles and vehicles. Collision detection is key, as it determines when objects collide and how they respond, including any damage or effects. Kinematics also helps create lifelike animations, like jumping or running, enhancing the game's realism and immersion.
+\begin{itemize}
+ \item mass
+ \item speed
+ \item direction
+ \item collision detection
+\end{itemize}
+
+
+\subsubsection{Dynamics}
+Dynamics simulate object interactions and forces, such as gravity and friction, to enhance realism. It includes rigid body, soft body, and fluid dynamics. For example, it affects car movements in racing games and projectiles in shooters. Balancing dynamics is crucial to maintain performance. Ragdoll physics, a related concept, models a character’s body as interconnected rigid bodies for realistic movement.
+\begin{itemize}
+ \item rigid body dynamics
+ \item soft body dynamics
+ \item fluid dynamics
+ \item ragdoll physics
+\end{itemize}
+
+
+\subsubsection{Collision}
+Collision detection is the process of determining when two or more objects in the game world come into contact with each other. There are several techniques used for collision detection.
+\begin{itemize}
+ \item bounding boxes
+ \item bounding spheres
+ \item mesh-based collision
+\end{itemize}
+These techniques involve creating simple shapes around the objects and checking if they intersect with each other.
+
+\subsubsection{Rigidbody}
+Rigidbodys deels with the behavior of of non deformable solid objects. it has some physical properties.
+\begin{itemize}
+ \item mass
+ \item velocity
+ \item angular velocity
+ \item orientation
+\end{itemize}
+To calculate all forces applied to the rigid body the most used algoritm is Newton-Euler equations. The alogritm is about mass an conservation of energy.
+
+\subsubsection{Softbody}
+Soft body dynamics simulates deformable objects like cloth, fluids, and flesh, adding complexity beyond rigid body dynamics. Key techniques include:
+\begin{itemize}
+ \item Finite Element Method: Divides the object into small elements that interact based on physical laws.
+ \item Mass-Spring Systems: Uses masses and springs to model deformation and stretching.
+\end{itemize}
+These methods enhance game realism by creating lifelike clothing, natural water effects, and realistic collision deformations. However, they are resource intensive an require precise calculations to avoid unrealistic results.
+
+\subsubsection{Particle Systems}
+Particle systems simulate numerous small objects to create larger effects like dust, smoke, fire, or explosions. These effects can add an extra layer of realism to a game.
+
+\subsubsection{Fluid Dynamics}
+Fluid dynamics shows how fluids move and behave. In game physics, it simulates liquids like water or lava, adding complexity and realism to games with fluid interactions.
+
+\subsubsection{Aerodynamics}
+Aerodynamics shows the movement of air and its interaction with solid objects. In video games, it simulates how objects like airplanes or birds move through the air, adding a realistic touch to games involving flight or gliding.
+
+\subsection{Implementation of Physics}
+
+To know what the best Physics solution is for a project a list has been created with physics concepts.This list shows how much effort it is to implement a feature and if an engine has the feature available. For this list three physics engines have been found that can provide 2d physics.
+
+\subsubsection{Physics comparison}
+
+\begin{itemize}
+ \item Rigid Body Dynamics
+ \item Soft Body Dynamics
+ \item Particle Systems
+ \item Fluid Dynamics
+ \item Collision Detection
+ \item Aerodynamics
+ \item Ragdoll Physics
+ \item Constraints %box2d
+ \item Joint Limits %box2d
+ \item Joint Motors %box2d
+ \item Joint Springs %box2d
+ \item World Simulation %box2d
+ \item Solver %box2d
+\end{itemize}
+
+\subsubsection{Physics Engines}
+
+\paragraph{Box2D}
+\begin{description}
+ \item[Description:] One of the most popular and widely used open-source 2D physics engines, Box2D is known for its simplicity, robustness, and efficiency.
+ \item[License:] MIT License
+\end{description}
+
+\paragraph{LiquidFun}
+\begin{description}
+ \item[Description:] A fork of Box2D, LiquidFun adds particle-based fluid simulation to Box2D's rigid body dynamics. It’s ideal for games that require both solid and fluid dynamics.
+ \item[License:] Apache License 2.0
+\end{description}
+
+\paragraph{Chipmunk2D}
+\begin{description}
+ \item[Description:] A lightweight and fast 2D physics engine that emphasizes ease of use and flexibility. Chipmunk2D is designed to be simple enough to understand and integrate but powerful enough for complex simulations.
+ \item[License:] MIT License
+\end{description}
+
+
\subsection{Findings}