vendredi 21 octobre 2011

Alkemy Companion Preview 5 available.

The new preview of the Alkemy Companion  is available. Damages are now displayed for every profile, and as usual for those previews, without any sexy layout for now.

But for this preview, there is a more interesting feature. Yesterday, MiniWar Tactical Companion opened its access to the Table Top Tournament feeds view. The Alkemy companion illustrate that feature so you can non, from this app, check the feeds for upcoming Alkemy tournaments. Of course, it is mandatory to install the MiniWar Tactical Companion. But don't panic, you will be informed and brought to the market if needed.

Once you click on the "Check Tournaments" button, the application will check if the T3 Feeds service is available. If not, a message will be displayed to invite you to download the MiniWar Tactical Companion app from the Market.

if you have more than one application on your device wich can respond to your request, you will be prompted to choose which to use. Feel free to choose the one you prefer.

On the MiniWar Companion T3 feeds, you may have an empty list if no tournaments where declared on T3. The current version of the app will display the International feeds. Take your time to check the other feeds, especially if there is one for an area you may be interested in.

Stay tuned for futur improvements.

mercredi 19 octobre 2011

MiniWar Companion v1.3.3

After a focus on the Alkemy Companion, here comes a new update of the tactical companion. This update is basically a bug fix on the Table Top Tournament Rss feeds view so now, you will not see an error if fetching the data is too long. This is the behavior it should always have had.

But this update also introduce a new feature. Now it is possible to call the Table Top Tournament Rss feeds view from any application on the device, using the exposed intent. If you want to call the view from your app, simply create an intent as the example bellow:

Intent intent = new Intent("net.tabletoptournaments.rssfeeds.GETFEED"); 

But there is one more thing: the display can be filtered. Simply add a gameFilter String extra in your intent with the name of a game system and the view will only display the related upcoming tournaments. The previous example could be:

Intent intent = new Intent("net.tabletoptournaments.rssfeeds.GETFEED"); 
intent.putExtra("gameFilter", "Alkemy"); 

The game system name should be one provided by T3, otherwise you will filter everything. It is of course possible that at a given time, there is no tournament for your game system. The list will be empty then. But you should check the other feeds since a tournament can take place in another country.

And yes, you will be able to filter the tournaments displayed on this view. The filter on the game system exists (it is already accessible trough the menu on the T3 view), we just have to finish its integration.

dimanche 16 octobre 2011

Reference data management in Alkemy Companion

The Alkemy companion can be declined in several kind of applications. Of course, here you have the Android app. Before that, the model of this application was tested as a web app. And you can also imagine a desktop app, an iPhone app, or whatever. There could be a lot of work adapting the software from Java to Objective-C or any other language. That is known and unavoidable. But in all those versions, the data should remain the same. So how can we carry the data from one context to the other with a minimum of transformation, none should be the best ?

First, let see the problem. As a webapp, the Alkemy data is usually stored in a database. This data, all the game references (profiles, abilities, descriptions...) should be available on startup. Even as a webapp, we should consider distributing the code, which means the reference data. If we impose the technology (Java), we shouldn't impose the database. Adding such a constraint would prevent the usage of our application. In an Open Source project, we could count on the implication of the community to translate the scripts from a database system to another. But that work should be made the easiest possible. An other constraint to mention is : how to deal with location ? A web application may display its informations in any language depending on the client, but if the application on a device, you may want to load only the data in the language of the device.

Fortunately, database systems offer a great functionality for this. People usually rely on the database dumps which generate huge SQL queries. This is not the best practice. For data portability, first, we should have a good designed database structure. That design will impose the structure creation queries which are specific to each database management system. For the Alkemy applications, we have something like :

faction(id, name)
profile(id, name, title, factionKey)

The model above does of course not show all data. Writing structural queries is pretty simple, even with the constraints. What about the data ? Well lets organize them as follow : lets write a first text file with lets say

"rk","Khaliman republic"
"tj","Empire of the Jade Triad"
"na","Aurlok Nation"
"ka","Kingdom of Avalon"

And a second with
"rkc01","Cheikh Araoui Ibn Khalid","Khaliman diplomat","rk"
"rkc02","Kabircheikh Hakim Ibn Khalid","Khaliman ambassador","rk"
"rkc03","Dahlia Ibn Malikh","rk"
"tjc01","Captain Lee Ping of the Xi-Yì militia","tj"
On MySql, you can now use the LOAD DATA INFILE statement. This will give, for the factions, something like :

Write another query for profiles.txt and the faction table. Do the same for every file and table. This way, you can load your data more efficiently into the tables, even shortcutting foreign key constraints by issuing a foreign_key_check to 0 prior to the command. This is also a portable command since, for example, the syntaxe is the same for Oracle.

But another benefit is for location, if you want to load only the local data. Write as many localized, and so identified files as needed. The easiest management way is to add the local in the name. During the initialization of the database, simply check the local and load the corresponding file. Here you are, simple and easy.

Now, lets say that you write an Android App. The specifications ask to use the onCreate and onUpgrade functions and load the data into the SQLite database. Instead hard coding queries, you can write only one parameterized query and parse the text file. I18n may is dealt the same way. The benefit of this approach on a mobile device is that you can use the insertion function independently of the data storage source. You can read the data from a local file, may this be shipped with the application or downloaded afterward, but you can also gather data from lets say webservices in the format you want.

So, remember, reference data should never be stuck to its transporter. If you plan to use it in a variety of platforms, favorise a format independent of any platform,and think of all the ways you can load complement data to your datasource. 

lundi 3 octobre 2011

Alkemy Companion Preview 4 available

A new preview is available for the Alkemy Companion. In this release :
  • The throwing weapons have been added as abilities and are displayed in the abilities area.
  • All abilities are now displayed with the correct value in the profile details view.
  • The app have been redesigned so the profile details are now displayed as views ans not dialogs. The landscape view have also been adapted.
  • Some bug fixes.
This is a nice update since there is only a little to do until a final 1.0 version. In the todo list, we have :
  • Add the damage table in the profiles.
  • Allow some details display in the profiles detailed view (such as the abilities definitions)
  • Add the specific alkemical informations. This will be the hardest task since the data management is to be designed.
Once this will be done, we can consider a usable application. Some graphic update will come right after. Then the additions such as the personal lists display.

Update now tho get the new release or download the application for your Android phone form the market there :
Of use the following QR Code with your Android device to get the app.