Gamieon

Christopher joined Mar 14, 2009

Gamieon is a privately owned entertainment software development company located in Tampa, Florida. Since October of 2004, we have aimed to provide quality video game software which emphasizes both intellectual and action-driven challenge to the gaming community. Gamieon depends on the talent of individuals working as a team to develop video games and video game engines with a focus on exceptional game play and surrealism.

Blog RSS Feed Report abuse Optimizing Unity iPhone/iPad app physics usage

0 comments by Gamieon on Jul 1st, 2011

Hyperspace Pinball's recent iPhone 3GS performance was lackluster at best. According to the standard profiler: At the start of a game where eight enemies were floating around and the ball was at rest, the amount of time physx is taking per frame averages 6.1 while scripting Updates() took between 8 and 10. What could be going on with physx to make it so time intensive? Well, I figured it out; and managed to get the usage down to 3.5. I'll now share with you how based on my own experiments and content from:

Unity3d.com
Roperacket.tumblr.com

1. Colliders - Remove unneeded colliders and combine colliders into one.
I did this earlier; so no changes here.

2. Overlapping colliders can produce as many as 3 solving iterations per each frame so pay special attention when forcing position on an object with a collider.
This was definitely a problem. I had a lot of overlap in the colliders that confined the aliens to the center of the playfield. I simply fixed the overlap without changing the inner bounds.

3. Use simpler colliders – sphere is simpler than cube, which is simpler than mesh collider.
I noticed some of the playfield colliders were mesh colliders shaped like boxes. I also noticed the curved edges of the bottom bumpers and side "bumpers" were making things add up. I solved this by replacing mesh colliders with box colliders, and also going into 3DSMax 3.1 (yes, 3.1), making simple shapes, exporting them, and importing them in as invisible mesh colliders to replace the existing colliders. I'm fairly sure this got me the biggest performance bump.

So after steps 1-3, the average physx time went down from 6.1 to 5.2. That wasn't as big a drop as I had hoped for, but I'll take it! 

I was about to give up until I stepped away for a while, and suddenly step 4, which I didn't see in any optimization suggestions that I read before, came to mind:

4.  Turn off unnecessary layer a-layer b collisions
The enemies were doing collision checking against the playfield. The problem with that is I already fenced in the enemies with box colliders so they would never actually touch the playfield! So, I went to the Edit menu => Project Settings => Physics, then disabled Enemy Latyer-Playfield Layer collision detection, and ran a test:

The average physx time went down to 3.5!

Definitely a good sign. After that, I went through the entire physics matrix looking for anything else I could optimize. The only other item layer that needed correcting was the power-up ball, which is also fenced in by the same boundaries.

So, good progress all in all. I'd like to go for 2.5, but for now I'll turn my attention to optimizing how I use the Vectrosity wireframe glow engine (thats how the enemies get their glow. Check out the engine at Starscenesoftware.com )

Report abuse Building my Unity 3 iPhone/iPad App on XCode 4.0.2

0 comments by Gamieon on Jun 25th, 2011

Now that I'm using XCode 4.0.2 and Unity 3.30f4, I see that a lot of things have changed since my XCode 3.x and Unity 2.x excursion. Some things I noticed right away:

- No more one-click build-and-debug sessions. I now have to do Build & Run from Unity, and then press the Run button in XCode 4.

- It takes less steps to build an app for ad-hoc deployment. Most of the settings are what they should be off-the-bat.

So now it's time to start giving out ad-hoc builds of Hyperspace Pinball. Here is the list of things I now do in XCode after I click "Build & Run" from Unity:

1. In the Classes node in the tree on the left, go into appcontroller.mm and ensure USE_OPENGLES20_IF_AVAILABLE is set to 0.

2. Left-click on "Unity - iPhone" on the top left of XCode

3. In a pane just to the right of where you clicked there should be a "Targets" section with "Unity - iPhone" and "Unity - iPhone-simulator". Left-click on "Unity - iPhone"

4. In the Summary tab- Ensure the first four parameters are correct. My identifier is "com.gamieon.{the name of my game all lower-case and without spaces}"- Under supported device orientation, uncheck everything but Portrait.

5. In the Info tab- Rename the Bundle display name to "Hyper.Pinball". I have to do this, otherwise it looks like "Hypers...nball" in the iPhone menu.

