Getting to other Platforms (iOS/HTML5 etc) - TouchAPi

For those still interested, I got the flash version working:

http://www.legendsofyore.com/flex/

It’s got performance issues and the standard set of flash issues (doesn’t run well on OSX). I’m working with the GWT4Flash to improve things but it’s definitely a possible pipeline :slight_smile:

Cheers,

Kev

Cool progress! Definitely too slow right now (even on Windows) but I’ll bet you’ll work that out :wink:

Chrome seems to give the best results by the way, it’s at least a consistent lag between clicking and response then.

Cheers,

Kev

Confirmed. Firefox is much slower than Chrome, at least on my machine here.

Chrome can be considered “nearly playable” ;D

I have a question regarding different screen/device resolutions. What is the best approach to deal with them for TouchAPi?
I assume you have some scaling mechanism builtin. But is it smarter to code and create graphics for a higher resolution (say IPad) and scale down on Android or old IPhone OR is it better to create the game for a low resolution and let TouchAPi scale up?

Can an app using TouchAPi have different resolutions on different devices (like 1024 x 768 on desktop app and something like 480 x 320 on Android or IPhone 3)?

seems fast enough on Opera - only the lick lag, but its like 800ms
playable
not that fast of a game anyway =P

Had a look at another way of converting from Java to AS3. This one converts the Java source to AS3 source:

http://dl.dropbox.com/u/1668516/flash/index.html

There’s a tool called Java2AS3 which get you about halfway. Then I use JAD to decompile compiled java to remove some of the more annoying incompatibilities between Java and Flash. Finally some resources embedded scripts and some minor token replaces to get to AS3 - which I come with the open source AS3 compile and bing :slight_smile:

Unfortunately, it relies on having some conventions in your java source (can’t use method overloading for instance) so you’d really need to know you were targetting flash from the start or have a bit of rework to do on your code base (hence this isn’t going to work for legends in the short term).

Still, nice to know there’s another alternative. Plus side is of course that the code performs as well as any flash application and that the packaging looks exactly like a flash game, i.e. a single SWF. I expect to be using it for a few mini games in the future.

Cheers,

Kev

Just added some minor performance improvements.

Cheers,

Kev

That is cool, much faster start-up than java with no annoying logos.

So is this the tool that you are using to go from Java to SWF? I can’t see any downloadable files or browse CVS.

I also notice that there is this:

And this too:
http://wiki.eclipse.org/E4/SWT/Running_the_demos

Which all seem unrelated to each other.

I’ve done a bit more work using the Java2AS3 stuff and made stuff work a bit better. Here’s a comparison page between Java Applet / HTML5+JS and Flash:

http://www.cokeandcode.com/fruitypops/

Be warned, running a bunch of different techs in the same page like that can have some annoying side effects. However, it tries to show the differences in performance, stability and start up time.

One java code base for all deployments. Android, iPhone, WebOS and Desktop outputs would work fine.

Cheers,

Kev

You just pointed me here from twitter, and i’ve already been following you for some time…

as i said, great work and please keep us updated on anything relating to the awesome #touchAPI and if you ever need a volunteer to work on this with you, i’m 100% ready