Submitted v0.9 with Bug Fix

I found a bug in in Social Artist today which is causing the game to crash as soon as it starts up for some people. I have fixed the bug and submitted v0.9 which corrects this to the Windows Phone marketplace. If you have a problem with the game crashing on startup, please upgrade to v0.9. Use the Store on Windows Phone 8 or the Marketplace on Windows Phone 7 to upgrade. Please feel free to send me feedback if you are seeing any other issues, or have ideas to improve the game.

Paul

Posted in Uncategorized | Leave a comment

Updated Server Code Today

Today I made a minor update to the server code for Social Artist. Just a few bug fixes. Do let me know if you notice any issues with it.

Posted in Uncategorized | Leave a comment

Migrating my game server from Amazon Web Services to Windows Azure

Last year in April I built a Windows Phone game called Social Artist. You draw pictures on the phone screen and post them for other people to guess what they are. Each time you guess right you score points towards a high score table for the day. The game integrates with Facebook and stores the pictures on a server. I built the server as a WCF service with the data on SQL Server Express because these are technologies I was already familiar with. I was going to run the service on a machine in my garage, but that machine stopped working while I was developing the service so I needed alternate hosting. I chose the free tier of Amazon Web Services which provides an EC2 micro instance free for 12 months. This provides a Windows Server 2008 virtual machine with 600 Mb RAM which was already running SQL Server Express. I later moved the database to a separate AWS RDS SQL Server Express instance after Amazon added that to the free tier.

I have two problems with the AWS EC2 micro instance. First is that my free 12 months is running out soon. And second is a curious CPU throttling feature on the micro instance. Amazon says it provides a small amount of consistent CPU resources and allows you to increase CPU capacity in short bursts when additional cycles are available. What this seems to mean is that the CPU runs at full speed until you use more than some amount and then it is shut off for 3 to 10 seconds. It doesn’t slow down, it pauses.  I first noticed this when WCF service calls that should take 200mS were taking over 10 seconds and I found that the service calls were being paused. This doesn’t work very well for my game which makes service calls to load and save pictures and the user waits for the result. A number of people have written about this CPU throttling, but I haven’t found any way to avoid C# code from using all available CPU until it’s done.

I have some Windows Azure access through my MSDN Subscription. This weekend I moved from EC2 to Windows Azure. In the Amazon EC2 free tier I get a virtual machine and on Windows Azure I get to deploy a WCF Service so that’s convenient as I have one of those. I had to rework my server to work with SQL Azure. Here are some issues I ran into.

I like SQL Server Management Studio but SQL Azure doesn’t

It works with SQL Azure but a few things aren’t available. SQL Azure connections time out after an idle period and unlike any other SQL Server version they cannot reconnect which I think is because of the way they are timed out. The solution is to copy all the contents of the previous query and start a new one then paste the query contents in.

The connection timeout also causes ADO.NET connection pooling some trouble. I’m seeing a new error that I need to troubleshoot:

An existing connection was forcibly closed by the remote host

A transport-level error has occurred when receiving results from the server

My first attempt to resolve this is to add a connection string property to close the connection at 30 minutes.

Connection Lifetime=1799

We will see how that goes.

Clustered Indexes are Required

In my game server there were a couple of tables with not many records and I hadn’t bothered to add any indexes to. I had to add these. This also meant that I was not able to use the built in migration that I found in SQL Server Management Studio.

Maximum Sizes

There is a max of 5Gb of data in SQL Azure whereas Amazon Web Services RDS provides 20Gb. I have 2 Gb of data in my database so I will have to watch this.

A few T-SQL keywords aren’t valid

My database creation scripts are just from scripting the database on another SQL Server database so they’re pretty ordinary. They include creating the database which I had do on the Windows Azure web site and they included “on primary” type file group specifiers which I had to remove.

I transferred all of my data using BCP. BCP is great and worked across both SQL Server express on AWS RDS and on SQL Azure. Usually I need to use SET IDENTITY_INSERT so that BCP doesn’t create new identity columns, but this wasn’t required when copying into SQL Azure for some reason that I can’t explain.

Conclusion

I really like the simple deployment for my WCF service to Azure. It works straight from Visual Studio. Much easier than what I had to do on Amazon Web Services involving remote desktop and copying files around. The usage reporting and dashboards in the Azure web user interface look like they might be useful also.

Posted in Uncategorized | Leave a comment

Social Artist server move today

Today I’m moving the server for Social Artist so it is offline for maintenance right now. Should be done in an hour or two.

Update: it was back online at 1pm PST

Posted in Uncategorized | Leave a comment

Facebook changes require use of Social Artist v0.6

Facebook have changed the way Windows Phone apps login. These changes have been coming for a while, but they weren’t fully known and they took effect in the last day or two. I have just updated settings for Social Artist v0.6 to work with these changes, but v0.5 is no longer able to login to Facebook. Please upgrade to v0.6.

The settings are only read by your phone once a day so even if you have v0.6 you may not see the update until 7/11/2012 11am PST. If you want the settings change early, you can uninstall and reinstall the game. You will not lose your in progress games if you reinstall.

Posted in Uncategorized | Leave a comment

Social Artist v0.6 is now available

It’s live, please upgrade here. This link works on your phone or on the web.

Posted in Uncategorized | Leave a comment

Another Social Artist build submitted

Another weekend of coding, actually mostly testing, so much testing that I got on the high score table, and there’s a new build submitted. What’s new in 0.6?

  • I worked on the drawing screen to make it look a bit nicer. The keyboard is now transparent and there’s no limits to where you can draw
  • After you save a picture for a player you can send them a Facebook notification that it’s their turn
  • I moved the ads to the top of the screen in response to user feedback
  • I also added an option to remove the status bar from the top of the screen
  • The game changes screens faster now and the ads have more variety

I expect it will be 7 days for certification and then another 2 days for publishing before this update goes live, so ETA is 10th July.

Posted in Uncategorized | Leave a comment