====== Differences ====== This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
asset_management [2015/02/16 20:26] tom |
asset_management [2015/02/23 09:49] (current) tom |
||
|---|---|---|---|
| Line 8: | Line 8: | ||
| ===== Directory Structure ===== | ===== Directory Structure ===== | ||
| The directory structure of our GIT repository is as follows: | The directory structure of our GIT repository is as follows: | ||
| - | * Build - the built game executables and intermediate link data. This folder need not be shared at this point | + | * Build - the built game executables and intermediate link data. |
| * Client - the game files themselves. *this is the important one* | * Client - the game files themselves. *this is the important one* | ||
| - | * Client/Assets - the folder containing the actual assets | + | * Assets - the folder containing the actual assets |
| - | * Client/Assets/Art - art assets go in here | + | * Universal - contains assets that are the same on all platforms |
| - | * Client/Assets/Audio - music and sound | + | * Art - art used in all places |
| - | * Client/Assets/Audio/FX - should be in WAV or OGG format | + | * 2DTK - sprites and data managed by the 2DTK asset system |
| - | * Client/Assets/Audio/Music - should be in MP3 format | + | * Shared - materials and textures shared across the project |
| - | * Client/Assets/Code - persistent, shared, global game code. These are things used by several objects. All CODE should be C#. Unity JavaScript is unacceptable for code, as it isn't a real language, has fewer features, and can be difficult to debug. | + | * Materials - textures and materials that use them |
| - | * Client/Assets/Code/Core - code that is common to several game titles. Needs to be universal. | + | * Meshes |
| - | * Client/Assets/Code/Game - code that's for this game title. Can be derived from stuff in Core or Lib | + | * Splash - icons and splash screens |
| - | * Client/Assets/Code/Lib - code that we didn't write, which our game uses | + | * Audio |
| - | * Client/Assets/Fonts - ask Tom about font importing | + | * FX |
| - | * Client/Assets/Physics (physics materials go here. Put physics code in Assets/Code/Core/Physics or Assets/Code/Game) | + | * Music |
| - | * Client/Assets/Prefabs - put prefabs in here. This is important. | + | * Code - this is code that's used in several places |
| - | * Client/Assets/Scripts - single-use game scripts which aren't generally applicable to other situations (this one log needs to roll down a hill and explode at the bottom, for instance). Scripts can use C# or UnityScript (JS). | + | * Core - general-purpose code used across several projects. Code placed here should be agnostic |
| - | * Client/Assets/TK2DRoot - used by 2D Toolkit, which is the backbone of our sprite and font system. Do not touch. | + | * Game - code specific to this game |
| - | * Client/Library - contains intermediate files for your local machine. Do NOT share | + | * Lib - code written by other people, generally shouldn't be changed |
| - | * Client/ProjectSettings - Contains metadata used by Unity. DO share | + | * TK2DROOT - do not touch! This is the backbone of our entire asset management system |
| - | * Client/Temp - do not share | + | * Entities - this folder contains things for **entities**, which are "things that exist in the game. Examples of entities would include "girl", "tree", "rock", "sun", "GUI menu", etc. Each Entity gets its own folder within the Entities folder, and within that folder is another directory tree for everything used in that entity. The structure of this directory mimics that of the parent directory (contains Art, Audio, Code, Misc, Models, and Prefabs). **//The reason for placing entity assets in their own folder together is to keep everything in context, making our lives easier (hopefully)//** |
| - | * Tools - not used | + | * [example] |
| - | * Work - not used | + | * Art |
| + | * Audio | ||
| + | * Code | ||
| + | * Misc | ||
| + | * Models | ||
| + | * Prefabs | ||
| + | * Fonts | ||
| + | * Plugins | ||
| + | * Prefabs | ||
| + | * Scenes - these are the actual scene and level files you edit within Unity (Scene.unity is the default) | ||
| + | * Scripts - "scripts" are different from "code" in that they do a single, very simple thing just once (roll a thing down a hill, activate a door, etc.). Scripts, ideally, will be editable by a savvy "designer" | ||
| + | * PerPlatform - contains assets that change on each platform. **Note:** the structure here should be identical to Universal. So if the material for the game's icon is in Universal/Art/Shared/Icon, then the down-rezzed mobile version might be in PerPlatform/Art/Shared/Icon. For more info, see GIT and PerPlatform, below | ||
| + | * Resources - data used by various plugins - do not touch | ||
| + | * Library - contains intermediate files for your local machine. Do NOT share | ||
| + | * ProjectSettings - Contains metadata used by Unity. DO share | ||
| + | * Temp - do not share | ||
| + | * Tools - not used as such | ||
| + | * Work - not used as such | ||
| + | |||
| + | ===== Entities ===== | ||
| + | We will be using Entities in this game. For the purposes of the game, an entity is defined as: "A thing that has its own properties, art, behavior, and design, and can be replicated, instanced, or referenced." | ||
| + | |||
| + | Examples would include: | ||
| + | * A bat | ||
| + | * An arrow | ||
| + | * The girl | ||
| + | * A tree which can be duplicated and re-used | ||
| + | * A flowing river | ||
| + | * The sun | ||
| + | * A menu | ||
| + | |||
| + | Each entity has its own ID, and each entity has its own folder within the /Client/Assets/Entities folder | ||
| + | |||
| + | So, if the girl has the entity ID of player_girl, its folder would be /Assets/Entities/player_girl. | ||
| + | |||
| + | Within an Entity's folder is a subdirectory of all its data: | ||
| + | entity_id/Art - all 2D art NOT used as a texture | ||
| + | entity_id/Audio - sounds it makes | ||
| + | entity_id/Code - scripted or coded behaviors it has | ||
| + | entity_id/Models - the meshes, the materials, and the textures go in here | ||
| + | entity_id/Misc - other things it needs to function (who knows what these are... oh well?) | ||
| + | entity_id/Prefabs - if the entity has any prefabs, they should go here | ||
| + | |||
| + | Any readme.txts on the entity should go in the root folder (entity_id/) | ||
| + | |||
| + | We should do it this way, because it's intuitive to think of things in context. Having a folder with hundreds of script files, sorted by function, is fun, but it's really not using Unity's file manager to full advantage. | ||
| + | |||
| + | ===== GIT ===== | ||
| + | GIT is the version controller we will be using. GIT tracks changes made to the code. One of the most important things about GIT is it's use of **branches**. Simply put, a branch is a slightly different version of the entire directory. | ||
| + | |||
| + | In our case, we will be using different branches for the various versions of the game that will exist on all platforms. | ||
| + | |||
| + | You can copy code between branches - this is called merging. Merging is used to sync up code between branches and keep them working. | ||
| + | |||
| + | We DO want to merge Universal assets between branches (we want that to stay in sync). We do **not** want to merge PerPlatform assets between branches, though. | ||
| + | |||
| + | Here's an example of why we have PerPlatform and Universal: | ||
| + | - Someone edits code in TouchInterface. This is a global code piece, common to all platforms. They merge this code (in the Universal/Code/Core folder) into all other branches of the game without breaking anything. | ||
| + | - Now let's say someone creates a half-resolution spritesheet for a game character, to reduce memory used for a handheld platform. They do NOT want this downrezzed version to be distributed to all other platforms, so they should keep this spritesheet in the PerPlatform folder, within the branch "3DS", for instance. Keeping this code in here will restrict its use to the DSI platform, which will avoid polluting the asset trees for other systems. | ||
| + | |||
| + | === GIT Branches === | ||
| + | * **master** is the main branch. The system is OSX / Windows. This is the version used for most development and testing, and the version from which other branches import new assets | ||
| + | * ouya (not exists yet) | ||
| + | * 3ds (doesn't exist yet) | ||
| + | * wiiu (doesn't exist yet) | ||