Showing posts with label #mobilegames. Show all posts
Showing posts with label #mobilegames. Show all posts

Tuesday, October 4, 2016

Wool is the fuel available on GooglePlay

My latest game is a bit retro, it's like the classic old Defender game. 

It uses my system for Parallax scrolling the backgrounds, you get a HUD to see what alien is going for your sheep.



It has been written in Unity 3D,
I've written all the music myself in Ableton Live 9 lite.
For the sound effects I've used SONiVOX's Twist & Wobble.
The animations were made in Spriter by BrashMonkey the backgrounds and explosions were from their art packs.


Here is the video

Sunday, August 21, 2016

Mutant aliens

When an alien takes a sheep up to the top of the screen it shears the sheep and becomes a fast moving alien mutant. 
What I want is for the mutants to go after the player. To do that we subtract the 2 positions vectors, giving us the difference between the 2 points. I wanted to use that to then set the direction of the mutant. I discovered there is a function normalized that does just that, so here is the code from the FixedUpdate() to do that. By placing it in the FixedUpdate it will continually change course towards the player.

if (IsMutant)
{
    var delta = player.transform.position - transform.position;
    direction = delta.normalized;

}

Aliens take sheep to top then change into Mutants

Saturday, August 20, 2016

Attack Waves

In defender all of the baddies don’t all arrive at once there are a number of waves per level. So to do that when instatiating the baddies I'll have a delay between them.

In a previous blog on the development of Rhino roll I used Editor scripting to help create the levels. So I’ll do the same here again. 

Here is my code to create an array of objects in the editor script.

    static void ObjectsToArray(string objType)
    {
        var Code = "private Vector2[] " + objType + " = new Vector2[] {";
        var objs = Selection.gameObjects.OrderBy(go => go.transform.position.x);
        bool IsFirst = true;

        foreach (var item in objs)
        {
            if (!IsFirst)
                Code += ", ";
            else
                IsFirst = false;

            Code += string.Format("new Vector2({0:0.000f}, {1:0.000f})", item.transform.position.x, item.transform.position.y);
        }
        Code += "};";

        print(Code);
    }

Here is the code to add the Menu Items to the IDE of Unity and call the function 

    [MenuItem("Adz/Util/SheepToArray")]
    static void SheepToArray()
    {
        ObjectsToArray("Sheep");
    }

    [MenuItem("Adz/Util/LandersToArray")]
    static void LandersToArray()
    {
        ObjectsToArray("Landers");
    }


The idea is to move the landers aboout, duplicate new ones et.c. then select them all and call the LandersToArray function, like below.

Here is the code automatically generated by the function call. Saves so much time when designing levels, in my opinion.

    void Level1Wave1()
    {
        Vector2[] Landers = new Vector2[] { new Vector2(-48.800f, -0.140f), new Vector2(-42.200f, 1.560f), new Vector2(-11.880f, -1.120f), new Vector2(-5.680f, -0.440f), new Vector2(-0.080f, 2.320f), new Vector2(0.020f, -1.850f), new Vector2(3.500f, 1.560f), new Vector2(24.200f, 0.960f) };
        Vector2[] LanderDirections = new Vector2[] { new Vector2(-0.240f, -0.074f), new Vector2(-0.933f, -0.997f), new Vector2(0.489f, -0.842f), new Vector2(0.702f, -0.403f), new Vector2(0.700f, 0.146f), new Vector2(-0.497f, -0.331f), new Vector2(-0.186f, 0.392f), new Vector2(-0.868f, 0.386f) };

        DoLanders(Landers, LanderDirections, .02f);
    }


Then in the fixed update add the code to invoke these functions after a given time.

        if (CurrentWave < Waves.Length)
        {
            Waves[CurrentWave]--;
            if (Waves[CurrentWave] == 0)
            {
                CurrentWave++;
                var wave = string.Format("Level{0}Wave{1}", CurrentLevel, CurrentWave);
                Invoke(wave, 0f);
            }
        }

As before here is a video to demonstrate. It has 2 attack waves from the aliens. I haven't done any fancy animations for the materialisation yet.


Saturday, February 27, 2016

Shuffa Brick game released.

I've just released Shuffa Brick my new physics based Break out game on Google Play.


 Shuffa Brick on Google Play

Shuffa Brick is a new physics based Break-out style game, except you do not use a paddle to hit the ball. You touch the screen slide then release.


Clear all bricks to complete the level.

Shuffa Brick can be played with just the touch of one finger. 
You touch the screen of your phone or tablet, slide back and release. 
This will rebound the ball in the opposite direction. 

See how you rank on Google play leader board.
Unlock all achievements.

One level only included, let me know if you want me to create more.



YouTube trailer for Shuffa Brick