Tuesday 7 August 2012

Pause-Resume-Restart!

Tonight I finished the functionality of the pause system.

It's super simple.




As you can see, there's a big red pause button in the corner of the main screen. The controls have been normalised so you get no benefit by pressing in the corners, (there's a fixed radius from the centre that gives you maximum directional force), so it doesn't interfere with play at all.

The game pauses the frame you hit the pause button. I had it so that you had to hit and release the button to trigger pause, but that just slowed things down, and Mike would fly off until you let go.

The pause menu has just two choices, Resume and Restart. Both trigger on first hit, which is super important for the resume button as the next frame you're controlling Mike. If I had it on release, you'd have to quickly re-press the screen to stop Mike falling, and potentially picking up a collision!

Restart is pretty simple too. It just reloads the level into its initial state.

The result of this attention to minute detail is that I then played the demo level non-stop for a good 10 minutes, trying to get the quickest perfect level possible. The ability to restart so quickly when you take a wide line or narrowly miss a gem is fantastic. The ratio of play-to-presentation is enormous. There's no 3-2-1-GO, just GO!  :)

I also got a rad highscore on the Android tablet...


Nice!

Thursday 2 August 2012

Out Of Bounds Warning!

Tonight I went out for a drink...

But on my return I was determined to make some kind of progress...

And so I tackled the least difficult task going. The Out-Of-Bounds warning indicator.


It works by notifying the game monitor when you leave a box that contains the inner area of play, (as notified by OnTriggerExit). An OOB warning indicator script asks the game monitor whether the player is the inner area and displays the rad sign if they aren't.

The script "un-notifies" the game monitor when OnTriggerEnter fires.

Easy!



Wednesday 1 August 2012

Demo...!

I'm happy enough with the concept level that you can all play it.

Demo is here: Chopper Mike Demo



Enjoy!

Tuesday 31 July 2012

Restartability...!

I've made a few changes, and the game's become super restartable and replayable!

I added the concept of a perfect run, where you get all the gems and don't collide with anything. Which then leaves the challenge of completing the level as quickly as possible. It's so addictive :) I had to keep going until I beat 10 seconds, (and I know there's a sub 9 second run int there...).




Spent half my time wrestling with timers in Unity. Then I found Time.realtimeSinceStartup, the timer I had been looking for all along, (as I'm scaling time with Time.timeScale, which makes Time.deltaTime somewhat smaller than I'd like...!).

Next up is a pause menu and a post-results menu. Then probably a bit of UI rejigging, as it is a bit cramped, especially on my phone!

Monday 30 July 2012

Results screens!

I had a tiny window to make some sort of progress today, so I went for an easy option: feedback on what's already implemented. I now have readable Dead, Out-Of-Bounds, and Results screens.

I went for a "straight-to-the-point" kind of style, as you can see from Figure 1...



Figure 1. You, well, you died.



It's done with a GUI box that fills the screen, and a GUI label in the middle.

Pretty happy with it!

The font is a Google web font called Asap.

The only annoyance is that if I want to use it at a smaller size I have to make a copy of the font and reimport it... I can live with that, and besides, I'd probably pick a different font for the more detailed information, such as timings and points breakdowns for the results screen.

Saturday 28 July 2012

Death, Timings and Out-Of-Bounds

A busy night!


I have finished implementing a nice little state system for the level. There's a placeholder pre-level state, the main game state and a results state.

The state system inspects a game monitor object, which is in turn notified of important events, such as when the helicopter touches a deadly red object. This is a nice way of stopping things messing with things they should know nothing about. The helicopter shouldn't know about the state system, as once it does, it could mess with it. All the helicopter can do is tell the game monitor that it's hit an object. No danger there!

I've also implemented a neat little out-of-bounds checker. I added an empty game object and added a collision box to it. I marked it as a trigger so that Mike wouldn't physically collide with it, and resized it to fit the whole level, plus a bit of padding. I then added this script to the object:


using UnityEngine;
using System.Collections;


public class OutOfBoundsScript : MonoBehaviour
{
GameObject m_heliGO = null;
GameMonitorScript m_gameMonitorScript;


void Start ()
{
m_heliGO = GameObject.Find("HeliCube");
    m_gameMonitorScript = GameObject.Find("GameMonitor").GetComponent("GameMonitorScript") as GameMonitorScript;
}

void OnTriggerExit( Collider other )
{
if( other.gameObject == m_heliGO )
{
// out of bounds!
m_gameMonitorScript.notifyOutOfBounds();
        }
    }
}



All it does is cache the helicopter and game monitor on start, then when the heli exits the trigger it notifies the game monitor. Simple!

The state machine then asks the game monitor whether out of bounds has been detected and it kills the game. Nice one!

Messy Intro

Welcome to the dev blog of Chopper Mike, a touch-based helicopter game for Android, (and maybe iOS).

I'm Jamie Lowes. I've been programming games for years and I recently started my own development company, (jamielowesdev.com).

I'm in the process of getting all my bits of Internet connected. Once it's all sorted, this will be the place to read small articles detailing the development process of my game.

You can also follow me on Twitter, (search for @jamielowesdev or #ChopperMike), where I'll be posting micro-updates, as you can't write all that much in 140 characters.

Videos will be posted to my youtube channel, (www.youtube.com/user/jamielowesdev).

So far, the game looks like this:



Right. Enough writing about it. Time to actually write it!