woensdag 13 juni 2012

Unity assetbundles and text files

Dear readers,

Since about 2 months now I've been working in Unity and I must say it's quite different from Flash with Away3D. Flash of course isn't specifically meant for games where as Unity is. There are many things that are much easier to do within Unity such as physics, shaders, debugging and more.

An important aspect in game development is separating the artist from the programmer. Not in communication of course. Sometimes artists *cough* Matt *cough* have the craziest ideas without thinking how much work it would be for the programmer and we have to hold them back. But separating them in work, for example: if an artist wants to make changes to his model then he should be able to make these changes and see them in the game without the help of a programmer. Also the artist should NEVER have to change or even see the code of the programmer. If there is a parameter (maximum car speed for example) that needs changing then he shouldn't have to change any code.

So how do we achieve these goals in Unity? Well we have a separate unity project for the artist. Here he can import models, create particle systems, set material, proxies, flares, etc. Then he can export what is called an 'asset bundle' (a single file) containing all these assets. In the game-project where my code is located, I load in this asset bundle and am able to use all assets within it with the proper materials set on models already. When the artist wishes to see his art in-game he can simply export his assets and start the game.

As for the changing of parameters, we have a separate text file in which most parameters are included. Changing the cost or maximum speed of a car then becomes very simple. In the game this text file is loaded and the parameters are used.

Using the asset bundles and text files we avoid getting in each other's way and making the development process easier for ourselves.

-- Stijn

Geen opmerkingen:

Een reactie plaatsen