On September 15th, Microsoft announced its 2.5-billion-dollar purchase of Minecraft, a server-hosted online game that has over 16 million users worldwide. Since the announcement, analysts have speculated about Microsoft’s motivation behind the purchase, with analysts speculating and expressing various opinions on the place where Minecraft will fit into Microsoft’s overall business strategy. In the meantime, Minecraft gaming enthusiasts have expressed concern that the acquisition might change the direction of development in the game, and potentially sour the passionate spirit that permeates Minecraft community. Understandably, the topic of Microsoft, Minecraft and the future of online gaming was on the minds of many at the Droidcon conference held this year in New York City.
Azure’s scalable architecture can send thousands of notifications at once, and the architecture can connect many devices, running different operating systems.
Developing a real-time push notification system
In the Droidcon keynote, Yavor Georgiev, a program manager at Microsoft working on the Azure application platform, introduced the notion of a game-world-to-real-world push notification service. Imagine that one player sets up a game world hosted on a Minecraft server. In a world’s Minecraft code, each game item, be it a doorway, a treasure chest, etc., has an associated Lua script, and this associated Lua script keeps track of the item’s properties. Want to know the amount of loot in the treasure chest? The Lua script can tell you.
If the game world is made public, other players can travel in this world. The Minecraft server can send an alert to the game world’s creator whenever another player enters the world. Other notifications can arrive when a player enters buildings, passes through doorways, picks up loot, or does something else of interest to the world’s creator.
Figure 3 contains some of the code in the Android version of the starter app. The starter app maintains a simple to-do list. In the app’s code, the MobileServiceClient and MobileServiceTable objects communicate back and forth with an Azure database.
Azure, push-notifications and Android integration
A Minecraft game world can live in a customized version of the starter app’s code. Instead of a to-do list, the customized version manages the items in the virtual world. The app sends real-time information about the world and its items to an Azure database. The game world’s creator can then query the database. In addition, the app’s code can initiate push notifications to the world creator’s device. When pushing to an Android device, the notification goes through Google’s Cloud Messaging service.
During the Droidcon keynote, Georgiev emphasized the use of notifications to game world creators. But the push notification model can extend to any Minecraft player, or to any other mobile device user. Azure’s scalable architecture can send thousands of notifications at once, and the architecture can connect many devices, running different operating systems, to the same notification service. Interested in taking these ideas further? A good place to start is with a trial subscription for the Azure cloud, available at: http://azure.microsoft.com.
Founded in 2009, Droidcon is a global conference series created for Android developers and hosted by Android developers. Droidcon has conferences all over the world, most recently in Madrid, Tel Aviv, Ankara, Berlin, and Moscow. Droidcon NYC 2014, in New York City on September 20 and 21, was the first Droidcon to be held in the United States. Kevin Galligan, President of Touch Lab and the principle organizer of Droidcon NYC, promises that there will be a Droidcon NYC 2015.