-
Notifications
You must be signed in to change notification settings - Fork 13
WDL ~ Looking into options to store JSON objects
This document is aimed at determining the feasibility of using Libzip to compress several JSON in the directory structure we are planning to have for WDL++. Currently, we can only support using a single file as the parser in libobj has a path to a file for the directory as the parser assumes the existence of only one file. Clearly, this will need an overhaul for a better system to store JSON objects if we are planning to include several features such as sounds and graphics that will require images to go with the JSON files and the information stored will have to be spread across several JSON files for the RPG teams. Using libzip is a possible solution to the storage of multiple files.
https://libzip.org/documentation/libzip.html
Summary:
Libzip has open and close commands used to open and close zip archives.
When Libzip is open, you are able to add files and directories.
To use libzip, you would need to include #include <zip.h>
Explanation of useful commands:
In order to get zip_t *archive that will be parse:
zip_open(const char *path, int flags, int *errorp);
This function allows us to open the zip archive to use the functions for opening, reading and closing files.
zip_close(zip_t *archive);
zip_discard(zip_t *archive);
Both of these functions close the archive, where zip_close saves changes made to the zip archive. However, there is no reason for us to be changing the zip archive as we are parsing the contents from the zip files so there is no reason for us to use zip_close instead of zip_discard.
zip_fopen(zip_t *archive, const char *fname, zip_flags_t flags);
This opens file given the archive and filename where libzip looks up the file. This will allow us have the file open with zip_file_t* type. The flags determine whether the data within the opened file is the original data or the compressed version. We will use whichever flag allows us to allow zip_fread work properly, which is the original data.
zip_fread(zip_file_t *file, void *buf, zip_uint64_t nbytes);
This function allows us to read a file using libzip, where the 2nd arguement is a buffer where the bytes read from the given file (the file from zip_fopen) is moved to. Json-c will then parse the resulting buffer from this function.
zip_fclose(zip_file_t *file);
This function closes the file that will be opened by zip_fopen.
Source: https://www.winzip.com/win/en/aboutzip.html Using zip will compress the files to make certain actions faster. One of these actions is storing data, where storing compressed files will be more efficient in the long run compared to not zipping up the files. Speed will matter when more components to the game get added through various RPG teams and sound/image teams as that will require more data to be saved/loaded. However, this will require the user to have a zipped file with their contents instead of an unzipped file but zipping a file is an action that most people know how to do.
The compressed files also save space, therefore making it possible to save a larger amount of components of the game.
I looked into possible alternatives to libzip. One of them was kuba--/zip. Source: https://github.com/kuba--/zip This tool seems to have some of the commands in libzip just under different names. An advantage this alternative provides is sample uses of the library to make implementation easier. However, the functions that this alternative provides is limited. This alternative emphasizes being simple, but this will give up some of the functionality that libzip provides such as providing functions to unchange recent changes, functions that handle zip errors, and more. So based on my findings, libzip is the best file editor that has a decent usage.
-
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