Unity Essentials Books Giveaway

Together with Packt Publishing, we’re giving away a couple of books on Unity3D!

Six of our readers will get either Unity 3.x Game Development Essentials or Unity iOS Essentials.

Unity 3.x Game Development Essentials seems to be aimed at users new to Unity3D and gives quite a complete tour of the game engine – covering beginner’s topics like 3D game development basics and user interfaces, but also more advanced topics as ray-casting and optimization.

One of the main differences when developing for iOS, compared to PC or Mac, is that you have to be more careful when it comes to performance. The author of the other book, Unity iOS Essentials, is clearly aware of this, as the readers already get their hands dirty in the the second chapter called iOS Performance Guide.

All you have to do to make a chance to win one of the books is to add a comment to this post, letting us know which one of the two books you’d like to win, and what topics you’d like to read more about in it.

An overview of the topics covered in the books can be found here and here (under the ‘Table of Contents’ tab).

Winners will be selected at random. Winners from the U.S. and Europe can either choose to receive a physical copy of the book or the eBook. Winners from other locales are limited to the eBook only. The contest will close on the 14th of February, and the winners will be contacted by email the day after – so be sure to use your real email address when you comment!

3 Most Popular Posts of 2011 – and Other Website Statistics

Looking back at our Google Analytics statistics of 2011, here’s a quick overview of our website statistics.

First of all, here’s a top 3 of our most popular blog posts in 2011:

  1. File I/O in Unity3D (6117 pageviews)
  2. Writing PlayerPrefs Fast (4387 pageviews)
  3. Unity and Playmaker (1458 pageviews)

During 2011, there was a spectacular growth in number of page views and visitors: from 1157 pageviews and 233 visitors in January 2011 to 4861 page views and 2728 visitors in December 2011. This means the amount of page views quadrupled, and the amount of visitors increased by a factor of ten!

Graph with the amount of visitors (dark blue) and page views (light blue) on our website in 2011.

Most website visitors are from the United States, the country with the biggest game industry, while Belgium takes a second place, as the PreviewLabs team’s home country. It’s nice to see that we have visitors of so many different countries: 126 countries out of the about 196 countries in the world.

Visits per country

To end this article, Google tells us that 3.75% of our page views have been made on mobile devices. This is still quite small, but I’m curious to see how this will evolve over the course of 2012 – as the smartphone and tablet market is expected to grow…

Siegebreaker: Game vs Prototype

Siegebreaker – a free-to-play iPhone/iPad game by Crazy Monkey Studios, based on a prototype made by PreviewLabs – has been out for its first couple of weeks now.

During a brainstorm we organized for our customer Crazy Monkey Studios in 2010, we asked ourselves what it would be like if you could move the towers in a tower defense game. This little brainstorm exercise triggered our imagination: Towers were replaced by RPG-like heroes, walls were added to allow building mazes, and a king was added as moveable target for the enemies. The core concept for Siegebreaker was born!

The reviews aren’t lying – for example at AppGamer.net, the game gets a 9 out of 10 for gameplay!

July 2010, Wouter Boudry – one of our prototyping specialists – started developing the prototype. As usual, a lot of questions were still open: How much screen space should the units take? Should all the enemies take the shortest route to the king, or should they rather swarm towards him? And most important: will the core gameplay be strong enough to be the foundation for a great game?

Left: The prototype graphics have been kept simple and clean, allowing to focus all budget and attention on the gameplay.
Right: Crazy Monkey Studios developed a vibrant art style featuring animated characters which were drawn frame-by-frame using old school methods.

To help answering these questions, we’re using our tuning system. This system allows us (and the customer) to play around with different settings and different feature combinations.

Left: The tuning parameters that were available in the prototype for the 'shotgunner' hero.
Right: In the final game, the heroes can be upgraded using power orbs.

While prototyping, we also discovered gameplay issues. For example, it could take a long time to make a unit to walk to a position on a nearby wall, having to follow the twists and turns of the maze. Wouter tackled this by allowing to build bridges between walls, allowing the heroes to move around more easily.

Left: Bridges form convenient ways to move to other parts of a level.
Right: In the final game, gates can be traversed.

Fast-forwarding to December 2, 2011, Siegebreaker has been released. They did a great job further extending the core concept for the full game, and came up with a colorful and vibrant art style. The reviews aren’t lying – for example at AppGamer.net, the game gets a 9 out of 10 for gameplay!

Left: When prototyping, we usually add simple messages to indicate the end of a level.
Right: The victory screen in the final game is simply hilarious and motivates the player to try it one more time.

