Jump to content
  • entries
    943
  • comments
    5,899
  • views
    924,477

Almost Android


Josh

3,113 views

 Share

Leadwerks 3 is compiling for Android. There's presently a problem with the file system that is preventing any 3D rendering, but we'll get that worked out shortly. We're targeting Android 2.2.

 

In order to compile C++ for Android on Windows, we had to install the following:

-Java SDK

-Eclipse IDE

-Android SDK

-Android NDK

-CygWin

-GDB

 

We also learned that OpenGL ES 2.0 does not run in the Android simulator. For the time being, we have to run the engine on an actual Android device. That was rather surprising, but I think Google will have this functionality added fairly soon. I also learned there is an x86 version of Android, but no one uses it.

 

Debugging C++ on Android is done with GDB, a command-line debugger. You definitely don't want to use this to do any heavy work. In this case, the cross-platform nature of coding with Leadwerks comes in handy, and you can debug on Windows or OSX and then just compile your finished code for Android, without much testing.

 

The plan is to allow one-step publishing for Android when you use Lua. You write your program in script, test it on PC or Mac, then you can export a package for Android that's ready to install on your phone, without even having to install the Android SDK. You can also use C++, and it takes more work, but it's not too hard and we'll have instructions on how to get set up.

 

Behold the mighty blue screen running on an HTC Evo, and tremble!:

 Share

10 Comments


Recommended Comments

I've written some Android apps, and from my experience it's indeed easier and more productive to write first a fully working Windows game, and then compile it for Android. With LE3 that will be super easy, because it's the first 3D engine which supports C++ on Android. Other engines use Lua, or similar scripting languages, but they are too slow for advanced games.

Link to comment

In my robot demo, I got about 20 FPS less in Lua than with C++, because it needs to calculate forces for each 8 limbs of each 40 robots each frame. That's apparently too much iterations for Lua. With LuaJIT it might be fast enough though. Sometimes there were also unexplainable halts for a second, which might be because of Lua's Gargabe Collection. In C++ it there are no halts.

 

Or did you mean the LE3 is the first C++ engine for Android? Yeah it is, because there are only 3 somewhat usable engines for Android, and one of them is pure Java, one is JavaScript, and one is Lua.

Link to comment

I would buy immediately a good Android engine if there was one. I bought already one, but it's not perfect. LE3 might be perfect, if it has shadows :)

Link to comment

Won't the shadows pretty much still have to be baked though? Isn't that a limitation of the hardware?

The capabilities are about the same as the Source engine, so you use lightmaps together with projected shadows. I've done these in the past, so it's easy for me to do.

Link to comment

It is.

 

I think Lua may be faster in L3D because the binding with C++ will probably be a lot more efficient than what we are doing now. Don't have any numbers to back that up, but it's just my guess.

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...