craftablescience / ChiraEngine

A customizable MIT-licensed game engine.
https://craftablescience.info/ChiraEngine/
MIT License
33 stars 6 forks source link

File Formats #40

Open ashifolfi opened 1 year ago

ashifolfi commented 1 year ago

Component to Improve

Core Engine / Documentation / Other

Describe Your Suggestion

every single definition file being .json makes pinning down the type of definition/chira file impossible without depending on folders/parsing every single json file for chira info. Meaning that every time we'd need to make sure you're not trying to load a model definition as a texture definition we'd have to parse the file for every type of chira data, and then only load the file if it has what we need.

We shouldn't be doing that. We shouldn't have to guess the type of definition.

we should pin down a naming scheme for the special formats and maybe also how these formats will work.

for naming I was thinking C + 3/2 letter shorthand for the type Ex. CMDL, CTEX, CMAT, CSCN, CPK

for CMDL's functionality I was thinking about using JSON format GLTF files with modifications made for Chira specific definitions so we don't have to worry about OBJ or whatever not containing something we might need.
Though we could also look into the DAE format. both of those formats would be mesh + other model data all in one though.

other formats are welcome to be suggested but if meshes are to be made separate they MUST not be named CMDL as that would leave zero room for a good name for model definitions.

Model being a full textured/lit group of meshes/singular mesh complete with any armature/bones/animations Mesh being a group of polys that make up a model.

craftablescience commented 1 year ago

Agreed, I like the name scheme too