# Project Title Team members: - Freya Murphy - Audrey Fuller - Yusif Elsharawy - Ryan Symons ## Summary Description Embark on a classic roguelike dungeon-crawling adventure. Players will explore procedurally generated, tile-based dungeon floors crafted using Binary Space Partitioning. Battle through waves of enemies with real-time combat, collect powerful items, and push your limits to see how deep you can delve into the ever-changing depths. ## Checkpoint Progress Summary Give a summary of the progress made and lessons learned thus far. So far, our group has been able to achieve most of our MVP functionalities, including: - Dunegon floor procedural dungeon generation - Player movement and enemy spawning - Collision Logic We've even managed to achieve some stretch goals and additional features: - Usage of pixel art sprite sheets - Item/Inventory system However, we still have yet to implement a full enemy/player combat loop (attacking and defending). ## Lessons Learned With the work completed so far, we've gained a greater understanding of creating Rust programs from the ground-up, however this came with some roadblocks. ### Goodbye Wave Function Collapse The nixing of the Wave Function Collapse Algoritm for dungeon generation was an unfortunate but nessesary step in the development of this project. After fully writing a generic implementation of the algorithm and testing it, we learned that tragically WFC does not guarantee it's constraints are imposed globally, only in small local patches. This means that it doesn't guarantee every dunegon room will be accessable from the player's start location. While there are workarounds for this, it usually involves pairing WFC as a post-processing step on a complely different generation algorithm that does guarantee connectivity. So ultimately after more thourough research, we switched to Binary Space Partitioning for generating the map instead. ### Float vs u64 vs usize Another issue during development was the standardizarion of our data types for dungeon structure, traversal and generation. With several of us working on differnent but interconnected components, there were some instances where we would define our type fields for storing location information. This lead to refactoring later to standardize most of our dungeon-related types into u64, as placing expect(clippy::cast_possible_truncation) every few lines isn't what I would call "good practice". ### Raylib Double Free TODO ### Windows HATES Default Features TODO ## Structure ### **Game Crate** Initializes the game state and handles the Model-View-Controller loop and player movement. ### **Dungeon Crate** Contains the core functionality for interacting with a dungeon and it's components. - **[astar](dungeon\src\astar.rs)** - Generic A* Pathfinding Algorithm Implemented for Player Movement. - **[bsp](dungeon\src\bsp.rs)** - Binary-Space Partitioning Algorithm for Dungeon Tile Generation. Recurively splits the dungeon into randomly sized rooms, then collapses the tree upwards connecting each root node. - **[bsp_tests](dungeon\tests\bsp_tests.rs)** - Integration tests to verify all moveable tiles are connected. - **[entity](dungeon\src\bsp.rs)** - Contains the structures for all entities, including the player, items and enemies. Implemented features: - Enemy movement - Inventory - **[map](dungeon\src\map.rs)** - Structures for the dungeon game map including the current `Floor`, and map `Tile`. - **[player_input](dungeon\src\player_input.rs)** - Carries information about player inputs, including mpve direction. - **[pos](dungeon\src\pos.rs)** - Representation of a position and direction inside the dungeon grid. - **[wfc](dungeon\src\wfs.rs)** - **Not Used** Wave Function Collapse Algorithm for Dungeon Generation. ### **Graphics Crate** Core functionality for - **[audio](graphics\src\render.rs)** - Framework for loading audio assets during runtime. - **[render](graphics\src\render.rs)** - Defines wrappers for calling the raylib library for sprite displaying. Implemented Features: - UI - Text - Texture loading - Debug view - Tilemap with foreground and background - Minimap - Stats - Camera locked to player ## Work To Do For the Final TODO ## Additional Details - List any external Rust crates required for the project (i.e., what `[dependencies]` have been added to `Cargo.toml` files). - Briefly describe the structure of the code (what are the main components, the module dependency structure). - Pose any questions that you may have about your project and/or request feedback on specific aspects of the project.