diff --git a/Thesis/Thesis.tex b/Thesis/Thesis.tex index 7c452ad..62bc3be 100644 --- a/Thesis/Thesis.tex +++ b/Thesis/Thesis.tex @@ -6,6 +6,8 @@ % Rozdzialy poziomu I od nowej strony -> domyslnie przez latexa % Wyliczenia -> tylko kropka lub myslnik -> tylko kropka domylsnie przez latexa \usepackage{dirtree} +\usepackage{refcount} +\usepackage{longtable} \usepackage{ulem} \usepackage{fontspec} \usepackage{anyfontsize} @@ -305,6 +307,7 @@ Among us, computer science students, video games were—and still are—one of t \begin{figure}[htp] \includegraphics[scale=0.5]{allgates} \caption{Minecraft redstone offers introduciton to logical gates \cite{redstoneGates}} +\label{fig:redstoneGatesFig} \end{figure} \end{centering} @@ -375,7 +378,7 @@ In 2001 game titled "Bejeweled" came out. Simplifying and refining the mechanics \centering \includegraphics[scale=0.50]{images/bejeweld.jpg} \caption{Bejeweled gameplay \cite{bejeweledGameplay} } -\label{} +\label{fig:bejeweledGameplay} \end{figure} The success of "Bejeweled" lead to several innovation. Developers experimented with various twists on the core mechanics. Games introduced power-ups, barriers, objectives, and narrative elements. "Candy Crush Saga", released in 2012, integrated a level-based progression system, increasing the genre's complexity and depth. @@ -402,7 +405,7 @@ There are three main operating systems, Windows, Mac, and GNU/Linux which togeth \centering \includegraphics[scale=0.50]{chart.png} \caption{Desktop OS market share worldwide \cite{marketShareChart}} -\label{} +\label{fig:marketShare} \end{figure} \subsection{Challenges in Multiplatform Development} @@ -497,7 +500,7 @@ Game engines serve as the backbone for game development, providing a selection o \centering \includegraphics[scale=0.50]{images/gameEngineComponents.drawio.pdf} \caption{Components used in our game engine} -\label{} +\label{fig:gameEngineComponent} \end{figure} @@ -569,7 +572,7 @@ One of OpenGL's strengths lies in its extensible design, allowing to include adv \centering \includegraphics[scale=0.70]{images/openglWikipedia.png} \caption{Connection between Linux and OpenGL-based games \cite{openGLWikipedia}} -\label{} +\label{fig:oGLWikipedia} \end{figure} Gamers are spread across Windows, Mac, GNU/Linux, and other platforms, OpenGL's platform-independent allows for creating games for all platforms. @@ -625,7 +628,7 @@ There are platform-specific nuances in how graphics are presented. \centering \includegraphics[scale=0.5]{images/windowsLinuxSlash.jpg} \caption{Separating folders with backslash and forward slash is one of many differneces between Windows and Linux systems \cite{windowsLinuxSlash} } -\label{} +\label{fig:foldersWindowsLinux} \end{figure} File systems varies between Windows, Mac, and GNU/Linux, influencing how game data is stored, retrieved, and updated. @@ -693,7 +696,7 @@ GLAD is a robust and flexible loader-generator designed for OpenGL. It ensures t \centering \includegraphics[scale=0.50]{images/gladSite.png} \caption{Glad website allowing for different configurations of OpenGL \cite{gladSite}} -\label{} +\label{fig:gladSiteImage} \end{figure} \subsection{The Need for Loading OpenGL Extensions} @@ -739,7 +742,7 @@ FreeType is an open-source software font engine, It offers ability to render tex \centering \includegraphics[scale=0.50]{images/freetypeInspect.png} \caption{ftinspect showcasing capabilities of FreeType library \cite{freeTypeSite}} -\label{} +\label{fig:ftSite} \end{figure} \subsection{Understanding ft2build} @@ -771,7 +774,7 @@ In the heart of every video game lies the game loop. This cycle dictates the gam \centering \includegraphics[scale=0.50]{images/gameLoop} \caption{Game loop flowchart representation} -\label{} +\label{fig:gameLoopFlowchart} \end{figure} \subsection{The Anatomy of a Game Loop} @@ -845,7 +848,7 @@ Game development consists of art and logic, where visual assets behave based on \centering \includegraphics[scale=1.00]{images/gemMatchThree.png} \caption{Exemplary assets for match three tiles \cite{assetsMatchThree} } -\label{} +\label{fig:exemplaryAssets} \end{figure} In the context of game development, assets refer to: @@ -939,7 +942,7 @@ Some of the distinctive features of OS architecture are: \centering \includegraphics[scale=0.75]{images/fileSystems} \caption{Windows file system consists of drives, which contain folders which contain subfolders and files, in Linux everything is a file} -\label{} +\label{fig:fileSystemsFig} \end{figure} \item APIs \& System Calls: Each OS provides developers with its own set of APIs and system calls, changing how software communicates with the system. @@ -1315,7 +1318,7 @@ Very first operation of our engine is to initliaze GLFW context, window and open \end{tikzpicture} \caption{Main loop} -\label{fig:main_function_logic} +\label{fig:mainLoopLogic} \end{figure} \paragraph{Process inputs} @@ -1430,7 +1433,7 @@ Game::Game(ScreenDimensions screen) \end{tikzpicture} \caption{Initialization logic} -\label{fig:main_function_logic} +\label{fig:initializationLogic} \end{figure} We will describe each step below @@ -1517,7 +1520,7 @@ void Game::loadLevels() { \end{tikzpicture} \caption{Game updates logic} -\label{fig:main_function_logic} +\label{fig:gameUpdatesLogic} \end{figure} Game is ended either when the player exceeds maximum move limit (game lost) or when points limit is reached (game won), otherwise the game continues, notice how first we check for win condition then for loss condition, this makes the gameplay a little bit more satisfying and fair. @@ -1537,7 +1540,7 @@ Game allows to move through the grid to highlight a tile, then after clicking "e \draw [arrow] (pro3) -- (stop); \end{tikzpicture} \caption{User controls} -\label{fig:main_function_logic} +\label{fig:userControls} \end{figure} All of input processing is taken care by game class, and then relied to game level class. @@ -1625,7 +1628,7 @@ As mentioned in main loop, the game runs a render method every frame. \draw [arrow] (pro2) -- (stop); \end{tikzpicture} \caption{Rendering logic} -\label{fig:main_function_logic} +\label{fig:renderingLogic} \end{figure} \paragraph{Rendering text} @@ -2045,7 +2048,7 @@ We achieve that by iterating through each character of a string and putting it n \centering \includegraphics[scale=1.00]{images/glyph_offset.png} \caption{Glyph metrics from learnopengl} -\label{} +\label{fig:glyphMetrics} \end{figure} Calculating x and y positions of each character \\ @@ -2197,14 +2200,14 @@ We are going to use site \href{https://opengameart.org/}{https://opengameart.org \centering \includegraphics[scale=1.00]{images/openGameArt.png} \caption{Searching for 2D art on OpenGameArt} -\label{} +\label{fig:2dArtFig} \end{figure} \begin{figure}[H] \centering \includegraphics[scale=1.00]{images/OGASearch.png} \caption{Searching for CC0 licensed assets} -\label{} +\label{fig:searchingCC0} \end{figure} \paragraph{Filtering non tiles assets} @@ -2220,7 +2223,7 @@ First we filter asset pack that uses dynamic falling mechanic which is not prese \centering \includegraphics[scale=0.4]{images/cans.png} \caption{Cans have different sprite depending on if they are falling or not, we do not have such mechanic in our engine \cite{cansFiltered}} -\label{} +\label{fig:cansFiltered} \end{figure} \paragraph{Too much details} @@ -2251,7 +2254,7 @@ Finally we settled on these tiles, they look simple, work well with our shaders \centering \includegraphics[scale=1.00]{images/gemMatchThree.png} \caption{Chosen assets \cite{assetsMatchThree}} -\label{} +\label{fig:matchThreeAssets} \end{figure} \subsection{Loading assets} @@ -2437,14 +2440,14 @@ User can choose both level and difficulty on the menu screen using WSAD keys \centering \includegraphics[scale=1.00]{images/scoreMoves.png} \caption{Score and moves left text} -\label{} +\label{fig:scoreMovesLeft} \end{figure} \begin{figure}[H] \centering \includegraphics[scale=1.00]{images/redMoves.png} \caption{Score and moves left text, when there are less than 10 moves left} -\label{} +\label{fig:scoreMovesLeft10} \end{figure} \paragraph{Losing and winning} @@ -2453,14 +2456,14 @@ Whenever player loses (reaches max number of turns) or wins (reaches target poin \centering \includegraphics[scale=0.50]{images/losing.png} \caption{Game message when lost} -\label{} +\label{fig:losingScreen} \end{figure} \begin{figure}[htp] \centering \includegraphics[scale=0.50]{images/win.png} \caption{Game message when won} -\label{} +\label{fig:winingScreen} \end{figure} \subsection{Advantages of a Custom-built Engine} @@ -2552,6 +2555,99 @@ Lastly, probably the biggest challenge was managing time for this thesis. Finish \bibliography{references} +\chapter{List of Illustrations} +\begin{longtable}{|p{10cm}|c|} + \hline + Image Number Title & Page \\ + \hline + \endhead + Fig. \ref{fig:redstoneGatesFig} Minecraft redstone offers introduciton to logical gates \cite{redstoneGates} & \pageref{fig:redstoneGatesFig} \\ + \hline + Fig. \ref{fig:bejeweledGameplay} Bejeweled gameplay \cite{bejeweledGameplay} & \pageref{fig:bejeweledGameplay} \\ + \hline + Fig. \ref{fig:marketShare} Desktop OS market share worldwide \cite{marketShareChart} & \pageref{fig:marketShare} \\ + \hline + Fig. \ref{fig:gameEngineComponent} Components used in our game engine & \pageref{fig:gameEngineComponent} \\ + \hline + Fig. \ref{fig:oGLWikipedia} Connection between Linux and OpenGL-based games \cite{openGLWikipedia} & \pageref{fig:oGLWikipedia} \\ + \hline + Fig. \ref{fig:foldersWindowsLinux} Separating folders with backslash and forward slash is one of many differneces between Windows and Linux systems \cite{windowsLinuxSlash} & \pageref{fig:foldersWindowsLinux} \\ + \hline + Fig. \ref{fig:gladSiteImage} Glad website allowing for different configurations of OpenGL \cite{gladSite} & \pageref{fig:gladSiteImage} \\ + \hline + Fig. \ref{fig:ftSite} ftinspect showcasing capabilities of FreeType library \cite{freeTypeSite} & \pageref{fig:ftSite} \\ + \hline + Fig. \ref{fig:fileSystemsFig} Windows file system consists of drives, which contain folders which contain subfolders and files, in Linux everything is a file & \pageref{fig:fileSystemsFig} \\ + \hline + Fig. \ref{fig:gameLoopFlowchart} Game loop flowchart representation & \pageref{fig:gameLoopFlowchart} \\ + \hline + Fig. \ref{fig:exemplaryAssets} Exemplary assets for match three tiles \cite{assetsMatchThree} & \pageref{fig:exemplaryAssets} \\ + \hline + Fig. \ref{fig:main_function_logic} Main function logic & \pageref{fig:main_function_logic} \\ + \hline + Fig. \ref{fig:mainLoopLogic} Main loop & \pageref{fig:mainLoopLogic} \\ + \hline + Fig. \ref{fig:initializationLogic} Initialization logic & \pageref{fig:initializationLogic} \\ + \hline + Fig. \ref{fig:gameUpdatesLogic} Game updates logic & \pageref{fig:gameUpdatesLogic} \\ + \hline + Fig. \ref{fig:userControls} User controls & \pageref{fig:userControls} \\ + \hline + Fig. \ref{fig:highlighted_tile} View of highlighted tile & \pageref{fig:highlighted_tile} \\ + \hline + Fig. \ref{fig:selected_tile} View of selected tile & \pageref{fig:selected_tile} \\ + \hline + Fig. \ref{fig:tile_selection} Tile selection views & \pageref{fig:tile_selection} \\ + \hline + Fig. \ref{fig:swap_left} Left tile is set to be swapped when enter key will be hit & \pageref{fig:swap_left} \\ + \hline + Fig. \ref{fig:swap_right} Right tile is set to be swapped when enter key will be hit & \pageref{fig:swap_right} \\ + \hline + Fig. \ref{fig:swap_up} Upper tile is set to be swapped when enter key will be hit & \pageref{fig:swap_up} \\ + \hline + Fig. \ref{fig:swap_down} Down tile is set to be swapped when enter key will be hit & \pageref{fig:swap_down} \\ + \hline + Fig. \ref{fig:tile_swaps} Tile swap controls & \pageref{fig:tile_swaps} \\ + \hline + Fig. \ref{fig:renderingLogic} Rendering logic & \pageref{fig:renderingLogic} \\ + \hline + Fig. \ref{fig:findingMatches} Finding matches logic & \pageref{fig:findingMatches} \\ + \hline + Fig. \ref{fig:loadingFont} Loading font logic & \pageref{fig:loadingFont} \\ + \hline + Fig. \ref{fig:loadingCharacter} Loading single character logic & \pageref{fig:loadingCharacter} \\ + \hline + Fig. \ref{fig:glyphMetrics} Glyph metrics from learnopengl & \pageref{fig:glyphMetrics} \\ + \hline + Fig. \ref{fig:processShader} Processing shader & \pageref{fig:processShader} \\ + \hline + Fig. \ref{fig:2dArtFig} Searching for 2D art on OpenGameArt & \pageref{fig:2dArtFig} \\ + \hline + Fig. \ref{fig:searchingCC0} Searching for CC0 licensed assets & \pageref{fig:searchingCC0} \\ + \hline + Fig. \ref{fig:cansFiltered} Cans have different sprite depending on if they are falling or not, we do not have such mechanic in our engine \cite{cansFiltered} & \pageref{fig:cansFiltered} \\ + \hline + Fig. \ref{fig:tooMuchDetailsOne} First assets with too much details inside the detail \cite{tooMuchOne} & \pageref{fig:tooMuchDetailsOne} \\ + \hline + Fig. \ref{fig:tooMuchDetailsTwo} Second assets with too much details inside the detail \cite{tooMuchTwo} & \pageref{fig:tooMuchDetailsTwo} \\ + \hline + Fig. \ref{fig:matchThreeAssets} Chosen assets \cite{assetsMatchThree} & \pageref{fig:matchThreeAssets} \\ + \hline + Fig. \ref{fig:easy} UI when choosing easy level & \pageref{fig:easy} \\ + \hline + Fig. \ref{fig:normal} UI when choosing normal level & \pageref{fig:normal} \\ + \hline + Fig. \ref{fig:hard} UI when choosing hard level & \pageref{fig:hard} \\ + \hline + Fig. \ref{fig:scoreMovesLeft} Score and moves left text & \pageref{fig:scoreMovesLeft} \\ + \hline + Fig. \ref{fig:scoreMovesLeft10} Score and moves left text, when there are less than 10 moves left & \pageref{fig:scoreMovesLeft10} \\ + \hline + Fig. \ref{fig:losingScreen} Game message when lost & \pageref{fig:losingScreen} \\ + \hline + Fig. \ref{fig:winingScreen} Game message when won & \pageref{fig:winingScreen} \\ + \hline +\end{longtable} \end{document}