uchicago-cs / chiventure

A text adventure game engine developed in UChicago's CMSC 22000 - Introduction to Software Development
40 stars 13 forks source link

Create a high level room generation module (pulls lower-level room generation modules together) #493

Closed bryan22lee closed 4 years ago

bryan22lee commented 4 years ago

We want to be able to auto-generate a new, connected room when entering a room. For now, we want a simple, bare-bones template room to be generated (path that connects to old room, maybe 1 item). The purpose of this issue is to design, create, and test a high level "generate" module that pulls from room.h module, hard-coded template rooms, and our generate room modules to create connected new rooms every time a room is entered. Also consider giving the user a choice in generating a new room or not when entering (so that it's controlled to some extent).

bryan22lee commented 4 years ago

In a branch off of dev called openworld/sample-generation, I created src/openworld/ and include/openworld/ directories for C source files and header files, respectively. I have created a high-level module (unfinished) to help with our future room autogeneration module. Finishing this module depends on the rooms module and autogeneration module (will pull from these two lower-level modules to implement autogeneration). I have written skeleton functions for autogenerating a room and adding this room to the current room when a new room is entered in a game. I have written a function for determining when a new room has been entered. The C file is available at src/openworld/sample_generation/sample_generation.c and the header file is available at include/openworld/sample_generation.h, both in the openworld/sample_generation branch. The next steps are to incorporate the sample-room and autogeneration-algorithm modules when they are ready, as well as fix dependencies. We want to address compiling issues and test all functions before we begin thinking about scaling the algorithm.

bryan22lee commented 4 years ago

A high-level sample_generation module has been created to pull from our hard-coded item/room structs and autogeneration implementation module when they are ready. The outline code in sample_generation.h will be filled in with functions from these modules. All rpg-openworld modules will be available in our include/openworld/ directory. We left our openworld/sample-generation branch (off of dev) open for further revisions from rpg-openworld team in the next sprint. Our immediate goals, starting with the following sprint, are to outline/organize all dependencies to resolve compiling issues (see "CMakeLists.txt file" below). Then, we want to implement a simple autogeneration algorithm for the addition of rooms only, pull from item/room modules and autogeneration modules to add new rooms whenever a room is entered, and use uthash.h correctly.

CMakeLists.txt file: Compilation issues due to struct usage errors. For the next sprint, we will resolve compilation issues to ensure correct dependencies and struct usage before autogeneration implementation.

dwahme commented 4 years ago

Issue Score: ✔️++

Comments: Great job! Well done being explicit about what how you accomplished your immediate goals and what they mean for the long term ones as well.