# University Project: Game Development in C ## Project Overview Our project focused on developing a complete application in **C**, starting from basic functionality in the terminal and progressing to a graphical interface and web deployment. Below is a breakdown of the steps and technologies involved: --- ## 1. Core Functionality in the Terminal We began by implementing the core logic of the game in a command-line environment. This step involved: - Writing basic functions to handle the game's mechanics and logic. - Testing the functionality directly in the terminal to ensure correctness. - Designing and coding modular functions to facilitate future scalability and debugging. --- ## 2. Random Game Generation To make the game more engaging, we added functionality to create **random game configurations**: - The game generates randomized puzzles or levels that meet specific constraints. - This functionality required designing algorithms to ensure valid game states were generated. --- ## 3. Game Solver We implemented a **solver** to verify the solvability of game configurations: - The solver uses algorithmic techniques to compute valid solutions for generated puzzles. - It was designed as an independent module, allowing us to test and debug both the game logic and solver efficiently. --- ## 4. Unit Testing To ensure reliability and correctness, we implemented **unit tests** for the core functions: - Using a systematic approach to test edge cases and typical scenarios. - Debugging and refining the code based on test outcomes. --- ## 5. Build Management We managed the compilation process using: - **Makefiles**: For automating the build process, compiling the project, and linking libraries. - **CMakeLists**: To provide a more advanced and flexible build configuration. --- ## 6. Version Control with GitLab To collaborate effectively as a team of three, we utilized **GitLab**: - We maintained a shared repository to host the project. - Tasks were divided using branches for individual features, ensuring a smooth merge process. - Continuous updates and peer reviews helped maintain code quality and reduce conflicts. --- ## 7. Graphical Interface with SDL After finalizing the game's core logic, we transitioned to building a **graphical user interface (GUI)** using the **Simple DirectMedia Layer (SDL)** library: - SDL was used for rendering visuals, creating the game interface, and managing user input. - We designed a user-friendly interface with interactive elements to enhance gameplay. --- ## 8. Web Deployment Finally, we ported the application to the web: - This step involved adapting the project for a browser environment using tools like **Emscripten**, enabling the C codebase to run as WebAssembly. - The web version preserved all core functionality and graphical features for wider accessibility. --- ## 9. LaTeX Report We documented the entire project in a detailed **LaTeX report**, which included: - An introduction to the project's objectives and methodology. - Descriptions of the game logic, random generation, solver, and graphical implementation. - Analysis of results, including screenshots and tests. - Appendices with the code structure, unit tests, and references. --- ## Conclusion This project not only enhanced our skills in **C programming**, but also introduced us to collaborative development workflows, testing methodologies, and the transition from terminal-based applications to graphical and web-based interfaces. The inclusion of a **random game generator** and a **solver** added complexity and robustness, while the **LaTeX report** showcased our ability to document technical work professionally. The experience of combining fundamental programming with modern tools like **SDL**, **GitLab**, and **Emscripten** was invaluable.