StackPop Studios header image

Chromatic Online – Beta Testers Needed

Online multiplayer is coming to Chromatic!

We are nearing completion on an online tournament mode for Chromatic. The new mode will enable players to drop into quick games with the same set of weapons and powerups and compete against the world for the highest score. The games will be frantic and fun, and will start new every two and half minutes. We think this will be a great way for players to get their fast-paced Chromatic fix without having to invest as much time in single player mode!

Check out a gameplay video of online mode: here.

Our challenge now is testing this before we release. To get a sense of how well everything works we want to try and get as many people as possible, but this could be tough considering how spread out across the world our users are. Our current plan is to try and coordinate times for people to play via Facebook…we’ll see how it goes:).

If you’re interested in beta testing, please send us the live ID that you use on your Windows Phone via email. We’ll use this to grant access to the beta via the marketplace. Then, give us a like on facebook so that you can stay up-to-date with coordinated testing times.

So far we’re loving online mode and we can’t wait to share it with the world!

Featured! A welcome boost to usage

In the spirit of our recent post detailing our usage for Chromatic for the last month, we have another interesting datapoint to share. We were lucky enough to have Chromatic in one of the featured spots yesterday (11/20) in the on-device marketplace:

We had actually seen Chromatic in one of the six featured spots in the games section previously and while we had seen a decent boost in usage (~15% increase in impressions), we have seen a huge boost in traffic while in one of the three top-level slots:

As you can see, the featured slot has yielded a roughly 50% increase in traffic. Apparently the three top-level featured game slots are much more discoverable than the six in the games section!

We’d love to hear if any other app developers have observed similar boosts in traffic from being featured. Maybe we could have done much better:).

Chromatic – One Month In

It’s been one month since Chromatic released in the Windows Phone marketplace and we thought we’d post some of our more interesting numbers.

First off, numbers from app-hub and pubcenter. Our daily downloads are below (data through 11/11):





Total Chromatic Free Downloads: 22,544
Total Chromatic Pro Trial Downloads: 1148
Total Chromatic Pro Paid Downloads: 195


Next up, our daily impression totals:

Our daily eCPM values have fluctuated a bit: we’ve days as low as $.50 and as high as $2.50. Overall our ad revenue has far outweighed our revenue from sales of the pro version so we are very happy that we went with free and ad-supported.

We shipped both versions of the game with Google analytics integrated, which allows us to see very granular data about usage. We can report on global distribution of usage, how many games have been played, and even which guns people favor most.

As expected, the US is our biggest market but we’ve seen a fair amount of usage from European countries and in China of all places (interesting since Windows Phone hasn’t yet shipped in China!):

It even turns out that in terms of marketplace rank, we are doing much better in markets other than the US. Chromatic Free rank for top markets:

Hopefully as Windows Phone expands globally and the international market share grows, we’ll be well-poised to attract even more users as one of the top free games in these countries.

Other interesting datapoints:

We have a “please rate me” in-game pop-up after a player plays the game a bit that gives the user the option to go to the marketplace to rate (or not). “Yes” vs. “No” breakdown:

We also have an in-game pop-up asking a user if they’d like to buy the paid version to play without ads. “Yes” vs. “No” breakdown:

Key lessons thus far:

-In retrospect we probably wouldn’t have shipped a paid version. We can see a fair amount of people playing the paid version in China that seem not to have paid for it. We’d be much better off showing ads to them:).

-Windows phone websites are key for free marketing and generating publicity. We saw significant jumps in usage when our press releases and reviews hit the major windows phone sites like wmpoweruser.com, wpcentral.com, and bestwp7games.com. Take the time to put together a well-worded post with good screenshots and this can easily be a very effective free way to market your game.

-Prompting for reviews in-game works well. One month-in we have 450 reviews just in the US, which likely helps to get users who happen across the game from the device marketplace.

-Don’t forget about international markets! We have had significant traffic from outside the US which is great, but we also didn’t consider this when we first shipped and had some bugs around non-US characters for screennames. Thankfully we were able to turn out a fix fairly quickly, but we were also lucky that the issue was not reflected in reviews.

-Analytics are extremely useful. This is what keyed us in to our issues with non-standard US characters. We could see people playing in China but didn’t see any Chinese-looking screennames uploaded to the leaderboard. We investigated further and found out the game would crash if a special character was input. Without the analytics we may only have found out about the issue after it had been reported via reviews.

All in all Chromatic has done much better than we expected. We have an update that we are pushing out shortly that will also help give us a boost in traffic: along with support for Mango features we are adding some new in-game mechanics that will hopefully get folks playing again that may have put the game down.

