-
Notifications
You must be signed in to change notification settings - Fork 12
Quests ~ API Design Document
Quests are not fully integrated into chiventure. The goals from spring 2021 were to incorporate quests into the game-state module and other RPG features like NPCs.
With the hash table quest_hash_t *quests
quests can be finally incorporated into chiventure. The hash table is already included in the game struct found in game-state/game.h
.
typedef struct game {
/* an iteratable hashtable of players */
/* using the macros provided in uthash.h */
/* the expected size is 1 for single player games but this can change */
player_hash_t *all_players;
/* an iteratable hashtable of rooms */
/* using the macros provided in uthash.h */
room_hash_t *all_rooms;
/* an iteratable hashtable of items */
/* using the macros provided in uthash.h */
item_hash_t *all_items;
quest_hash_t *all_quests;
};
We are interested in delving into game-state/player.h and storing a current tree of quests that the player has there. As the player explores the area, they will add the quests they pick up along the way in quest_hash_t *quests. In particular, we think that the player struct could potentially look like this:
/* A player in game */
typedef struct player {
/* hh is used for hashtable, as provided in uthash.h*/
UT_hash_handle hh;
char *player_id;
int level;
int health;
int xp;
class_t *player_class;
item_hash_t *inventory;
quest_hash_t *quests;
} player_t;
- Create a load_quest.c file within src/wdl/src/ with the following function: add_quests_to_game(obj_t* doc, game_t *g); This function would call extract_objects(doc, "QUESTS") to extract the parsed quest objects Then it would iterate through the quests using HASH_ITER and each iteration would call add_quest_to_game(g, quest);
We want this function to be called when a game is being loaded in so we plan to have it called by the load_yaml_game function:
/* See load_game.h for documentation */
game_t *load_yaml_game(obj_t *big_document)
{
int rc;
game_t *game = create_game(big_document);
// call functions that parse items, actions, rooms, and game attributes
// into a game pointer
rc = add_rooms_to_game(big_document, game);
if(rc != SUCCESS)
{
fprintf(stderr, "Error adding rooms to game.\n");
return NULL;
}
rc = add_quests_to_game(big_document, game);
if (rc != SUCCESS)
{
fprintf(stderr, "Error adding quests to game.\n");
return NULL;
}
}
- Add add_quest_to_game(obt_t* doc, quest_t* q); to game_state/game.c This function is called by add_quests_to_game, this function uses HASH_FIND to check if the quest has already been added to all_quests in the game struct and if not adds it using HASH_ADD_KEYPTR.
-
Action Management
-
Battles
- Design Document
- Text Based Combat in Other Games
- User Stories
- Wishlist
- Battle Planning 2022
- Battle User Stories Review 2022
- Structs in Other Modules Related to Battles 2022
- Stat Changes Design Document
- Run Function Design Document
- CLI Integration Design Document
- Move Changes Design Document
- Unstubbing Stubs Design Document
- Battle Items and Equipment Design Document
- Battle Item Stats
- Battles Demo Design Document
- Battles Testing Moves, Items, and Equipment Design Document
- Sound integration with battle (design document)
-
Custom Actions
-
Custom Scripts
-
DSL
-
CLI
-
Enhanced CLI
-
Game-State
-
Graphics
- Design Plan
- Design document for integrating split screen graphics with chiventure
- GDL (Graphical Description Language)
- Graphics Sandbox
- Design Document for NPC Graphics and Dialogue
- Feature Wishlist (Spring 2021)
- Installing and Building raylib on a VM
- LibSDL Research
- Module Interactions
- Working with Raylib and SSH
- raylib
- GDL
-
Linking the Libzip and Json C to chiventure on CSIL machines
-
Lua
-
NPC
- Dependencies: Player class, Open world, Battle
- Action Documentation
- Design Document for NPC Generation in Openworld
- Design and Planning
- Establishing Dependencies
- Implementation of Custom Scripts
- Independent Feature: NPC Movement Design Document
- Player Interaction Design and Planning
- Dialogue
- Design Document for NPC Dialogue and Action Implementation
- Loading NPCs from WDL Files
- NPC Battle Integration Design Document
- NPC Battle Integration Changes Design Document
-
Open World
- Autogeneration and Game State
- Deciding an integration approach
- Designing approach for static integration into chiventure
- Feature Wishlist
- Generation Module Design layout
- Potential connections to the rest of chiventure
- Single Room Generation Module Design
- Source Document
- User Stories
- World Generation Algorithm Plan
- Loading OpenWorld Attribute from WDL
-
Player Class
-
Player
-
Quests
-
Rooms
-
Skill Trees
- Avoiding soft locks in skill tree integration
- Components of Exemplary Skill Trees
- Design Document and Interface Guide
- Environment interactions based on skill characteristics
- Integrating complex skill (combined, random, sequential, etc.) implementation
- Integration of a Leveling System
- Potential Integration with existing WDL
- Research on game balancing in regards to skill trees
- Research on skill tree support in modern day game engines
- SkillTree Wiki Summary
- Skilltree "effect" implementation and roadmap
- Summary of md doc file for skilltrees
- Design ideas in connection to other features
- Summary of Skill Tree Integration 2022
- The Difficulty of the Reading the World
- Complex Skills Summary
-
Sound
-
Stats
-
WDL