Tuesday, June 11, 2013

Unity3D on Android

When porting a unity3d game to Android, one of the main issues is textures.

Textures are completely black - so you see a black screen instead of the default unity`s blue, and textured meshes seem invisible.
Or textures are almost completely grey

1. Create multiple APK`s. each uses the right compression.  For example HTC-Desire HD phone has a Qualcomm snapdragon GPU which supports "ATC" compression.
This step is only in the build (few separate builds)

2. On some devices, this will still not solve the problem. In that case, on the texture import settings, on "Texture Type" choose "Texture" instead of "Advanced"  and Format="Compressed".
On the build-settings, choose "Don`t override".

Override for Android and textures (from here)
ETC supported by all, but no alpha, which is very important for games.
DXT supported by Tegra.   [Asus-transformer]
PVRTC support by Imagination PowerVR
ATC supported by Qualcomm snapdragon  [HTC-desire-HD]
RGBA 16 means 4096x4096=32MB
RGBA 32 is what will become of unsupported compression type per device (put DXT texture on non-tegra and it will expand to 4096x4096=64MB and take lot`s of memory!!!!)

Android Build (from here)
There is an option "Texture Compression". By default, Unity uses ETC1/RGBA16 texture format for textures that don't have individual texture format overrides.

Sunday, January 6, 2013

Free-To-Play buisness model

Free-To-Play business model


When to use it?

  1. If the platform you are using requires high number of downloads for easy discovery, like Android/iOS app-stores , chrome-store , browser plugins/extensions.
  2. If your audience is a "first-time" gamer, which never payed for a game - as this is a great barrier for download.

What part of the game will cost?

  1. For single-player games:
    1. [strong]  some levels are free. You need to buy the game to unlock a bulk of additional levels.
    2. [medium] some levels are free. You need to buy levels , one by one. It`s a bit weak as if the user need to buy 0.5$ level two times in an hour, s/he will think again whether to buy the next one.
    3. [weak]  customization

  2. For multi-player games:
    1. [strong]  unlock hero-type
    2. [medium] customizations which are apparent to other users.
    3. [weak ]  experience-boost / weapon-boost.

Unity Networking is easy? part -2-

For a FPS-like game, a good networking implementation need to have few points:
[It`s a summary of  a article on HalfLife networking]

  • Client-predication - user input cause immediate change in the game , but can be fixed later in the server overrides it.
  • Interpolation - always add a delay of ~100ms to all other-users. Even if their ping is really small. Thus when you draw their location you will interpolate real, past positions with the exact positions.
  • Extrapolation - on in the case of severe latency problems, the interpolation delay may not be enough and you simply don`t know where the user is right now.  Here you extrapolate future location from the last known ones, but as with any extrapolation, it`s not accurate.

  • State calculations and communications.
  • lag compensation - if you trust client shooting-report, no need for this.
    If you don`t and you want to prevent this type of cheating, you will need to get the shooting direction and calculate hits yourself.  As the client is running in old-time, you will need to "re-wind" the players positions and calculate the hit in the old times.

Monday, November 19, 2012

Unity Networking is easy? part -1-

Decisions, Descisions

There are quite a few solutions to Unity3d multiplayer frameworks. The bottom line is you can use the free unity3d native networking for basic-needs or 3rd-party solutions for a cost. I used the free version for prototyping purposes. more details on this towards the end of this post.
I will go over 3 of the options. If you want a more in-detail explanation,see: comparing photon, uLink and unity3d and,  This table includes a dozen options.

Unity itself 

Out of the box unity provides networking-libraries, ability to run a unity instance as a dedicated/non-dedicated server, which you need to host yourself , and a "lobby-manager" called the Master-Server which is hosted by unity and good for low-scale.
Cost : code is free, hosting is not.
Problems:  unkown scale, not-very-mature-code, see:


Non-unity specific which means server code can`t use Unity physics/colliders.
For very low-scale, provide SaaS (PhotonCloud). but it`s limited to 500 message per second per room, which means, for a fast-moving game (15 update FPS) only ~5 users.  Also the SaaS solution limits the server-logic.
For larger scale or more server-logic freedom, you need to rent and install a dedicated server.
Cost : small PaaS free . For bigger it costs per server and hosting.
Problems: non-unity server-logic, SaaS is impractical for fast/big games.


Unity based MMO Server, which built upon and improves the problems/scale of Unity libraries.
Cost : for indie 550Euro per title license. hosting not included..
Problems: the cost.

Monday, December 7, 2009

AirBorn Unreal3 mod

One of the best (Indi) art world

video in: http://www.moddb.com/mods/airborn/videos

Thursday, March 26, 2009

Sunday, December 14, 2008

The missing link - a service proposal

After you read the last blog entry it is clear that small casual-games studios are having hard time earning their keep using advertising/sponsorship.
Downloading the full version of the game does seem to produce a nice revenue stream , but is mainly done in the large publisher sites , allowing them to collect "humongous" percentage of the profits.

One solution comes in mind ...
Allow a developer to sell "serials" or "unlocks" for online game versions without the need to download a game version.
Use a service-model (like the "MochiAds") instead of the publisher model , allowing the studio to post the game to the publisher site , egonistic to which publisher is it.

Very high level architecture
  • Client side - release public flash API (AS2/3) which allows locking certain features , buying an unlock-code online and submitting it to unlock the game in real-time.
  • A server side - customized billing site per game , and a submission site allowing users to configure their game for unlock purchases.
This service earns money by taking a small commission on each unlock-buy.

Time frame: few part-time months of coding.

If it is so simple , why it was not done already?

Not certain.
For the big publisher , the reason is probably that they will not benefit from such a service - on the contrary : they may loose potential buys because they will be performed outside their domain.
For any individual development studio, it is not worth the effort for one game (and may even get them in trouble with the publisher)
But it looks as an ideal service for the independent casual developers out there , and unlike the hardcore-independent game industry (which is unbelievably small) , on the casual market their numbers are quite substantial.