6. In the Build Settings tab- On the top left is a toggle for "Basic" and "All". Ensure "All" is selected.- Architectures: armv6.- Build Active Architecture Only: No- Valid Architectures: armv6 armv7- Code Signing Identity: Hyperspace Pinball Ad Hoc- Everything under Code signing identity should also be Hyperspace Pinbal Ad Hoc.- iOS Deployment Target: 3.0

(all but the provisioning profile were all set for me, but just double check)

7. In the Build Phases tab, add GameKit.framework if it's not already listed.

8. Press Command-B to build.

..and that should be it. I'm foregoing forcing MinimumOSVersion in info.plist with the value 4.0 for the moment. I want to see how testing pans out.

Report abuse Lessons from Tiltz to apply to Hyperspace Pinball

0 comments by Gamieon on Jun 3rd, 2011

On occasion, I'll e-mail other Dominoze team members updates on what I'm doing at Gamieon while that project is on hold. One of those e-mails had what I think was a wealth of ideas that I should consider before releasing Hyperspace Pinball. I decided to tidy them up and repost them here in a blog so I can look back at it from here instead of digging through my sent e-mail:

  • Marketing: YOU must be the one to control YOUR message. If you don't do it properly, then the market will control the message despite you.
  • To maintain continuous downloads, there must be continuous marketing from the source.
  • Always find people; not necessarily ones you know, to test your game before release. (i.e. iBetaTest.com)
  • If your app is > 20 MB, you likely lose impulse iPhone-based buyers who have no Wi-Fi.
  • When in doubt, add that extra free content to your game. Too little free content will kill it; remember that you're competing with thousands of free games that can come with weeks worth of content.
  • Not everyone finds ads annoying; in fact, they may just click on them!
  • Just because it's mobile doesn't mean you won't have to deal with wildly varying behavior between hardware models
  • Don't equate opinions with solid research. Get out there and look at other peoples' games, see how well or poorly they do, and read the reviews, ratings, and developer blogs. Learn the right and wrong ways to do things and be able to cite examples. If you don't want to, or don't have the time; ask someone else to do it for you in return for compensation.
  • Don't expect backwards compatibility when upgrading API's and toolkits.
  • You can't do promos with In-App purchases on the iPhone.
  • If you want to have your In-App purchased game reviewed, have a way to give it to the reviewer without making a special app.
  • Reviews can counter bad ratings....provided you can actually get your game reviewed.
  • In-App purchase game ratings are confusing. People are rating the full version based on their experience with the free one.

Your feedback is welcome!
 

Report abuse Porting Hyperspace Pinball to the iPhone: Part 1

0 comments by Gamieon on May 20th, 2011

When developing a cross-platform game with Unity, one must not forget that performance wildly varies from one platform to the next. One of the factors that determines performance is the number of triangles rendered per frame.

Consider Hyperspace Pinball. Once all the levels were finished, I copied the project from my PC to my Macbook and then immediately deployed it to my iPhone 3G without making any changes to the game. I used two scripts active during the game to determine performance: One counted the number of triangles in all visible meshes, and the other calculated the running frames-per-second. You may find them at the end of this article. Here were the results on my first run with all controls idle:

22 fps
24,666 triangles per frame

We're going to have to do better than that if we want the game to be smooth and responsive. Here are the steps I took to a solution of improved frame rate and reduced triangle count:

Step 1: Determine the limitations of the platform
Unity3d.com cites:
 "Generally you should aim at 40K or less vertices visible per frame when targeting iPhone 3GS or newer devices. You should aim at 10K or less vertices visible per frame when targeting older devices equipped with MBX GPU, such as: iPhone, iPhone 3G, iPod Touch 1st and 2nd Generation."

Step 2: Figure out where all the triangles are coming from
Using a script I wrote (listed at the end of the article) to report each mesh in the playfield and their triangle counts, I was able to find the worst offending objects. As you may have guessed, the playfield as a whole was the biggest single one...but there were other much smaller objects with a hefty count as well!
 
