Data Folder Structure

From Esenthel

Jump to: navigation, search

It is very encouraged to preserve a sensible Data File Hierarchy Structure.

Let's assume that your game folder's location is "D:\My Game".

In this folder you should create "Data" folder - "D:\My Game\Data", in the documentation and tools it will be known as your "Game Data Folder".

This folder is very important because you'll need to store all data files inside it.

All references to any files will be stored relative to your "Data" folder.


Data Folder will be Archived

During the development of your game, you'll have the data files located in the folder.

Accessing data files from codes will be done using IOPath function (function which sets Input/Output Path location).

When your game will be ready to be deployed, you should archive the whole "Data" folder using Converter utility to create a "data.pak" Pak file and change your codes to call Paks.add function instead of IOPath (this will setup access to your data files from the Pak file instead of "Data" folder).

When releasing the final game, do not include the "Data" folder, but include the "data.pak" file.

Accessing files from Pak file is much faster than from ordinary folder with files, and when using Pak archives you can get automatic files encryption for safety of your data.


Sample Structure

It is encouraged to use the following folder structure in the "Data" folder:

  • Anim - keep all global Animations here (animations used by many objects)
  • Enum - keep all enum's here
  • Mtrl - keep all global Materials here (materials used by many objects and world heightmaps)
  • Obj - keep all custom Objects here (their Models, Physical Bodies and other relevant files)
    • Chr - keep all character objects here
    • Static - keep all static objects here
    • Item - keep all item objects here
    • ...
  • Shader - keep all global Shaders here (shaders used by many objects)
    • 2 - keep all shaders for Shader Model 2.0
    • 3 - keep all shaders for Shader Model 3.0
    • 4 - keep all shaders for Shader Model 4.0
    • GL - keep all shaders for OpenGL
  • World - keep all worlds here


Please refer to the "EsenthelEngineSDK\Data" folder layout for more info.

Personal tools