Augmented Reality: Our Findings

When working with any new or existing technology – whether this would be HTML5, augmented reality, the Xbox360 Kinect, stereoscopic 3D or others – it’s important to know the technical limitations in order to assess the possibilities.

We’re happy to share some of our findings from our internal testing with augmented reality (AR) technology – the Qualcomm AR SDK for smartphones in particular.

A video of this technology in action can be seen in a previous blog post.
These are our findings:

  1. If you want your virtual objects to be displayed naturally in the real world, you’d have to set the light color and direction match these in the real world. There doesn’t seem to be an easy solution for this, but could be done by analyzing the images captured by the camera. When using marker images, a possible solution to get the appropriate light color may be to take the perceived color from white areas in the marker image and use this as the light color.
  2. When using marker images, you have to know that players can print these images at any scale they want – affecting the size of the virtual objects. This can be a problem for physics based games, as objects with different sizes behave differently.
  3. When a marker becomes visible, it takes some time until it’s recognized. This results in the 3D object popping up suddenly. One way this may be resolved or improved is by cropping the image from the camera when displaying it in the game, so the borders aren’t visible and the marker can be detected before it would be visible to the player.
  4. The detection of the markers can be slow, and virtual objects don’t properly follow when you swiftly move around your mobile device. This makes this implementation of marker-based augmented reality unsuitable for games where this kind of movements are required.

AR technology may trigger your imagination and you may come up with the wildest game concepts, but in the end it’s crucial to be aware of the technical limitations – otherwise it becomes very difficult to assess the feasibility of your ideas and to come up with solutions needed to realize these ideas.

Siegebreaker Announced by Crazy Monkey Studios

The “Undisclosed tower defense game with a twist” on our projects page is no longer undisclosed! The full game is called Siegebreaker and has been announced recently by our customer Crazy Monkey Studios (CMS).

Siegebreaker’s core concept was conceived at a brainstorm organized by PreviewLabs and was based on a prototype we developed for CMS.

We’re proud to have made our contribution to this game, and we’re glad to see how well CMS filled in the gaps that were left after the prototyping process; the story is really crazy, and the graphics – all drawn frame by frame using old school animation techniques – are very vibrant and colorful.

The following video is the game’s official trailer, showing the final game in action.

Siegebreaker is due for December 2nd and will be released for iPhone, iPod Touch, iPad and Android devices.

Dartboard AR Prototype Video

A few months ago, Jonas De Breucker was having his internship at PreviewLabs. One of the tasks for his research project was to create an example prototype using Qualcomm AR, a plug-in for Unity3D to allow development of augmented reality games on smartphones.

We’ve recorded a video demonstrating the example prototype developed by Jonas:

In order to help our customers develop this kind of games, it’s important to have a good insight in how the technology works, and to be aware of the resulting technological limitations.

An overview of some of our findings developing this prototype will be given in a future blog post.

Augmented Reality

A relatively recent trend in game development is augmented reality (AR).

In AR games, the real world is blended with a virtual world. This certainly is something that sounds very cool and triggers imagination.
However, until now there hasn’t been a real breakthrough, as the first mainstream AR game still needs to be developed.

In augmented reality games, the real world is blended with a virtual world. This certainly is something that sounds very cool and triggers imagination.

There are many different ways to create augmented reality (AR) games, often using image analysis. All of these methods are using a source of real-world images, such as a webcam or a smartphone’s camera.

Some of the possibilities:

  • Marker objects placed in the real world are tracked, resulting in a 3D position, orientation and scale that can be used to position a 3D object, which may be animated.
  • Using a device’s GPS and compass to determine the position of the player in the real world. This can be used for example to use real world positions for player interaction.
  • Image analysis can be used to recognize shapes and objects, such as the outlines of a building or corners in a wall, human beings or animals, cars, etc.

One of the first appearances of Augmented Reality I personally recall was in the 1987 movie RoboCop, where a fictional HUD commenting on real-world situations is shown.

A nice overview of possibilities that have already been tried out in games can be found in the augmented reality category at TouchArcade.

We have done substantial research on AR and developed an example prototype, which we’ll show in a next post.

2D Game Development in Unity3D: Overview

Continuing our series about 2D development and prototyping in Unity3D, we’re back with an overview of the different methods and their pros and cons.

Unity3D’s GUI class (previous post)

Pros:

  • Very fast to use: only line of code is enough to display an image – no other actions or setup involved.
  • Images can be displayed in a ‘pixel-perfect’ way.
