What a different story things are today!
I dusted off my unfinished Snake port, and it now works without modification.

Since I did it so long ago, there was no telling what magic I had in there to make it work on MonoDroid, so I ported another one from scratch. I grabbed the hardest sample I think they have: JetBoy. It's basically a fast-paced, Guitar Hero-esque game where you have to fire your laser to the music as each asteroid passes across the beat line.
After an afternoon of literal translation to C# (over 1k LOC), I fixed up the few Java porting issues like anonymous classes and nested classes accessing the parent class's private variables, and it *just worked*.

I think we're getting pretty close on finishing up our first release MonoDroid, and I can't wait to see what apps people write with it.
Both samples are available in our MonoDroid samples GitHub repository.

3 comments:
I cannot wait. This will make writing apps that support both Android and iOS so much easier.
JetBoy is indeed a nice translation. Nice work :)
Is it deemed to be "done" now?
I ask as, whilst it works, it doesn't start in the right orientation (tested from Windows), unlike the original Java version (tested on OS X).
The game should work in landscape orientation but the MonoDroid version stays in portrait.
Is this a known issue that is pending fixing?
- Brian
Aha!
I played around and after going through the learning process of the manifest not really being there, I eventually spotted this missing from the activity attribute:
ScreenOrientation = Android.Content.PM.ScreenOrientation.Landscape
it's also missing this from the original:
Icon = "@drawable/icon"
Post a Comment