memory management and minor improvements

This commit is contained in:
Benedikt Galbavy 2025-01-13 23:42:01 +01:00
parent 3be7a1c646
commit 87bcd39cf1

View File

@ -13,6 +13,8 @@
%\usepackage{xcolor}
%\definecolor{codecolor}{HTML}{FFC300}
\usepackage{csquotes}
\title{VEGO-Engine}
\subtitle{A student project}
\author{Benedikt, Nicole}
@ -86,6 +88,8 @@ Hate
\item git-modules - do not bloat contributions
}
\subsection{ECS}
% ECS slides, split into 3 sections
\begin{frame}[allowframebreaks, fragile]{We made an ECS}
Why an ECS - Entity Component System?
\begin{itemize}
@ -98,7 +102,7 @@ Why an ECS - Entity Component System?
\note[itemize]{
\item Reusable code mainly on engine side, but also applies to game dev components
\item plug and play mostly an advantage for game dev - i.e. "I want physics, here are physics"
\item \say{video series} - tease issue of abruptly ending
\item \enquote{video series} - tease issue of abruptly ending
\item Components usually only have data, and are querried by the system (hence ecS)
\item System part used for rendering
}
@ -149,6 +153,8 @@ projectile.addComponent<ColliderComponent>(0.6f);
\end{minted}
\end{frame}
\note{mention: this ease of use is our goal}
\subsection{Memory Management}
\begin{frame}[allowframebreaks, fragile]{Memory Management}
\begin{minted}[linenos,autogobble]{c++}
class Manager
@ -167,12 +173,20 @@ private:
\end{minted}
\framebreak
Does that solve memory management? Not quite:
\begin{itemize}
\item Missing separation of concern - manager also propagates update call
\item What if I want to "save" existing entities
\item Everything is an entity
\item Does not allow "saving" existing entities
\end{itemize}
Architectural issues like this are hard to solve this late in development
However it does solve memory management\footnote{For \texttt{Entity} classes only, there are some leaks due to bad usage of the \texttt{SDL\_mixer} library}
\end{frame}
\note[itemize]{
\item \enquote{Perfect example of why our ECS is not ideal}
\item scene management - would replace manager - however manager is too widely used - break API consistency
\item classic example of good on surface level only for a beginner; transition to more such examples
}
\end{frame}
%code example