Ni Hao China! A pleasant surprise on opening day

It’s been less than 24 hours since Chromatic Pro became available in the Windows Phone marketplace. We woke up today to find a significant amount of traffic from one place we didn’t expect: China!

Our Google analytics show the following traffic distribution from China:

We’re not talking huge numbers here, but it certainly wasn’t what we were expecting!

Tutorial – Using Visual Studio Solution Configuration to Manage Free and Paid Game Versions

This tutorial details steps for easily managing different versions of your game in Visual Studio. We found this extremely useful while developing Chromatic since it greatly simplified management of our paid vs. our free version.

After the following steps are in place, you can use the Visual Studio solution configuration drop down as a single place to switch between paid and free versions and see your app’s title, tile image, and version-specific game logic change automatically.

One note is that this is proven to work well for Visual Studio Pro: Visual Studio express is designed to simplify solution configuration and therefore the options are not exposed as easily and may not behave the same. There’s a blog here you can reference to expose the solution configuration for VS Express.

To start, in VS navigate to Build->Configuration Manager. Under “Active solution configuration” drop-down, click “”:

For this example, we will name one version “Pro Version”, and choose to copy the settings from Release configuration:

Repeat the above steps to also create a “Lite version”:

Close the configuration manager. In Visual Studio, you should have a configuration manager drop-down in the task bar below the menu bar. This is where you can choose between the different solution configurations, and where you will now see the Pro and Lite versions we just added:

With the “Pro Version” configuration chosen, right click the project and go to properties. Choose the “Build” tab, and then add “PRO_VERSION” to the Conditional compilation symbols (note that these symbols are ‘;’-separated).

Switch to the “Lite Version” configuration using the configuration drop-down and add LITE_VERSION to the conditional compilation symbols:

What we’ve just done is given ourselves the ability to change in-app logic based on the configuration selected for the solution. Compilation conditionals aren’t the prettiest, but if you confine their use to a single utility file or similar you can easily do some nice things without too much ugliness. A simple example is as follows:

    public class Game1 : Microsoft.Xna.Framework.Game
    {
        public static bool ProVersion
        {
            get
            {
#if PRO_VERSION
                return true;
#else
                return false;
#endif
            }
        }
  …

        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            Color gameColor = ProVersion ? Color.Blue : Color.Red;
            GraphicsDevice.Clear(gameColor);

            base.Draw(gameTime);
        }
    }

All this example will do is change the background color based on the selected configuration, but the basics are there. Note that the compilation conditional check is wrapped inside a simple Boolean accessor: this is intentional to avoid having to have compilation conditional checks scattered throughout code. Did we mention compilation conditionals are ugly? :)

Our next step is to setup different app names based on solution config. Open AssemblyInfo.cs and set the existing AssemblyTitle and AssemblyProduct values to the following:

#if PRO_VERSION
[assembly: AssemblyTitle("Pro Version Game")]
[assembly: AssemblyProduct("Pro Version Game")]
#else
[assembly: AssemblyTitle("Lite Version Game")]
[assembly: AssemblyProduct("Lite Version Game")]
#endif

You’ll be happy you did this when it comes time to submit your paid and free games: without it both will have the exact same name! Note that AssemblyTitle is what actually controls the app name as it appears in the marketplace, but it is good practice to update AssemblyProduct to go with it.

Our final setup step is to enable a different tile title and image for each version. For this example, we’ll assume that we want our tiles to show up as follows:

Pro:

Lite:

Open the csproj up in notepad and move the and tags into both the “Pro Version” and “Lite Version” PropertyGroups, and then set each value to point to the specific tile images for each version and each value to the desired text:

Finally, we’ll create a static class to create convenient properties to determine what type of game the user is playing, with some included logic assuming that both Lite and trial-Pro version will have ads:

using Microsoft.Xna.Framework.GamerServices;

namespace VersionGame
{
    public static class GameConstants
    {
        /// <summary>
        /// Whether the app is Pro(Paid) or Lite(Free)
        /// </summary>
        public static bool PaidVersion
        {
            get
            {
#if PRO_VERSION
                return true;
#else
                return false;
#endif
            }
        }

        /// <summary>
        /// Only show Ads in the lite version and the trial version
        /// </summary>
        public static bool ShowAds
        {
            get
            {
#if PRO_VERSION
                return IsTrial;
#else
                return true;
#endif
            }
        }

