Thursday, January 31, 2013

Quick GUI Creation

I am working on a project of recreating an old game of Sierra called King's Quest IV - The Perils of Rosella in 3d, I am not working alone, we are a whole team working together.

We are using a gaming engine called AGS, which helps in creating games - especially quest games, anyway, this engine enables us to also play video files, but it supports natively only the compressed Theora format, which is an open source video codec which is the equivalent of DIVX just open source (Later on, Google bought the rights for this codec, and have [graded it and are actively using it, but they have left the previous version for the joy of the public).

So our graphic designer has created several video files which then she wanted to convert to the Theora format, but apparently it is hard to find a decent codec converter which doesn't need a license in computer science in order to just use it, why? because it is an open source project so anybody who wants to use it needs to be an IT geek?

As the IT guy, I have tested several Theora converters in order to find the best one which will convert the video files to the Theora format, while not losing quality but while reducing the file size to a rational size.

The best converter I found was ffmpeg2theora, which gave the best quality and the smallest file size.
It reduced the original 81mb avi file to a 274kb Theora file without losing quality!

So I sent my recommendations to our graphic designer - it didn't help, this is a command line utility...

Which brings me to the main topic of this post - Quick GUI Creation - how can I create and quick and useful GUI without a lot of hassle?!

Natively I am a Java & Android developer so I thought about using my existing skills - to no good.

Obviously, Android development doesn't help here.
So maybe I can build a Swing Java GUI?

Well, I can, it will look good and will have all of the power of Java behind it, but it won't be useful for most of the world (including my graphic designer) because in order to run a Java GUI one needs to have a Java Runtime environment to be installed and then he needs to know how to run a JAR file as if he runs an EXE.

So, I can package the JRE as a portable option which will enable the designer to download the Portable java environment (This is an application that PortableApps have created - JPortable) with a Java jar runner (JPortable Launcher by the same PortableApps company) and the actual application, but still it is a real hassle and instead of downloading a small application (less than 1mb), the user will need to download more than 100mb of an application!  So Java is a no go.

I asked my friend Netanel, which is my IT Guru, and he suggested using AutoIT.

So I tried it, and found it to be a great solution!

I have created a full sophisticated GUI app, which conveniently uses the commandline converter behind the scenes, and weighs about 0.5mb of a simple EXE file.

Exactly what I needed.

I will get in more details about AutoIT, the other solutions available and how to use it in the next posts.

No comments: