Turkcell Integration

This week, I’ve worked on the example codes provided by Turkcell.

The provided example code pieces are not well written so I’ve decided to rewrite codes which uses the underlying auto-generated wsdl classes.

I’ve finished SMS sending part and we can use any machine to connect to turkcell and send sms.

Next week, I’ll continue with location services and add a jetty server to the code to be able to communicate with php backend.


Facebook Status Message Update

This week, I implemented a new functionality to enhance the engagement within the game.

Facebook provides Status Message updating ability with its API. But in order for an application to update a user’s status message, it needs to take the extended permissions from the user, namely “status_update” permission, which is actually a sub-permission of “publish_stream” permission.

I implemented a JavaScript object which makes an AJAX call to our servers to update a user’s status. Our servers tries to set the status of the user from the PHP library that makes REST calls to Facebook servers. If the Facebook servers respond the calls with a specific error code, which means that user had not granted the extended permission for status updating, our servers forward this error code to client as the AJAX response. Then the JS object stores the status message for resending it later, and pops up a dialog requesting extended permission from the user. If the user grants the permission, the JS object resends the status message that is backed-up. If not, it does nothing :)

I integrated this functionality with our in-game message posting functionality for now. When a message is postded by someone, if the user checks the option to also set his or her Facebook status message, the JS object makes necessary calls to set users status.


Environment Separation and Deployment Robustness

This week, I and Erbil have worked on Environment Separation and Deployment Robustness improvements. The problem was that we had a single database on our production servers and we hadn’t got an environment for developing supporting continuous integration and an environment for extended testing and quality assurance other then production.

We figured all the points of dependencies and found out the solutions to separate them. First of all, we have separated our datastore to dev, test and prod DBs which are capable of responding to system needs all alone. We configured our playgrounds to use dev DB, where we develop the functionalities and push our changes to our common repository. Then we have created test applications that are pointing our test DB, where we deploy a revision from our common repository and check all functionalities, run unit tests and comply with quality assurance. Then if all of our tests are succesful, we publish the same revision to production environment which has its own separate database.

With this approach we fully separated our development workflow from testing and production, and testing from production.

Also I implemented necessary methods within our CDN deployment script to comply with these changes. With these improvements, I configured our development workflow to use AWS S3 bucket in a better way making the system more robust. All of the dev-sourced artworks and assets are stored in an “original” pool, where a separate revision is branched from this original pool on each deployment.


In-Game Functional and Logical Redirections

In most of the MMO games, there are several requirements within the game that makes users collect some items, invest on investments, do some actions to earn money and get experience and so on. But for a better gaming experience, these requirements should be obvious and easily reachable for the user.

For instance, if a user lacks money in hand to buy an investment but has enough money in bank, then he or she needs to go to bank and withdraw some money to buy that investment. Then redirecting the user to the bank automatically in this case, improves the usability of the game, taking the burden of unnecessary clicks from the user.

I implemented a redirection control for 2 possible flows:

1) Functional redirections,

2) Logical redirections (with chance),

For the first one, if a user will obviously click on something to navigate and take action (which is a possible requirement), the redirection control automatically redirects user to the destination page. While doing this, it shows a result message displaying why the user was taken to that page in order to inform the user.

For the seconde one, if a user may click on something to navigate and maybe take action (which is a possible requirement), the redirection control with a probability chooses one of the possible destinations and automatically redirects user to that page. Again, while doing this, it informs the user about why he or she was taken to that page.


Notification Support

For virality, Notifications in facebook has an important place. Notification is a message directly sent to a user. There are two types of notifications, user2user, app2user.

To send a user to user notification, sending user must have an active session in your application and receiving users must also have installed your application.

In our project’s concept, since we share the userbase among different applications, we have to utilize notification stuff so that it will use u2u or app2u according to it’s situation.

I’ve implemented a notification manager, which can send a notification in two cases, user A attacks user B and win; user A attacks user B and kill. This notification manager class checks A and B’s realms. If both have the same realm, uses u2u notification, otherwise, it fetches B’s application’s information from the database, and sends a app2user notification.

All code has been tested and released yesterday.


Second round of user tests

Implementing new measures on the results of the first round paid off well. The functionality in the current UI was slowed down intentionally to prevent users from doing things they aren’t supposed to do. I first show them the instructions (and they don’t appear instantly but with a sliding effect, so text appears line by line), then the interface itself, in which they are expected to do things.

I had set a timeout that pops up a “Are you lost?” window when the user doesn’t react, but with user tests we saw that it is coming up too quickly. I have increased the timeout by 30 seconds as a first measure, but that might then prevent “naughty” users from getting caught twiddling with things they shouldn’t be touching.

I am considering implementing a “OK, let’s go” button to each instruction screen as well, that would start the timer, so when I pop the “I am lost” box, I am sure the timeout hasn’t happened when user has been doing things in another window. The better way is to start the counter when the user makes the first move, but I am not sure if I can detect a click in an iframe.

At least one friend has given up saying “I just didn’t feel like reading all that stuff” but otherwise the UI is doing pretty alright :)


CDN Deployment

In the previous week, we made a private beta release of our SSC.

Erbil has written a deployment script for automated test and production releasing.

We have lots of artwork data to be configured during the release. So I have written a deployment script for artwork deployment. This script moves the necessary files within AmazonWS S3 bucket and deploys the necessary artwork data (css, images, and even other js scripts) from repository (revision) to the S3 bucket. All the artwork data in the bucket is revisioned. So the users will see the latest deployed artwork.

We had lots of problems that we solved, but the result is cool for now :)


Deployment Script

Good engineering practices are what we always seek for.

I’ve written a deployment script to push our service to Amazon EC2. It checks out the repository, does some manipulation over the configuration files, and deploys it to the stage servers over a secure channel. Atasay wrote a push script for all our static files, so that before each release, we make sure that our CDN has the newest versions of our static files. Then we test it out, in the stage environment which is very identical to our production environment except the DB, when everything is fine, we push that release to the production.

Automating such a process is the first step to our agile deployment system. The next will be continuous integration / deployment with the help of our test suite. Watch out for it…


FBJS Animoation

Since we use FBML, facebook does not let us use any js library like JQuery or prototype or even scriptaculus. This sharply limits what you can do in client side, I mean nice looking animated menus etc.

Thanks to Mr. Zuckerberk’s engineers, they provide a very easy to use animation library. FBJS animation library is all css based, open source and very easy to use.

All you have to write is something like:

Animation(<myObject>).to(<property name>,<value>).go();

here, property name is a css style.

a href=”#” onclick=”Animation(this).to(’background’, ‘#fff’).go()

The library provides many more functionality like an ease function or a from value.

I’ve used this library in SSC in one step and may increase it’s use areas depending on user test results.


Private Beta and First User Tests

Thanks to outstanding efforts of all team members, we entered private beta yesterday morning with RG10 and SSC.

Yesterday evening I conducted our first proper user test with a senior Industrial Design student and observed many things to improve about our interface, both in SSC and RG10.

In SSC, there are especially problems about users not reading the instructions (even though we have re-worded them numerous times to be short), getting lost because of not reading the instructions then complaining that the system is too complicated. I will need to come up with ways to force users to read first and not jump into doing things.

There are also problems with users starting RG10 for the first time not knowing where to start. The zero states should be defined better. In addition, the feedback is from actions usually not noticed, getting overshadowed with other UI elements. I should make the feedback for RG10 theme more prominent.