Step 3: Cull static back facing triangles...permanently!
It's not enough that Unity hides back facing triangles that will never appear; I want to hide from Unity altogether. There's no need to make the Unity rendering or physics engine even look at them in the first place. I accomplished this by using the Slice tool in 3DSMax 3.1 (that's right, 3.1, with parallel port hardware key and all) on the playfield model.

I set the slice plane close to the back of the playfield, and then cut off the back side. I removed maybe 10% of the polygons in the model. Not what I was hoping for, but better than nothing.

Step 4: Replace Unity primitive meshes with your own
So, how many triangles are added when you add a plane or a sphere to your scene? The answer may surprise you: A plane is 600, and a sphere is 2280. In this project, I don't need the kind of lighting accuracy that Unity's higher fidelity primitives provide. I didn't find a way to reduce the triangle counts of those on my own, so here's how I dealt with them:

- Modeled my own plane in 3DSMax and imported it
- Replaced the spheres with planes where the textures are Transparent/Cutout/VertexLit renders of spheres...the spheres were only meant to be statically lit anyway so I'm not losing anything.

As I had several spheres and planes in the scene, this was a big help.

Step 5: Have a "low quality" mode where we pre-render what we can
The playfield isn't going anywhere, nor are the bonus letters. So, I rendered both in 3DSMax, added planes to the scene with the renders on them, and hid the triangles of the existing meshes. To my suprise, it actually looked good!

       

The left is rendered in high quality, the right is rendered in low quality.

Putting it all together
After all my optimizations, I deployed the project to my iPhone 3G again. Here are the new results with all controls idle:

High Quality mode (showing the playfield mesh): 29 fps, 10875 tris
Low Quality mode (showing the pre-rendered playfield): 29 fps, 2034 tris
 
For extra credit, I went into AppController.mm and increased the refresh rate threshold to 60. After that I got 32 fps on high quality, 37 fps on low.

The optimizations don't end here, though. Unity has a great article on optimizations at Unity3d.com . I may write another blog after I go through that. I may not get 60 FPS, but it won't be for lack of trying!


Script 1: Calculate FPS in Unity

javascript code:
var updateInterval = 0.5;

private var accum = 0.0; // FPS accumulated over the interval
private var frames = 0; // Frames drawn over the interval
private var timeleft : float; // Left time for current interval
private var fpsText = "";

function Start()
{
  timeleft = updateInterval;
}

function Update()
{
    timeleft -= Time.deltaTime;
    accum += Time.timeScale/Time.deltaTime;
    ++frames;
   
    // Interval ended - update GUI text and start new interval
    if( timeleft <= 0.0 )
    {
        // display two fractional digits (f2 format)
        fpsText = "" + (accum/frames).ToString("f2");
        timeleft = updateInterval;
        accum = 0.0;
        frames = 0;
    }
}

function OnGUI()
{
  GUI.Label(Rect(5,0,200,20), fpsText);
}
 

 
Script 2: Calculating triangles per frame in Unity, and dumping a list of all objects and their triangle counts. (The delayed start is to let things finish spawning on startup)

javascript code:
var updateInterval = 0.5;

private var accum = 0.0; // FPS accumulated over the interval
private var frames = 0; // Frames drawn over the interval
private var timeleft : float; // Left time for current interval

private var meshes : MeshFilter[];
private var m : int = 0;

private var triText = "";

function DelayedStart()
{
  CancelInvoke();
  meshes = GameObject.FindObjectsOfType(typeof(MeshFilter));
  for (m=0; m < meshes.length; m++)
  {
  if (null != meshes[m].renderer &amp;&amp; meshes[m].renderer.enabled) {
   Debug.Log(meshes[m].name + ": " + meshes[m].mesh.triangles.length);
   }
  }
}

function Start()
{
  timeleft = updateInterval;
  InvokeRepeating("DelayedStart", 1, 0);
}

function Update()
{
    timeleft -= Time.deltaTime;
    accum += Time.timeScale/Time.deltaTime;
    ++frames;
   
    // Interval ended - update GUI text and start new interval
    if( timeleft <= 0.0 )
    {
        timeleft = updateInterval;
        accum = 0.0;
        frames = 0;
       
        tris = 0;
        meshes = GameObject.FindObjectsOfType(typeof(MeshFilter));
        for (m=0; m < meshes.length; m++)
        {
      if (null != meshes[m].renderer &amp;&amp; meshes[m].renderer.enabled) {
        tris = tris + meshes[m].mesh.triangles.length;
      }
        }
        triText = "" + tris.ToString();
    }
}

function OnGUI()
{
  GUI.Label(Rect(5,20,200,40), triText);
}
 

 If you're a Unity Developer and find a problem with a script, please reply for all to learn!

Report abuse Initial Hyperspace Pinball announcement and Gamieon

0 comments by Gamieon on May 14th, 2011

First off, a mental note to myself: When making a news posting, always include pictures and icons with links to social networks you're on! I have a bad history of getting front page post rejections because I keep not doing that.

Hyperspace Pinball is the product of my wanting to release one more game on the iPhone before I do development on Dominoze mobile. Tiltz has shown me a lot of things one can do wrong in the development and release of an iPhone game, and I want pinball to have a far more prepared and successful release so I can learn more about what one gets when they do things the right way.

The game itself is over 60% done. The remaining work to do is: Finish the sound effects and music implementation, add achievements (I've decided on eight in all), finish the menus, general PC testing, iPhone port, general iPhone testing, and then release.

This time around, I'm taking complete control of marketing. A few weeks ago I spent an hour looking for blogs and stories and articles on how to properly release an iPhone/iPad game. In that meager hour, I discovered that I had quite a number of misconceptions, and things to learn. In short, AppGamer.net provided me with the most helpful information. Rather than finishing the game and exploding all the news, trailers and screenshots at once, I'm pacing myself.

Now that the official announcement that the game is in development is out, I plan on others, including: a list of achievements, screenshots of later levels and bosses, and a trailer. Those will come once development is further along and I have the content to share. I'm also going to be more proactive finding news aggregators and sharing those things with them as well; and maybe offering some exclusive content for exposure. Hopefully it will all work out much better than Tiltz.

Thanks for reading...and to show my appreciation of your taking the time to read my blog, here's an advance screenshot of the level five Hyperspace Pinball boss :)


                                               

Report abuse iOS In-App Purchases, Promo codes and Reviews

0 comments by Gamieon on Apr 7th, 2011

I submitted Tiltz to a few websites to be reviewed. I was hoping that some positive testimonials would help outweigh the bad ratings, but it would appear the In-App purchase model has made that difficult as well.

When you submit a game to a reviewer, they're going to need the full version to do a proper, thorough review. If your game requires purchase up front before being downloaded as many do, you can give the reviewer a "promo code" which they can use to get the game for free. If you're using an In-App purchase model, however, you can't do that because Apple does not support promotional codes for In-App transactions at the time of this writing. Offering a special build of the app with the full features unlocked will not suffice -- the reason is that you are giving them a build that nobody else has. How can they be sure that the full, released build is the same thing as what you gave them, or that you didn't sneak in some features that the release build doesn't have?

However, there is a solution: Put in your own mechanism to unlock the full features of the game. This blog does a good job of explaining how:

Blog.mugunthkumar.com

Of course, it's best to do this -before- you release your game. I also recommend you have it tested at Ibetatest.com .

Report abuse Tiltz 1.3 release, iAd integration

0 comments by Gamieon on Mar 20th, 2011

In my previous blog I outlined some possible reasons Tiltz had a poor showing in the app store. I made Tiltz 1.03 have six free levels, thirty full levels, and then made a new release. The rating didn't improve much, but it did improve. I do think adding five more levels to the free version helped, but I can't speculate further on why the ratings and sales are poor before I go back to marketing fundamentals.

I like development far more than marketing; I therefore put far more time and energy into it. However, here are a couple fundamentals that are not part of the Tiltz equation:

1. There has not been an active campaign to post Tiltz on all the gaming review sites yet.

2. I have no cadre of fans who have kept up with development and gave Tiltz a high rating out of the starting gate, and helped promote it too.

I probably would have done 1 by now if the ratings were better. At this point, I think the best thing to do is talk to people who have experience with marketing mobile games, and see if they can help me out not just with Tiltz, but my next project in the works. I won't even rule out using another API like OpenFeint if it will help.


Speaking of marketing: The latest version of Tiltz does have banners on the bottom made possible through iAd support. I followed the instructions at  Forum.unity3d.com  , and they seem to work well. If you are interested in cross-advertising mobile games with me, feel free to drop me a line.

Report abuse Possible pitfalls rolling out your iPhone / iPad app

0 comments by Gamieon on Jan 18th, 2011

Many games are released on the Apple App Store as two separate apps: One as a free demo with a limited feature set, and the other as a full version which players must pay for. You do, however, have the choice to release them both as a single app where a player can purchase the full content upgrade from within the app itself. This is known as an "In-App Purchase". Why do this over the traditional two-app model? Because, supposedly, a player may be more inclined to buy your product if they don't have to take the trouble to get out of your app and look up the full version to buy it. If the golden "Get these great features now!" button is right there, they're a few less taps away from gratification.

Now consider Tiltz. Versions 1.0, 1.1, and 1.2 have all had 1 1/2 star ratings, barely a 2% turnover rate in sales (meaning for every 100 downloads, 2 people bought the full version) combined, and only one out of six players bothered to upgrade it when new updates came out. Unfortunately the comments are very few and sparse, so I'm left to figure out why this is happening. Here's why I think it is:

- The free version only has one level. When you beat it, a picture of all twelve levels appears encouraging you to buy it. You get maybe two minutes of play time, and you've gone as far as you can go. There are thousands of other free apps that give you much more than that at no cost. This takes me to my next point...

- Most of the one star ratings are for the free version of Tiltz...which is also embedded with the full version of Tiltz. People can easily be led to think the full version is only worth one star.

- There was one comment which suggested, in cryptic terms, that the game would not run. Unfortunately I have no idea what the model of the phone was, but players frustrated by performance and installation issues turn to one star ratings to punish the developers for not knowing better.

It could also be that the app is just, well, not App Store material. To find out for sure, I'm going to put up another release with more free content and more paid content (to be fair), and see what happens. When I do, I'll post the results here.

Report abuse Random bits of Unity / iPhone development usefulness

0 comments by Gamieon on Dec 8th, 2010

- Your app can get downloaded 2,000+ times on the first day of an iPhone app release. Apple does the marketing for you that day. Let this be both a pleasantry and a warning -- try to get it right the first time! Either way, you're getting exactly what you asked for.

- If your iPhone app is a crash-and-burn ratings or sales wise, use it to your advantage. You can use it as a test bed for new features and new learning experiences, and it won't matter because things can't get much worse for it...and it certainly won't be your last game anyway (I hope).

- If your iPhone app is a crash-and-burn, and you haven't put marketing muscle behind it, DON'T. Figure out why it's not working or not well accepted for the existing audience, fix it, and update it (more than once if you have to). Then when you're confident it's good to go, put in the marketing effort. If ratings and sales don't improve much even though you're sure the game is exposed to tens of thousands of players, then it may not have been meant to be. The problem lies in the idea, execution, or both.

- Your app can easily get dozens of ratings but no comments. So it won't always be obvious why your ratings are good or bad, unfortunately.

- You should try putting your app on Ibetatest.com before you put it on the app store.

- If your app size in uncompressed for is over Apple's 20 MB non-wifi-download cap, people will not be able to download it unless they're on Wi-Fi or are on their Macbook/PC using iTunes. If you're making a very simple game, be vigilant of your app size through the entire development cycle. Keeping it under 20 MB is challenging for Unity developers.

- If you already released an app and were blindsided by the non-wifi-download limitation, and you can't make your app any smaller, then use that to your advantage. At least now you're not limited in size to new level and feature development. Apps can still be successful even if they're a little more difficult to acquire.

- If your game is the kind that has the demo and full versions in one single app, keep in mind that when you send an update to the App Store to improve the full version, all the demo users will have to update too. Be nice; improve both versions whenever you do an update.

Report abuse Unity and Apple Game Center development

0 comments by Gamieon on Dec 8th, 2010

I like Apple's Game Center leaderboard and achievement tracking in that it's very easy to implement (even if you don't have plug-in support but are willing to learn some Objective-C), For one thing, the critical GameKit function calls are non-blocking. Scores are uploaded and displayed in metrics that the developer can define, and achievements have a percent completion. Furthermore, my experience has been that the Game Center will not lose data (suppose a bug reset your game score from 10,000 to 0...the Game Center will still keep you at 10,000). They do, of course, provide a reset function you can explicitly invoke.

One thing to keep in mind is to be careful when designing your achievement icons. I had to change most of the ones in Tiltz because they looked terrible in front of Apple's achievement board "Paper plate" backdrops. Make sure your icons look good with a white background behind them.

You can also display Apple's leaderboard within your Unity app using GKLeaderboardViewController. I discovered after a few hours that you can do it if you make sure you present the controller with the animated parameter set to NO. However, I ended up just getting and displaying the numbers myself because bringing up the leaderboard view is extremely slow. (It's bad enough that loading a scene on the iPhone can take a whole second...what's going on during that time anyway and how can I speed it up?).

How to do it all without plug-ins? The same way I implemented in-app purchases: Using PlayerPrefs (default user setting properties) as a "communication bridge" between the Unity scripting layer and the Objective-C layer. I learned this at Tinytimgames.com