Tankaar : Behind the Scenes
Some of you must be viewing the technology behind Tankaar with awe others may be thinking it just another simple game. I feel that it would be wrong to term Tankaar as a new piece of technology. But definitely it’s not conventional. Basically, it is an integration of few technologies in one entity. This blog is written to give a brief about this integration. Those who are interested in game and not in software and web technologies may skip this blog (though its not entirely a geek stuff). For others (which include those who have requested me to introduce them to technology behind Tankaar) here is some overview which I would like to share.
If you have gone through my previous blogs you may be knowing that we are using XMPP (Extensible Messaging and Presence Protocol). Tankaar client communicates with messenger service just like chat clients GTalk, Pidgin, Spark etc. Only difference is that it allows sending game events apart from chat messages. And messenger service sends them to the receiver, just as it sends chat message to your friends. Tankaar uses Java XMPP library "Smack" to communicate with messenger services.
When two players play a game, the game events are not centrally managed on any server. These game events are managed in Tankaar client (or Tankaar application) of the two players. Each player is running an independent application which communicate with each other through XMPP in such a way that they remain synchronized. When a player fires an astra in the game, the event of firing is transferred from player's app to opponent's app. This event causes same effect on opponent's screen as on player's screen. So there is nothing like shared object kept on a server or any centrally managed system. It is just a synchronized transfer of events which makes it look like a centrally managed thing. This is the only reason we have designed a mechanism which will deactivate older version when a new version is released. Because a new version with updated code and astras will not behave same as older version. So, two applications running different versions will not be synchronized.
Now lets come to the game technology which drives Tankaar. Its good old "OpenGL". Tankaar uses Java Library "JOGL (Java OpenGL)" for graphic rendering. Thus game takes advantage of your graphics card. It is developed to be compatible with OpenGL 1.1 and above. Though graphic cards and drivers nowadays support much higher version of OpenGL but we limited ourselves to using minimum possible, thus not restricting users of older configuration systems from using Tankaar. The power of OpenGL makes it possible for the game to be rendered at 50 FPS (Frames per Second), which is unachievable in browser games.
After reading this you will realize that Tankaar game is nothing but an extended chat. In chat you share messages but Tankaar client allows you to share not only messages but also game events. Thus enables two player game play. If you find this introduction insufficient wait for sometime, I will be putting more blogs and wiki pages to make things more clear. After all our aim is not just to deliver a great game but also to help budding developers become familiar with web and software technologies behind our product.
