mirror of
https://github.com/kuhyx/engineer-thesis-WUT.git
synced 2026-07-04 15:23:13 +02:00
feat; fixed spelling in abstract, removed file structure and added nfr/fr requiermnts
This commit is contained in:
parent
e48b8032ae
commit
f10a05ba74
@ -207,7 +207,7 @@
|
|||||||
\subsubsection{Streszczenie pracy}
|
\subsubsection{Streszczenie pracy}
|
||||||
{\fontsize{12}{12}
|
{\fontsize{12}{12}
|
||||||
\tytul \\
|
\tytul \\
|
||||||
Rynek systemów operacyjnych na PC jest podzielony na trzech głównych graczy, tworzy to zapotrzebowanie na silniki do gier, które są wszechstronne i działają tak samo, niezależnie od platformy. Niniejsza praca inżynierska przedstawia projekt i implementację nowego silnika do gier opracowanego z myślą o grach typu "dopasuj 3", gatunku który jest zarówno popularny, jak i stosunkowo łatwy do wdrożenia, mimo to nadal nie ma wyspecjalizowanego silnika open-source pod gry "dopasuj 3". Silnik został zbudowany w oparciu o bibliotekę graficzną OpenGL i system zarządzania oknami glfw, zapewniając zaawansowane możliwości graficzne przy jednoczesnym zachowaniu kompatybilności między platformami. Silnikowi przyświecają dwa cele: prostota obsługi dla deweloperów i solidna wydajność. Architektura skupia się na wykorzystaniu dobrych praktyk, nowoczesnego kodu C++ i sprawieniu że czytanie kodu silnika będzie łatwe i zrozumiałem dla develiperów. W rezultacie twórcy gier mogą skupić się na tworzeniu gier typu "dopasuj 3" bez konieczności nauki programowania, umożliwiając artystom bez zaplecza technicznego, którzy chcą stworzyć wyjątkowe doświadczenie. Niniejsza praca opisuje motywacje, tło, dokumentację i przypadki użycia na trzech głównych platformach: Linux, Windows i MacOS. Silnik demonstruje użyteczność, możliwość dostosowania do różnych platform i zapewnia narzędzia niezbędne do tworzenia prostych gier typu "dopasuj 3". Niniejsza praca stara się wypełnić lukę w wyspecjalizowanych silnikach gier wideo open-source.
|
Rynek systemów operacyjnych na PC jest podzielony na trzech głównych graczy, tworzy to zapotrzebowanie na silniki do gier, które są wszechstronne i działają tak samo, niezależnie od platformy. Niniejsza praca inżynierska przedstawia projekt i implementację nowego silnika do gier opracowanego z myślą o grach typu "dopasuj 3", gatunku który jest zarówno popularny, jak i stosunkowo łatwy do wdrożenia, mimo to nadal nie ma wyspecjalizowanego silnika open-source pod gry "dopasuj 3". Silnik został zbudowany w oparciu o bibliotekę graficzną OpenGL i system zarządzania oknami glfw, zapewniając zaawansowane możliwości graficzne przy jednoczesnym zachowaniu kompatybilności między platformami. Silnikowi przyświecają dwa cele: prostota obsługi dla deweloperów i solidna wydajność. Architektura skupia się na wykorzystaniu dobrych praktyk, nowoczesnego kodu C++ i sprawieniu że czytanie kodu silnika będzie łatwe i zrozumiałe dla developerów. W rezultacie twórcy gier mogą skupić się na tworzeniu gier typu "dopasuj 3" bez konieczności nauki programowania, umożliwiając artystom bez zaplecza technicznego, którzy chcą stworzyć wyjątkowe doświadczenie. Niniejsza praca opisuje motywacje, tło, dokumentację i przypadki użycia na trzech głównych platformach: Linux, Windows i MacOS. Silnik demonstruje użyteczność, możliwość dostosowania do różnych platform i zapewnia narzędzia niezbędne do tworzenia prostych gier typu "dopasuj 3". Niniejsza praca stara się wypełnić lukę w wyspecjalizowanych silnikach gier wideo open-source.
|
||||||
\{Multiplatformowość,
|
\{Multiplatformowość,
|
||||||
Gry,
|
Gry,
|
||||||
Silniki do gier,
|
Silniki do gier,
|
||||||
@ -572,7 +572,7 @@ There are platform-specific nuances in how graphics are presented.
|
|||||||
|
|
||||||
\begin{figure}[htp]
|
\begin{figure}[htp]
|
||||||
\centering
|
\centering
|
||||||
\includegraphics[scale=1.00]{images/windowsLinuxSlash.jpg}
|
\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} }
|
\caption{Separating folders with backslash and forward slash is one of many differneces between Windows and Linux systems \cite{windowsLinuxSlash} }
|
||||||
\label{}
|
\label{}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
@ -594,7 +594,7 @@ GLFW, which stands for Graphics Library Framework, was a response to the need fo
|
|||||||
|
|
||||||
\subsection{GLFW's Core Competencies}
|
\subsection{GLFW's Core Competencies}
|
||||||
|
|
||||||
GLFW serves as a bridge between the game's logic and the operating system, handling tasks that are crucial for interactive applications.
|
GLFW serves as a bridge betFween the game's logic and the operating system, handling tasks that are crucial for interactive applications.
|
||||||
|
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item Window Management: GLFW's manages window creation, querying, and manipulation. It allows developers to focus on their game logic rather than handling platform-specific windowing.
|
\item Window Management: GLFW's manages window creation, querying, and manipulation. It allows developers to focus on their game logic rather than handling platform-specific windowing.
|
||||||
@ -712,6 +712,99 @@ While FreeType takes charge of fonts, stb\_image is a solution for image loading
|
|||||||
Specialized tools like FreeType and stb\_image elecate the visual experience of games with text rendering and images inclusion into game engine
|
Specialized tools like FreeType and stb\_image elecate the visual experience of games with text rendering and images inclusion into game engine
|
||||||
|
|
||||||
\chapter{Design and Architecture of the Match Three Engine}
|
\chapter{Design and Architecture of the Match Three Engine}
|
||||||
|
|
||||||
|
\section{Requirements}
|
||||||
|
|
||||||
|
\subsection{Functional Requirements (FR)}
|
||||||
|
\begin{enumerate}
|
||||||
|
\item \textbf{Game Initialization and Setup (FR1)}:
|
||||||
|
\begin{itemize}
|
||||||
|
\item The engine shall initialize a game board with a predetermined square size (e.g., 8x8).
|
||||||
|
\item The game board shall be populated randomly with different colored pieces.
|
||||||
|
\item The initial game board should not have any matches (three or more of the same colored pieces in a row or column).
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\item \textbf{User Interactivity (FR2)}:
|
||||||
|
\begin{itemize}
|
||||||
|
\item Players shall be able to select a piece.
|
||||||
|
\item Players shall be able to swap the selected piece with an adjacent piece (up, down, left, or right) to form a match.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\item \textbf{Matching Logic (FR3)}:
|
||||||
|
\begin{itemize}
|
||||||
|
\item When three or more pieces of the same color align vertically or horizontally, they shall be recognized as a match.
|
||||||
|
\item Matched pieces shall be removed from the board.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\item \textbf{Board Update (FR4)}:
|
||||||
|
\begin{itemize}
|
||||||
|
\item After pieces are matched and removed, new pieces shall drop down to fill the vacant spaces.
|
||||||
|
\item The board shall continuously check for matches after each update.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\item \textbf{Scoring System (FR5)}:
|
||||||
|
\begin{itemize}
|
||||||
|
\item Players shall earn points for each match made.
|
||||||
|
\item Bonus points shall be awarded for matches greater than three pieces.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\item \textbf{Game Over Logic (FR6)}:
|
||||||
|
\begin{itemize}
|
||||||
|
\item The game shall end when no moves are left.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\item \textbf{Pause and Resume (FR7)}:
|
||||||
|
\begin{itemize}
|
||||||
|
\item Players shall be able to pause and resume the game.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\item \textbf{Game Difficulty Levels (FR8)}:
|
||||||
|
\begin{itemize}
|
||||||
|
\item Make the game more difficult or easy by giving player more or less turns to play
|
||||||
|
\end{itemize}
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
\subsection{Non-functional Requirements (NFR)}
|
||||||
|
\begin{enumerate}
|
||||||
|
\item \textbf{Performance (NFR1)}:
|
||||||
|
\begin{itemize}
|
||||||
|
\item The game engine shall ensure smooth animations without any lag.
|
||||||
|
\item Match detection should occur within milliseconds to ensure real-time response.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\item \textbf{Usability (NFR2)}:
|
||||||
|
\begin{itemize}
|
||||||
|
\item The game interface shall be intuitive.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\item \textbf{Portability (NFR3)}:
|
||||||
|
\begin{itemize}
|
||||||
|
\item The game engine should be platform-independent, allowing for easy deployment across different operating systems using C++ and OpenGL.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\item \textbf{Maintainability (NFR4)}:
|
||||||
|
\begin{itemize}
|
||||||
|
\item The code shall be well-structured, modular, and commented, allowing for easy updates and maintenance.
|
||||||
|
\item Utilize design patterns where applicable for cleaner and more understandable code.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\item \textbf{Reliability (NFR5)}:
|
||||||
|
\begin{itemize}
|
||||||
|
\item The engine shall be robust enough to handle unexpected inputs without crashing.
|
||||||
|
\item Memory leaks should be minimized, and efficient memory management practices should be followed.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\item \textbf{Scalability (NFR6)}:
|
||||||
|
\begin{itemize}
|
||||||
|
\item The game engine shall support additional features or levels in the future without requiring a complete overhaul.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\item \textbf{Documentation (NFR7)}:
|
||||||
|
\begin{itemize}
|
||||||
|
\item A comprehensive documentation detailing the architecture, algorithms, and functionalities should be provided. (For example in this thesis)
|
||||||
|
\end{itemize}
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
\section{Game Loop and State Management}
|
\section{Game Loop and State Management}
|
||||||
In the heart of every video game lies the game loop. This cycle dictates the game's pacing, ensuring that events, updates, and rendering processes all appear in a correct order. Game loop functions together with state management, which ensures the game behaves consistently in response to player actions and internal events. This section will focus on both the game loop and state management and how they influence our multiplatform Match Three game engine.
|
In the heart of every video game lies the game loop. This cycle dictates the game's pacing, ensuring that events, updates, and rendering processes all appear in a correct order. Game loop functions together with state management, which ensures the game behaves consistently in response to player actions and internal events. This section will focus on both the game loop and state management and how they influence our multiplatform Match Three game engine.
|
||||||
|
|
||||||
@ -1107,51 +1200,6 @@ The engine's architecture is segmented into modules:
|
|||||||
\item Texture Renderer: (texture.cpp) Renders textures
|
\item Texture Renderer: (texture.cpp) Renders textures
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
||||||
\subsection{File structure}
|
|
||||||
|
|
||||||
\dirtree{%
|
|
||||||
.1 engine\DTcomment{Main project folder}.
|
|
||||||
.2 build\DTcomment{Builded binary files of engine stored here}.
|
|
||||||
.2 includes\DTcomment{Used libraries}.
|
|
||||||
.3 freetype\DTcomment{Used to render text}.
|
|
||||||
.3 glad\DTcomment{Makes loading openGL easier}.
|
|
||||||
.3 ft2build.h\DTcomment{For building free type}.
|
|
||||||
.3 stb\_image.h\DTcomment{For loading images}.
|
|
||||||
.2 src\DTcomment{All of code is stored here}.
|
|
||||||
.3 constants.hpp.
|
|
||||||
.3 filesystem.h.
|
|
||||||
.3 game.cpp\DTcomment{Main game loop}.
|
|
||||||
.3 game.h.
|
|
||||||
.3 game\_level.cpp\DTcomment{Converts text files to game level}.
|
|
||||||
.3 game\_level.h.
|
|
||||||
.3 game\_object.cpp\DTcomment{Used for tiles}.
|
|
||||||
.3 game\_object.h.
|
|
||||||
.3 glad.c.
|
|
||||||
.3 resource\_manager.cpp\DTcomment{For loading assets}.
|
|
||||||
.3 resource\_manager.h.
|
|
||||||
.3 shader.cpp.
|
|
||||||
.3 shader.h.
|
|
||||||
.3 sprite.fs.
|
|
||||||
.3 sprite.vs.
|
|
||||||
.3 sprite\_renderer.cpp\DTcomment{Transforms assets into sprites}.
|
|
||||||
.3 sprite\_renderer.h.
|
|
||||||
.3 stb\_image.cpp.
|
|
||||||
.3 text\_2d.fs.
|
|
||||||
.3 text\_2d.vs.
|
|
||||||
.3 text\_renderer.cpp.
|
|
||||||
.3 text\_renderer.h.
|
|
||||||
.3 text\_rendering.cpp.
|
|
||||||
.3 texture.cpp\DTcomment{Transforms sprites into textures}.
|
|
||||||
.3 texture.h.
|
|
||||||
.2 glad.c.
|
|
||||||
.2 stb\_image.cpp.
|
|
||||||
.2 configuration\DTcomment{Holds reference to root directory of project}.
|
|
||||||
.2 resources\DTcomment{Holds assets}.
|
|
||||||
.2 bin\DTcomment{Holds binary engine files}.
|
|
||||||
.2 cmake\DTcomment{Holds build artifacts}.
|
|
||||||
.2 CmakLists.txt\DTcomment{Holds instructions for how to build the engine}.
|
|
||||||
}
|
|
||||||
|
|
||||||
\subsection{Main function}
|
\subsection{Main function}
|
||||||
\begin{figure}[H]
|
\begin{figure}[H]
|
||||||
\centering
|
\centering
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user