Cons:

  • Bad performance on iOS: not suitable for if more than 30-50 have to be simultaneously visible on screen (each image consumes one draw call).
  • Using the physics engine is not possible without a workaround.
  • Additional code is required to support different screen resolutions.

Sprite manager systems like GUISpriteUI (previous post)

Pros:

  • Fast on iOS: textures can be easily combined into texture Atlases, potentially resulting in only one draw call.
  • Images can be displayed in a ‘pixel-perfect’ way.
  • Most systems allow positioning sprites in the editor.
Cons:

  • Slower to use: more code writing and setup involved.
  • Using the physics engine is not possible without a workaround.
  • Depending on the system used, additional code may be required to support different screen resolutions.

3D objects and orthographic projection (previous post)

Pros:

  • Allows using the Unity3D editor to build your levels.
  • Relatively fast UI on iOS and Android.
  • Easy access to the physics engine.
  • Easy to combine with other Unity3D features (e.g. particle effects, 3D animated characters and animation blending, …).
  • Your game automatically works under different screen resolutions.
Cons:

  • Performance can be optimized on iOS by using texture atlases, but requires additional setup.
  • Using pixel coordinates to define the scale and position of objects is possible, but makes it a lot harder (or impossible) to get decent results from the physics engine.

As you can see, each of them has its own specific advantages and disadvantages. This means there is no ‘best’ method; all depends on the needs of your project.

Reaching the Top 25 on iOS

After creating a great iOS game – using prototyping and everything – you’ll be ready to release it on the App Store.
But how do you make sure your game gets noticed by the players? If you only release it, and don’t do anything additionally to promote the game, the odds are high that it will become a commercial failure.

A while ago, I wrote about social game marketing and cross-promotion, primarily stating that relying on viral spreading for social network games alone is far from enough, and that cross-promotion (recommending other games within a game) is one of the keys to success.

On iOS, cross-promotion is widely used as well. One thing that’s different compared to social network games is that, on Apple’s App Store, games mentioned in the Top 25 Overall get a lot more exposure than games that aren’t.

Moreover, it’s likely that a nicely done game becomes a commercial failure if the game didn’t get mentioned in any of these lists.

In 2010, a marketing agency conducted a survey (with results published in this article in Casual Connect Magazine), and ranked people’s preferred methods to discover new Apps (this survey was not specifically targeting gamers):

  1. Top 25 Overall
  2. Categories
  3. Featured – New
  4. Featured – What’s Hot
  5. Search
  6. Featured – Personalized Recommendations
  7. Ads in Other Apps
  8. Most Popular Topics

So in order to be really successful on iOS, you’ll have to make sure your game gets listed. For example, you may need about 40k installs in a 24-hour period to get into the Top 25 Overall Free on the U.S. App Store.

And how can you get such a huge amount of installs in 24 hours? By using a short burst of advertising and cross-promotion, or as the marketing agency who conducted the survey mentions on their website:
“We do this by recommending quality, useful apps during installation or at other appropriate times, like achieving levels during gameplay, allowing advertisers’ apps to be discovered and installed.”

Whether it is to self-publish your game, or to know how to recognize a good iOS games publisher – If you’re serious about the launch of your iOS game, I warmly recommend reading the Casual Connect magazine article.

Just as there are several services for cross-promotion for social games (as mentioned in my earlier post), there’s also plenty of choice on iOS – the following article lists some of the options.

2D Game Prototyping in Unity3D: Orthographic Projection

After having discussed Unity3D’s GUI class and the GUISpriteUI system as two different methods of creating 2D games in Unity3D, we’re now ready to discuss a third method: combining 3D graphics with orthographic projection.

For this to work, you’ll have to create a scene in 3D, and then set up the camera to use orthographic projection instead of perspective projection.

If all you want is to use 2D textures, you can simply create cubes and assign them materials with these textures.

The fact you’re using a 3D engine to create your 2D graphics actually allows you to do more than that; the possibilities include using the physics engine, or use 3D animation blending for your characters.

To set up your camera correctly, you have to set Projection to Orthographic, and you have to set the Orthographic Size.

Especially in prototypes where the physics engine needs to be used, this can come in very handy. The following video gives you a peek behind the scenes of the Gremlin and Bayou Bird prototypes:

The fifth and last post in this series about achieving 2D in Unity3D will summarize the advantages and disadvantages of the different methods, so you’ll know which method to choose depending on your needs.