-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Here is some simple notes about Gii
Gii is a game development environment targeting MOAI game engine, it's written to working together with MOCK. It is made of following components:
- A Python environment including dependent libraries.
- A Command line based sub-tool framework
- A PyQT based IDE
gii init <PROJECT_NAME>
gii ide
<Project Root>
-- game (game content)
-- lib (runtime library)
-- asset (game asset)
-- bin (executable binaries)
-- osx
-- win
-- python
...
-- host (binary source files/ build script)
...
-- env (editor related environment)
-- workspace (personal workspace data files)
-- config (project config data)
-- cache (asset building cache)
-- game (game runtime config data)
-- modules (module-specified editor config data)
-- packages (project local packages)
-- shell (project local shell scripts)
-- data (project local extra editor data file)
Gii has a generic asset management system.
In Gii, we treat asset files as 'Source' files, the import process is to 'Build' intermediate or runtime 'Object' data from these 'Source' files. Asset manager is the one for the job. During import process, asset managers are called in priority order, the asset manager
By default, asset manager will simply copy the "object" file of the asset node into deployed package. But you can always customize deployment process for each asset type. For example, we can do additional optimization or compression during deployment process as we need.
Let's have a look at a real-life example of asset management in Gii, a texture file:
- User drop an image file into asset folder.
- Filewatcher detected filesystem changes and notify the editor to do asset scanning.
- Asset library sees the new image file and start importing.
- Asset library tries to import the file with each registered asset manager, in priority-order, until the texture asset manager accepts the file.
- The texture asset manager does the actual import process:
specify the asset's type, which is 'texture' in this example request a cache file handle from cache manager convert the image file into internal format, save the converted file as the cache file. point the asset's "object" file to the built cache file
- During depolyment, asset manager does any additional process assigned like texture-compression or advanced atlas reconstruction.
- To use this texture asset, game engine will look into the asset node's "object" field to find actual data to load.
in editor previewing, the "object" file is the cached intermediate file. in deployed runtime, the "object" file is the depolyed data.