Galawana Studio » Game Development

Hiero Match : Speeding Up The Timer Whenever Tiles didn’t Matched

Unity 3 Blueprints

Unity 3 Blueprints

Hiero Match is a Matching/pairing game ‘tutorial’  using unity3d from the book UNITY 3 BLUEPRINTS, written by Craig Stevenson and Simon Quig, and published by Deep Pixel. This tutorial start from chapter 2 and finished to chapter 3.

In this post, I will show you how to add timer effect to the game whenever tiles didn’t match the timer is speeding up.  we would need complete game project files from the book, you can download it here.

First we add new variable with GUIStyle Type to store new Font Style, a variable to store how much time is decreased during gameplay and also a variable to save state when time is speeding up or no. here is the example

//variable to store how much time was decreased during the gameplay
var timeDepleted = 0;
//variable to save state whenever time is speeding up or no
var isTimeDecreased = false;
//variable to store a Gui font style
var Style : GUIStyle;

Now we have 3 variable we need to create our timer effect. Then we need to change font-style to our GUI Label whenever isTimeDecreased state true. Put this code into our onGUI() function, and change the line to show Timer Label into this code below. (more…)

read more

Hiero Match : Adding Exploding Particles Whenever Tiles Removed

Unity 3 Blueprints

Unity 3 Blueprints

Hiero Match is a Matching/pairing game ‘tutorial’  using unity3d from the book UNITY 3 BLUEPRINTS, written by Craig Stevenson and Simon Quig, and published by Deep Pixel. This tutorial start from chapter 2 and finished to chapter 3.

In this blog, I will show you how to add exploding effect to the game whenever tiles removed.  we would need complete game project files from the book, you can download it here.

First we add new variable with Game Object Type to our tileGenerator.js script. This variable will be our GameObject to be called when we removed particle. here is the example

//define variable explosiveObject with GameObject type
var explosiveObject : GameObject;

Note that explosiveObject is still empty GameObject (none), we can assign it later.

Explosive Tiles Hiero Match

Explosive Tiles Hiero Match

After that we would Instantiate explosiveObject whenever we destroy our tiles, so we call method Instantiate(GameObject, Position(Vector3), Quaternion.identity) to create our explosive particle effect object to our scene. We will put this “Instantiate” code before we destroy our tiles object and when we get a match. For our case we put Instantiate method inside revealCardTwo() function, we must put it after we check that Object1 and Object 2 is paired/get a match and before we destroy object1 and object2. here is the example  (more…)

read more

Hiero Match : Add New Challenge “Shuffle Tiles”

Unity 3 Blueprints

Unity 3 Blueprints

Hiero Match is a Matching/pairing game ‘tutorial’  using unity3d from the book UNITY 3 BLUEPRINTS, written by Craig Stevenson and Simon Quig, and published by Deep Pixel. This tutorial start from chapter 2 and finished to chapter 3.

In this blog, I will show you how to add new challenge to the game. First things we want to add to a Matching/pairing games is shuffle the paired tiles/cards everytime we playing the game. First we would need complete game project files from the book, you can download it here.

 

Hiero Match

Hiero Match

//randomizeArray function is simplest way to shuffle array valueSo we could started to add new function called ‘RandomizeArray’ to our tileGenerator.js script. Here is the complete function of randomize array function :

//the basic idea was Fisher–Yates shuffle algorithm
//by exchanging value a[i] to a[random]

static function RandomizeArray(arr : Array)
{
    //iterate array backwards
    for (var i = arr.length - 1; i > 0; i--) {
        var r = Random.Range(0,i);
        var tmp = arr[i];
        arr[i] = arr[r];
        arr[r] = tmp;
    }
}

That’s all, other thing you need is to called “randomizeArray()” function at the top of the Start() function. (more…)

read more

[WIP] Phisis – “Box of Knowlege” Board Game

phisis-character

Educational Game of physic and mathematics (GEMASTIK 2010 Finalist)

Phisis is game project created by Randy Galawana (me), Singgih Kuncoro, Bayu Munajat and Muhammad Fajar to be submitted on Gemastik 2010 Game Development Challange. This game is board-like game which using mathematics and physic problems as the challange player must solve to advance in game. This game became finalist at Gemastik 2010. This phisis game created using XNA 3.0 Engine  (more…)

read more