        /// <summary>
        /// Whether this is a trial version (Pro/Trial) or not(Pro/Paid,Lite/Free)
        /// </summary>
        public static bool IsTrial
        {
            get
            {
#if PRO_VERSION
                // Guide.IsTrialMode is expensive, so cache it
                if (!isTrial.HasValue)
                {
                    isTrial = Guide.IsTrialMode;
                }

                return isTrial.Value;
#else
                return true;
#endif
            }
        }

#if PRO_VERSION
        /// <summary>
        /// Cached value for whether it is a trial or not
        /// </summary>
        private static bool? isTrial;
#endif
    }
}

At this point we can sprinkle IF checks throughout the code to do different things depending on whether the user is playing the Paid, Trial, or Free version of your game.

For our example we’ll add some very simple drawing logic:

        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            Color gameColor = GameConstants.PaidVersion ? Color.Blue : Color.Red;
            GraphicsDevice.Clear(gameColor);

            GraphicsDevice.Clear(Color.CornflowerBlue);

            spriteBatch.Begin();
            spriteBatch.DrawString(
                this.font,
                "Game Version: " + (GameConstants.PaidVersion ? "Pro" : "Lite"),
                new Vector2(10,10),
                Color.Black);

            spriteBatch.DrawString(
                this.font,
                "Is Trial: " + (GameConstants.IsTrial ? "Yes" : "No"),
                new Vector2(10, 30),
                Color.Black);

            spriteBatch.DrawString(
                this.font,
                "Show Ads: " + (GameConstants.ShowAds ? "Yes" : "No"),
                new Vector2(10, 50),
                Color.Black);

            spriteBatch.End();
            base.Draw(gameTime);
        }

Now, if we set our solution configuration to “Lite”:

And run the app, we see the following:

The app title appears as follows:

And the tile shows up as:

Simply switch to solution configuration of “Pro” in Visual Studio from the configuration drop-down:

Now the app runs as:

With a title that shows up as:

And a tile that looks like:

All that with just the push of a single button! When it comes time to ship, simply build your solution under both configurations and you will have two XAPs, your Pro and Lite version, for submission.

(Note: to test the Trial version, in the GameConstants class you can set Guide.SimulateTrialMode to true and then IsTrial should start returning True.)

Taking the time to set this up for your game project files can be a huge savings managing different versions. We found it tremendously helpful in testing and shipping paid and free versions and making sure we got each right.

You can download the complete sample code for this tutorial with all of the above config and settings in place here: VersionGame Sample.

XNA Tutorial – How To Create Windows Phone Tiles With Empty Titles

This tutorial describes a small bug nagging issue we encountered with pinned tiles for XNA games on Windows Phone.

The goal is simple: include a tile with your XNA game but configure it so that when your game is pinned, the name of your game doesn’t show up with the default windows phone text over your tile. This can be nice for games where you use a distinct text throughout and want to carry that through to the tile and you’ve already drawn your game name directly on the tile (see Chromatic). Or perhaps the artwork for your tile says enough about your game and you just don’t want a title!

Let’s start with an example game. When you create a new XNA game in Visual Studio, you will get a default tile image which is included in your project as Background.png.

When you build and deploy and then pin your game to the start, the tile will look as follows:

Note that by default, the name of the game is drawn over the tile in the windows phone text. Which is probably fine for most games, but say that you really want your tile to look something like this (but hopefully a little more interesting:)):

First, in our example we’ll add the new background tile as “BackgroundTileWithTitle.png” by Right-clicking the project in the solution explorer, choosing “Add” and then “Existing item…” and including our new tile. You can then delete the default Background.png after which your solution explorer should look as follows:

The next step is to set the project properties to use your new tile. Right click on your project in the solution explorer and choose properties. The first properties page you should see is the XNA game studio options where you’ll notice several tile-related options. From the Tile image drop down choose the new tile image:

You’ll also notice that conveniently there’s an option to set your tile title! The obvious thing to try for what we want to accomplish is simply deleting all text. Let’s do that and see what happens. First delete the text for the “Tile title” field:

And now build, deploy, and pin:

As you can see, we’re not there yet. With an empty Tile Title string, we get an oh-so-useful “DefaultTile” string written on top of our custom title. Not exactly readable. Let’s go back to the project settings file, and this time instead of deleting the entire tile title string we’ll set it to some empty spaces (in the below shot I have used several spaces just so that it is apparent from the cursor, but using just a single space is the same):

And now when we build, deploy, and pin we see the following:

Hooray! It looks like we want without any default text getting in the way! We’ve achieved our goal! There’s just one small problem: when you close and re-open Visual Studio, the white space in the title won’t get preserved. This means that every time you re-open Visual Studio and build deploy you will have to manually change the title back to white space. Sure enough, when we take this example and simply close, reopen, and do our usual build/deploy/pin, we’re back to the following:

It’s not the worst thing to change the title manually, but the last thing you’d want is to forget to do this right before you upload your .xap to marketplace! Either you’d fail certification and waste some time or, even worse, ship an ugly tile to your users. Thankfully, there is another trick to make the empty tile title “stick”: we can change the title in the .csproj file directly.

Using the text editor of your choice, open the MyGame.csproj file. You can easily find the path by right-clicking the project properties window title in Visual Studio and choosing “Open containing folder”:

Look for the element TileTitle. What you’ll likely see is that the .csproj file actually has the whitespace we added previously, yet for some reason Visual Studio ignores this:

Instead of actual spaces add “%20”, the URL-encoding of the space character:

Save and close the project file and now re-open your game in Visual Studio. Note that the Project settings won’t look any different: it will show a Tile Title with no spaces and no characters. However, when you deploy and pin, we’re back to a tile with only our custom title! No pesky default text in the way:

You should be able to open and close Visual Studio as often as you like without needing to manually change the tile title. Again, it’s not the worst thing to do that manually but when it gets down to crunch time it’s really easy to miss something small like this. We were very happy when we found this workaround…after all the fewer manual steps needed as part of shipping your game the better!

This trick has been working for Chromatic for some time, but if you find otherwise please let us know in the comments or via email.

XNA Tutorial – How To Pause During Phone Calls

One interesting issue that we encountered while developing Chromatic was the need to pause the game during phone calls. We read up on Isolated Storage and implemented support for app resume and closing, but it turns out that when a user receives a phone call, your app doesn’t enter the tombstoning or closed state like we had originally assumed. Thankfully one of our awesome beta testers caught the issue before we released and reported it!

The key is to plug into the Microsoft.Xna.Framework.Game OnDeactivated(object sender, EventArgs args) method. This is different than the PhoneApplicationService Deactivated event, which gets invoked when the game is deactivated and entering the tombstoning state. Note that to make things even more confusing, Silverlight apps utilize the RootFrame Obscured event to indicate that the app is losing focus.

Once the difference between the various app-state event handlers is understood, pausing for phone calls is fairly trivial: after all, it doesn’t involve saving and loading any state. Your app will continue to run in the background, so you simply need to pause appropriately.

public class Game1 : Microsoft.Xna.Framework.Game
{
    bool paused;

    /// <summary>
    /// Called when the game loses focus during an incoming phone call
    /// </summary>
    protected override void OnDeactivated(object sender, EventArgs args)
    {
        // Logic to pause game goes here
        paused = true;
    }
}

You can download some sample code that illustrates this here: GamePauseOnPhoneCallSample

This simple example displays text that indicates that the game is running until a phone call is received, at which point the game indicates that is paused and waiting for touch input to continue. Different behavior will probably apply to your game, but the basics are shown.


To try it out build the sample in visual studio, deploy to your dev device, and then call that device from another phone while running the app.

Note that the App certification requirements don’t explicitly require you to have such a mechanism in place. Section 5.3.1 describes requirements for allowing initiating/answering/ending calls and section 5.3.3 states that an incoming call shall not cause the app to stop responding or become unresponsive, but there’s nothing about needing to pause a game during a call. Which makes sense…this is probably pretty specific to only certain categories of apps and writing it into the certification requirements would be a bit restrictive. But nonetheless, if it makes sense to pause during a phone call, your users will thank you!

Hello World!

Thus begins the StackPop development blog!

First off, welcome. For those who don’t know us, StackPop is a development effort between two Microsoft software engineers. We have spent our careers as services devs and therefore lack experience with serious client-side development, but it didn’t take much to realize that the power of Microsoft development tools combined with the Windows Phone marketplace is a terrific, new opportunity to put our skills to use outside of work. You can read more about us in the about section, but we’re both gamers and so building Windows Phone games feels right.

At the time of writing, we’ve been playing around with Windows Phone development for about the last year. We shipped PuzzlePro in May, and we’re putting the finishing touches on Chromatic, a game that has been in various stages of development for that entire time. Our goal here is to share what we have learned through these and future projects. Although we haven’t had any mind-blowing success thus far, we’re hoping that we can help other folks that hit the same issues we do. Ultimately we do this because it is fun, and sharing is a big part of that fun.

So, be on the lookout for more posts. We’ll talk about everything that happens as part of building and shipping games for Windows Phones, so long as it’s interesting! If you have specific questions or feedback, please feel free to leave us comments or send us email at stackpopstudios@gmail.com.

Thanks!!!

-Joel and Tyler