Integrating Wave Engine within an iOS Storyboard

UPDATE (April 19th): The document now reflects new changes introduced in Wave Engine v. 2.1.0.


Default Wave Engine launcher project for iOS assumes that your game will run as a stand-alone view inside your application. However, what if you want to mix native views or navigate between different controllers? Is there a way to join the native world with your scene’s one? The answer is yes. Keep reading this article, and you will learn how to accomplish it.


Create a Project at Wave Visual Editor

First step is to create a new Wave Engine project using Wave Visual Editor. You can follow My first application which will guide you step by step. Please, remember to include iOS as target platform when creating it (you can later create it as explained here).

Open the iOS launcher solution (you’ll find the Solution file inside the project’s root folder), we’ll write some extra code to achieve our goal.

Populate the Storyboard

You’ll notice there’s an existing Storyboard inside Controllers folder. From this point of view, the app behaves as any other iOS one, containing view controllers within such Storyboard.

If you open Main.storyboard, there will be the Main Controller, with a GL View in the end, where Wave Engine is actually rendered. On top of that one, there is another “empty” view (well, it just contains the GL one). This one is where you can drag and drop native controls.


So far so good. Wave Engine is, starting from v. 2.1.0 (Hammer Shark; complete list of versions), already integrated into a common iOS project. Please keep reading to discover a small sample, and how the communication can happen between both worlds.


The principal objective of our sample solution will be to communicate some native side views with our scene, allowing them to change our game’s entities behavior.

Following with above steps, still in the Storyboard, we’ve also added an UISwitch for pausing the game scene, in order to highlight how the communication between native iOS and Wave Engine can be done.

IOS Integration Storyboard

Our scene is quite simple: a fixed camera pointing to a cube, which’s endlessly spinning. Such can be entirely set-up within Wave Visual Editor (remember My first application; Load a primitive can be helpful as well). Due to the nature of the demo, pausing the scene is achieved simply by deactivating the Spinner component, child of the cube Entity. This can be done through its IsActive property.

The communication happening from the iOS UIViewController to the Wave Engine Scene happens in the following chain:

  • User touches the UISwitch which fires the AutoRotateSwitchChanged() “event” (actually it’s not an event, but a partial method automatically created from the Storyboard Designer at Visual Studio/Xamarin Studio)
  • Such contains a reference the Game it-self, so we’ve added a method to it: game.UpdateAutoRotation()
  • The Game knows about the Scene’s being in play, so can call custom code from those, which we’ve done through: scene.UpdateAutoRotation()

Apart from the integrations currently available, we’ve seen how native iOS controls can coexist with Wave Engine, opening a world of opportunities, such like CAD apps. The entire Source code can be downloaded from GitHub:

Sergio Escalada and Marcos Cobeña

Unit Testing in Wave Engine

Unit Testing is a very useful technique when developing games. It offers a lot of benefits as automated tests that can be run on a Continuous Integration server, avoid bug regressions, and so on.

This article describes how we can use the Humble Object pattern to avoid some dependencies that will help us to write useful unit test for our game. Continue reading Unit Testing in Wave Engine

Build a Simple Oculus Rift application

Oculus Rift is a virtual reality head-mounted display, developed by Oculus. This brings amazing virtual experiences to all users. For more information refer to this

This article describes the necessary steps you should follow to build, load, and run a simple WaveEngine application on the Oculus Rift VR platform.

Continue reading Build a Simple Oculus Rift application

Create 2D SpriteSheets with TexturePacker and import it to WaveEngine

TexturePacker is one of the most useful and used sprite sheet generators. It is very powerful and has tons of different options.  You can download it from here.

Wave Visual Editor now allow importing TexturePacker sprite sheets, automatically opening the TexturePacker file and converting to the Wave Sprite Sheet asset format, maintaining the original sources and the packaging information.

To import a TexturePacker file you have to create a new Sprite Sheet and then click on the “Import TexturePacker file” button  then select the .XML texturePacker file.

This will import all of its sprites, packaging and size information. After that you can edit it as a normal Sprite Sheet: Add sprites, animation, etc…

Step by step tutorial

Start TexturePacker and select Wave Engine template format

Continue reading Create 2D SpriteSheets with TexturePacker and import it to WaveEngine

Convert my game to mobile platforms

In this article we are going to review the conversion process that Wave Engine 2.1 uses to convert our game to other supported platforms. Wave Engine 2.1 has 3 development platforms (Windows, Linux and MacOS) where you can use Wave Visual Editor and 3 mobile target platforms (Android, iOS and Universal Windows Platform), additionally you can deploy your game on development platforms too.

Target Platforms

Continue reading Convert my game to mobile platforms

Custom components and RenderProperty attributes on Wave Engine 2.0 (Part 2)

In this second part we will review all RenderProperty attributes available on WaveEngine 2.0. But if you did not see the first article then we recommend you read it before this one.

It’s important to follow this rules when you want to create a custom component:

  • You must create a custom component as an extended class of Component, Behavior or Drawable.
  • Add [DataContract] attribute to custom component class.
  • Custom component must take parameterless public constructor.
  • All public properties in the custom component will show on Wave Visual Editor from Entity Details panel.
  • Add [DataMember] attribute to all public properties if you want its values stored during serialization process.
  • Basic data types are automatically displayed by Wave Visual Editor (bool, int, float, Vector2, Vector3, Quaternion…), however unknown data types are shown as a string.
  • You can add RenderProperty attributes to public properties in order to change how it is shown on Wave Visual Editor.
  • Default properties values must be set on a DefaultValues method.

Continue reading Custom components and RenderProperty attributes on Wave Engine 2.0 (Part 2)

Custom components and RenderProperty attributes on Wave Engine 2.0 (Part 1)

Wave Engine 2.0 provides a components set to define different types of entities.The components code is available to download on our github repository.

When you want to make a game you will need to create your own components. In this article we are going to show how to create custom components on WaveEngine and how to use them from Wave Visual Editor.

Start Wave Visual Editor and choose File -> New project

Set a name and folder location for your game:

Continue reading Custom components and RenderProperty attributes on Wave Engine 2.0 (Part 1)

What’s new in 2.0

We are glad to announce that Wave Engine 2.0 (Shark) is out! This release is a giant leap forward in our loved game engine.

New Wave Visual Editor

In August 2014 we began working on the new Wave Visual Editor 2.0 and, today, we are happy to announce the new editor has finally come true.

Available for download on Windows, Linux and Mac OS X platforms:

Continue reading What’s new in 2.0

Resources management and new WaveContent class in Wave Engine 2.0

Resources management is an important part during the game development and it becomes tedious when a large amount of it is required in a project. In this article, we show the progress done with Wave Engine and how it will ease task management.

How it works in previous versions

In Wave Engine 1.4.2 and previous versions, game assets can be included to throw the Asset Exporter tool and can be accessed programmatically using the asset path.

Continue reading Resources management and new WaveContent class in Wave Engine 2.0

Wave Engine 2.0 Exporter Command Line Tool

In Wave Engine 2.0 we have updated the Wave Exporter Command Line Tool and added new interesting features. Previously this was only used for exporting the project assets as a post-build event but the new version incorporates the option to export specific assets, directories and an entire project, with new parameter options.

The command line tool is in the WaveExporterCMD.exe, on the Visual Editor directory (For example, in Windows usually is in ‘$(Wave Directory) / v2.0/Tools/VisualEditor/WaveExporterCMD.exe’)

Wave Exporter commands

Wave Exporter Command Line Tool allows performing the following commands:

  • Help
  • Asset
  • Directory
  • Project

Continue reading Wave Engine 2.0 Exporter Command Line Tool