Eggcellent Defender - My Unity game

Hi all

After completing the Block Breaker tutorial, I figured I would try make my own basic game. This is what I came up with:

Google Play Store

Web Build
(The graphics are build for Android so click the mouse to start and use the arrow keys to move)

I believe I learnt a lot by trying to create my own game. See if you can beat my high score of 152!

1 Like

Hey Adsie, great animation, cute !
Nice twist on the block breaker idea, well done.

I only got 52 :frowning:

I really liked it to :slight_smile: got 61! How did you learn to make it into an android game?
I to made a simple game (even simpler than yours) after completing the blockbreaker game. Have a look if you want click

I agree that you really learn alot when actually using what this course teaches and not just follow along. Keep up the good job and looking forward to see more of your games get posted here :slight_smile:

Thanks Hundred-Handed

I am definitely no artist but was quite happy with how it turned out especially since I didn’t know how to use Photoshop before I started.

LuckieLuuke

Thanks for trying it.

I ended up looking up tutorials on how to make an Android version. As I progressed further through the course I found Glitch Garden covers mobile development a lot better then most tutorials I was using at the time.

However for me at this point it was:
Install Android SDK, changed build setting to Android, choose a suitable resolution and build to my phone. After this I found the buttons on Unity already worked with a touch screen so I just need to work out my controls. I looked up a few things and ended up with the follow:

void Update () {
		if (Input.touchCount > 0) {
			touchPos = (Input.GetTouch (0).position.x) / (Screen.width);
			
			if (touchPos <= 0.5) {
				position.x += -1 * Time.deltaTime * speed;
				position.x = Mathf.Clamp (position.x, -2.7f, 2.7f);
				transform.position = position;
			}
			
			if (touchPos >= 0.5) {
				position.x += 1 * Time.deltaTime * speed;
				position.x = Mathf.Clamp (position.x, -2.7f, 2.7f);
				transform.position = position;
			}	
		}
	}

I had a look at your game and thought a similar control might be suitable if your trying to make it for Android.

Privacy & Terms