Improve "database" system #133

Closed
opened 2024-04-18 11:04:56 +02:00 by kazhnuz · 3 comments
Owner
  • Put back the character/ennemies assets in assets/
  • Add a new database layer able to merge multiple scripts in one
  • Make it load everything on startup
  • API : db:getList("sub.folder") db;get("sub.folder", "dataname") db:getFile("sub.folder.specific.file")
  • Keep it really simple
- [x] Put back the character/ennemies assets in `assets/` - [ ] Add a new database layer able to merge multiple scripts in one - [ ] Make it load everything on startup - [ ] API : `db:getList("sub.folder")` `db;get("sub.folder", "dataname")` `db:getFile("sub.folder.specific.file")` - [ ] Keep it really simple
kazhnuz added this to the Code Cleanup project 2024-04-18 11:05:16 +02:00
Author
Owner

Old version :

- [ ] Add constants pointers for many things instead of hardcoded text
- [ ] Split in several "database file" some important datas
- [ ] Split some elements in several lists
- [ ] Maybe add a validator that can be called from a special checkdatabase.sh ? Basically check all the data files and create a file with all errors ?
- [ ] Separate the maps and events files in their own folders outside of gamedata
- [x] Put back the assets in assets folders
- [ ] Maybe preload the database ?

Exemple of splits : 
- Instead of the characters folders, split in several files with the datas, and using `[CHAR_SONIC] = {},` or some stuff like that
- For the move, split in a "moves.lua" file, a "moves_aniamtions.lua" file, a "moves_effects.lua" file, and files for choregraphies.
- For the ennemies, use a species/ennemies split like in pokemon

Exemples : 
- https://github.com/pret/pokeemerald/tree/master/src/data
Old version : ```markdown - [ ] Add constants pointers for many things instead of hardcoded text - [ ] Split in several "database file" some important datas - [ ] Split some elements in several lists - [ ] Maybe add a validator that can be called from a special checkdatabase.sh ? Basically check all the data files and create a file with all errors ? - [ ] Separate the maps and events files in their own folders outside of gamedata - [x] Put back the assets in assets folders - [ ] Maybe preload the database ? Exemple of splits : - Instead of the characters folders, split in several files with the datas, and using `[CHAR_SONIC] = {},` or some stuff like that - For the move, split in a "moves.lua" file, a "moves_aniamtions.lua" file, a "moves_effects.lua" file, and files for choregraphies. - For the ennemies, use a species/ennemies split like in pokemon Exemples : - https://github.com/pret/pokeemerald/tree/master/src/data ```
Author
Owner

New datas/ layout :

  • consts/ : Game-level consts and enums
  • gamedb : All the game-related informations, separated in subfolders
  • scripts/ : All the game-related scripts
    • scripts/events : The map events
    • scripts/choregraphy : The battle choregraphy
    • scripts/battleactions : The battle effects
  • maps/ : The maps
  • languages : The translations
  • parsers/ will be slowly phased out
New `datas/` layout : - `consts/` : Game-level consts and enums - `gamedb` : All the game-related informations, separated in subfolders - `scripts/` : All the game-related scripts - `scripts/events` : The map events - `scripts/choregraphy` : The battle choregraphy - `scripts/battleactions` : The battle effects - `maps/` : The maps - `languages` : The translations - `parsers/` will be slowly phased out
kazhnuz changed title from New "database" system to Improve "database" system 2025-09-28 22:48:55 +02:00
Author
Owner

The new DB system is good as it is

The new DB system is good as it is
Sign in to join this conversation.
No description provided.