Kiriller12 / DeadGalaxy

Small shooter game/engine project based on raylib and .NET 8
GNU General Public License v3.0
4 stars 1 forks source link

Reimplement resource storage and loading #2

Open Kiriller12 opened 5 months ago

Kiriller12 commented 5 months ago

We need to reimplement resource storage and loading methods since it is not clear and simple enough to support new features at the moment.

Kiriller12 commented 5 months ago

I think, this directory and file structure might be a good fit for this project.

Directory structure
    Data
        Shaders
            geometry.vert
            geometry.frag
            pointLighting.vert
            pointLighting.frag
            final.frag
            ...
        Levels
            <name> folder or <name>.lvl zip archive
                metadata.json
        Models
            <name> folder or <name>.mdl zip archive
                metadata.json
                model.<3D model extension>
        Textures
            fallback.png
            texture.<image extension>
            ...
        Animations
            animation.<animation extension>
            ...
        Musics
            music.<sound extension>
            ...
        Sounds
            sound.<sound extension>
            ...
        Scripts
            script.lua
            script.luac
            ...
        Videos
            video.<video extension>
        Localizations
            <name> folder or <name>.lng zip archive
                metadata.json
                font.<font extension>
                texture.<image extension>
                ...
        <package name>.dgp zip archive
            Packed data archive. Can contain various data using directory structure mentioned above.
            For example:
                common.dgp
                    Shaders
                        geometry.vert
                        geometry.frag
                        pointLighting.vert
                        pointLighting.frag
                        final.frag
                        ...
                    Textures
                        fallback.png
                        ...
                game.dgp
                    Levels
                        ...
                    Models
                        ...
                    Textures
                        ...
                    Musics
                        ...
                    Sounds
                        ...
                    Scripts
                        ...
                    Videos
                        ...
                localizations.dgp
                    Localizations
                        ...
                mod1.dgp
                    ...
                mod2.dgp
                    ...