Posts Tagged 'Unity3d'

Unity Android and OpenGL ES 2.0 – another cautionary tale…

In my previous post I mentioned how excited I was to finally get over a huge crashing issue I had with Zombie Room AR. While that post is still completely accurate, my total celebration was a little premature. A couple of days after pushing out the latest fixes I got another email from a user experiencing a crash… Seriously!? I just.. but I… come on…

So here I sat with ANOTHER crash happening – this one was crashing in the exact same way, and once again it wasn’t putting together a report of a stack trace for me to find the underlying problem. Whiskey sure is tasty! Continue reading ‘Unity Android and OpenGL ES 2.0 – another cautionary tale…’

Advertisements

Fighting Piracy…

A few weeks back I noticed a sharp decline in sales for Zombie Room AR. I’ll have zero sales days for a couple days in a row now and again, but typically they pick back up as another university or country finds it.

After I hit 6 days in a row without a sale, I decided to check around and see if I could find out why. I looked through the noyoushutupgames.com visitor stats and saw that target image was still being downloaded around 10-50 times per day.  I looked at the free version downloads, and they had pretty much dropped down as well, so it wasn’t making much sense.

I dug through the referrers and found a Russian blog that was sending people to the target image. Upon visiting the blog, and much to my chagrin, I found a direct download to the full version of the game.  Interestingly enough, they had revved the version number too!  (Real Full Version is 1.1.1, Pirated is 1.1.2) Continue reading ‘Fighting Piracy…’

Accessing the Android Compass through Unity 3D.

OK, let’s go ahead and get this out of the way. This post is not for beginners or the faint of heart. There is no way to access Android’s Magnetic Field Sensor (aka the compass) directly from Unity, so in order to do that we’re going to have to write a custom plugin. This is not an easy task, and I honestly don’t know how well I can explain it – so… stick with me and hopefully we’ll get through this together. (Note: At the time of this writing I’m using Unity 3.4 so if you’re a traveler from the distant future, I don’t know how much of this will still be valid)

Quick Overview of custom plug-ins:

Writing a custom plugin is very poorly documented, and anyone who does it pretty much has to figure it all out by themselves. For Android, here’s the process:

1. Write a custom Java jar file.
2. Write a C(++) library using JNI to access the jar file and compile it into a .so file using Android NDK
3. Import the DLL (.so file) into C# script inside unity and access all the magic.

Now, I’m not that great of a C developer, so I opted to do the following instead:

1. Write a custom Java jar file.
2. Use the AndroidJNI helper function embedded in Unity to access the jar file.

The latter method is the one we’re going to use today. Continue reading ‘Accessing the Android Compass through Unity 3D.’

Night Runner – Free Unity Android Game

I’ve been working on several games that require heavy use of the accelerometer functions in Android devices and while I was refining my methods I came up with a simple casual game idea. After about 6 hours of work I had “Night Runner” – a fast paced accelerometer casual game!  Since my dev time on this was really really low I decided to launch it for free (no ads or anything) in the Market Place, just so people could have something fun and simple to play.

More info here

 

Unity and Android’s GPS

Here’s something that frustrated me for about an hour. Hopefully this will help anyone else who wants to use the GPS with Unity Android since the documentation doesn’t have any examples… not to mention the answer is pretty confusing.

I’ll save you the long story and show you exactly how it’s done. The first thing we have to do is start the iPhoneSettings.StartLocationServiceUpdates function.  Yes, I know you’re on Android… you  have to use this function anyway.  Here’s a test script for you – put this javascript on your main camera and do a test build.

Continue reading 'Unity and Android’s GPS'

Unity & Me

I’ve decided to set up a development blog to document some of my adventures in Unity 3D.  Since I’ve spent the majority of my time deving in flash I was skeptical on switching to another platform for web gaming.

My friend Brad told me that Unity was the wave of the future and much more forgiving and rewarding than flash.  After several drinks I decided to give it a go. It’s free, it’s not that large of a download, and there’s a small but descent community to help out when you get stuck.  I went ahead and installed it.

I’ve got to say, I’m a 2D guy. I love digitizing characters mortal kombat style. I love side scrolling beat-em-ups. I didn’t think I was going to dig this.

First off, the software looks slick. By the time I got started they were already at version 2.6.1, and it’s pretty sexy. I went through a few tutorials, and the biggest problem I had is assets.  In the 2D world I have no problem whipping up something in Fireworks for PS… but what was I going to use for making 3D assets?  Luckily there are a lot of free 3ds and maya models available on the net.  They’re not all that great, but they’re great for learning how to use Unity.

I downloaded Blender so I could make my own models, but I’ve got to say it’s not very intuitive to the beginner.  The trial version of Maya definitely suited me better.

So now that’s where I am. Part designer, part modeler, all dev and ready to start releasing some games.