• Register

Wave Engine was born on February 21, 2013 with the exciting mission of developing an engine to help the mobile game developers’ community.

Post news Report RSS New Wave Engine Assets WorkFlow

New Wave Engine Assets WorkFlow available for WaveEngine 1.4.0 (Dolphin).

Posted by on

The Wave Engine Team is working on improving the developer workflow. One of the major changes that will be in the next Release is improving assets handling (textures, sounds, 3d models…). So far, one of the most tedious tasks when working with Wave Engine projects on multiple platforms, was the process of converting each asset to the cross-platform WPK format, in addition to adding the WPK files to our solution should configure the properties for bundling these results into the package (.apk Android, .ipa iOS, .xap Windows Phone…)
In the new workflow all these tasks will be performed automatically and transparent to developers. With this, we obtain great benefits:

• Reduced development time and increased productivity
• Improved the process of porting to other platforms
• Isolated the developer from managing WPK files

Differences between old and new workflows

With the old workflow we created a Wave Engine Project, composed by: one code Project and another launcher Project. Launcher project included a folder called “Content” where we had to manually add the assets of our game.


If we wanted to add a texture or image as assets before adding the file to Content folder, we should convert it to .wpk (Wave Package) format. To do this we used the Asset Exporter Tool accompanying Wave Engine.


We create a new Project in Asset Exporter (.weproj file) and add each of the assets to convert them to WPK format. Once collected the necessary assets we could use the export function for convert every asset simultaneously.

After converting our assets to WPK format (example: largeLogo.png to largeLogo.wpk) we should add these files to our Content folder with the following properties in the case of the Windows platform (these properties are different depending on each platform).


Then the values required for export properties for each platform are described:

Windows
• Build Action: None
• Copy to Output Directory: Copy if newer

Android
• Build Action: AndroidAsset
• Copy to Output Directory: Do not copy

iOS
• Build Action: Content
• Copy to Output Directory: Do not copy

Windows Phone
• Build Action: Content
• Copy to Ouput Directory: Do not copy

Linux
• Build Action: None
• Copy to Output Directory: Do not copy

Mac
• Build Action: Content
• Copy to Output Directory: Do not copy

Ouya
• Build Action: AndroidAsset
• Copy to Output Directory: Do not copy

And this whole process had to be done for each asset and platform. (D’OH!)
In the new version we wanted to make this process automatically and free developers getting all these tedious tasks. To make this possible we have had to make some changes to the Wave Engine Project Template described below.

When creating a new Project you obtain 3 projects: a code Project, a launcher Project and an assets Project. The first difference is that now we will not have a Content folder included in the launcher Project, but you have an assets Project link added to code Project.


Resources.weproj file is an Asset Exporter Project which automatically opens when you double click on this file. In this way we were able to create a 1:1 relationship between game solution and assets Project.


Appearance of the new GTKSharp Asset Exporter Tool that you can use on Windows, Mac and Linux.In the above image you can see the first difference: root element of asset tree now is called Content which indicates the route of our assets to be loaded. The process to add an image is similar to old workflow with Add Asset Option.


For using this texture in our source code, have available a small new feature in the new Asset Exporter Tool consisting you can copy to the clipboard the path relative to the Content folder of the asset, ideal in reducing typical spelling errors.


The path copied to the clipboard is Content/largeLogo.png and here you can discover another major difference which is now you can specify the paths of assets with original extension instead of the wpk extension.
Also comment that any files included in the assets project which are not a convertible wpk format, will simply be copied unaltered to our compiled package. This is useful to include music mp3 files or xml configuration files in our game project.
As can be seen in the new workflow management across asset is made solely from the Asset Exporter Tool.
Finally manual export of asset and copy to our game project is not necessary, now thanks to the available links between game and asset projects it is allowed the compiler to be able to export and include every asset in the final package during build process.
So we’ve changed the compile process of VisualStudio / XamarinStudio / Monodevelop using MSBuild targets and Custom commands. Let’s see the changes made to the Wave Engine Project Template to understand this in more depth.If we open the .csproj files (Projects description) of code and launcher projects you will find the following changes:

MyGameProject.csproj

MyGame.csproj

Above screenshots show how few targets have been included to modify the compilation process of the projects.

The first WPKAssetsExporter.targets is included in the code Project and is responsible for exporting every asset to wpk format.

The second WPKAssetsCompilation.targets is included in the launcher Project and is responsible for including the wpk files in the final package.

These targets are different for each platform because the build process is very different in each one of the Wave Engine supported platforms, although all follow the same pattern. These changes have been incorporated into the new Wave Engine templates and the Project Converter Tool also rewritten in GTKSharp.

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: