From 87bcd39cf1104f7ff24b604e9631fbabcc01f432 Mon Sep 17 00:00:00 2001 From: Benedikt Galbavy Date: Mon, 13 Jan 2025 23:42:01 +0100 Subject: [PATCH] memory management and minor improvements --- slides.tex | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/slides.tex b/slides.tex index 52d799c..6410085 100644 --- a/slides.tex +++ b/slides.tex @@ -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(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