My Portfolio
Color Dragon

A full mobile game project

Concept

This project was made with severals objectives, this is a portage of my previous 2D color puzzle game in a 3d game. It is also a publlished game on the android store and the goal was to integrate Ads.

iPhone app
            preferences selection screen
iPhone app
            preferences selection screen

Objects Pooler

The object pooler concept is used for the little rabbits. ths allows the game to manage memory for the mobile device. It is just a init and a get methods.
The script is then attached to the prefab of the rabbit GameObject.

Ads Integration

There are a lot of different system to integrate ads in a game but Unity has a native library with the UnityEngine.Advertisements. It uses Listeners to manage calls to the Ads server.
The ads will play when a game ends, if the ads already started it wont launch a new one.


_______________________________________________________________________




using UnityEngine.Advertisements;

public class AdManager : MonoBehaviour , IUnityAdsListener
{

public string myGameIdAndroid = "4272665";
public string myVideoPlacement = "RewardToContinue";
public string myAdStatus = "";
public bool adStarted;
public bool adCompleted;

private bool alreadyShown = false;

private bool testMode = true;
ShowOptions options = new ShowOptions();

private void Start()
{
    Advertisement.AddListener(this);
    Advertisement.Initialize(myGameIdAndroid);

}

private void OnDestroy()
{
    Advertisement.RemoveListener(this);
}



public void PlayRewardedAd()
{

    if (!alreadyShown)
    {
        if (!adStarted)
        {
            Advertisement.Show(myVideoPlacement, options);

        }
      
        UI.instance.ActiveBlock();
        alreadyShown = true;
    }
      
    
    

}

public void OnUnityAdsDidError(string message)
{
    myAdStatus = message;
}

public void OnUnityAdsDidFinish(string placementId, ShowResult showResult)
{
    if( showResult == ShowResult.Finished)
    {
        GameManager.instance.ContinueWithRewardedAd();

        UI.instance.DeactiveBlock();
    }
  

}

public void OnUnityAdsDidStart(string placementId)
{
    adStarted = true;
}
_______________________________________________________________________
              

iPhone app
            preferences selection screen

Difficulty Management

The game will spawns a limited number of rabbits. If the player is not quick enought the stock will deplete pretty fast. The score system evolve with time as the passing points to unlock the "Eat" button.

Conclusion

The game suffers from the same issue as th 2d counterpart. The colors of the backgrounds are pretty dull because we need to give highlights to the rabbits.
The backgrounds receive a natural light in the 3D space when the characters use a toon shader that will simulate the light without any source.
The camera view could be improved as it is sometime tricky to clic on the rabbits at the back row.
Unity gives very good tools for mobile dev as Device Simulator and Ads system.

iPhone app
              preferences selection screen