Hi there. I was writing a translator for this exact purpose but there are a few problems with doing this. You can find the thread
here. Basically the issue is that some of the platforms AppGameKit deploys to have an in-built loop that you have to put your code in. I seem to remember Meego was one and possibly iOS another... What this means is that all your game code has to be in a callback function that is called every loop. To make tier 2 cross platform, TGC have created a clever template that acts as a wrapper for this system on platforms that already have it and implements this system on platforms that don't like Windows. What I'm getting at here is that whilst my translator (normally) manages to translate the code correctly, it can't easily translate in to this very rigid structure and you would suffer from the same problems if you were translating manually. Let me give you an example.
If you had this code in tier 1:
nImage = LoadImage("myimage.png")
nSprite = CreateSprite(nImage)
SetSpritePosition(nSprite, 100, 100)
do
Print("Hello World!")
Sync()
loop
it could become this code in tier 2:
// Includes, namespace and prototypes
#include "agk.h"
#include "template.h"
app App;
void app::End(){}
void app::Loop()
{
agk::Print("Hello World!");
agk::Sync();
}
void app::Begin()
{
int nImage = agk::LoadImage("myimage.png");
int nSprite = agk::CreateSprite(nImage);
agk::SetSpritePosition(nSprite, 100, 100);
}
but if you had this code in tier 1:
nImage = LoadImage("myimage.png")
nSprite = CreateSprite(nImage)
SetSpritePosition(nSprite, 100, 100)
repeat
Print("No Touch")
Sync()
until GetPointerPressed() = 1
do
Print("Hello World!")
Sync()
loop
then you couldn't easily translate it because you have two loops. Manual translation might become something like this:
// Includes, namespace and prototypes
#include "agk.h"
#include "template.h"
app App;
int nLoopID = 0;
void app::End(){}
void app::Loop()
{
if (nLoopID == 0)
{
agk::Print("No Touch");
if (GetPointerPressed() == 1)
nLoopID = 1;
}
else if (nLoopID == 1)
{
agk::Print("Hello World!");
}
agk::Sync();
}
void app::Begin()
{
int nImage = agk::LoadImage("myimage.png");
int nSprite = agk::CreateSprite(nImage);
agk::SetSpritePosition(nSprite, 100, 100);
}
but as you can see, this is a pretty major rewrite even for a very simple bit of code.
So basically, you can use my translator to translate the code to save you doing it manually but you'll still have to mash it up so that it fits the template or accept that you will only every deploy to those platforms that don't have the same requirements. I should also point out that I'm not actively working on the translator at the moment because this issue seems to me to have greatly reduced its value although I'm happy to help out with using it and fixing anything if you actually want to have a go with it. Hope that helps.