Page 1 of 2

Work in Progress: Bringing T-Engine 4 to iOS and Android

Posted: Wed Apr 11, 2012 10:59 pm
by Rappler
Hello all! In what little spare time I have these days I'm investigating what it will take to bring TE4 to mobile platforms, specifically tablets (although a phone works in a pinch :) ). I'm making this post to condense my findings on the topic and share with anyone else who may be interested.

iOS

I've rebuilt all the engine's dependent libraries (SDL-1.3+, sdl_ttf, sdl_mixer, sdl_image, THEIR dependencies, etc) from source, mostly from the latest releases with darkgod's additions foward ported as needed. Important note: top-of-trunk SDL contains new mobile-specific functionality for both graphics and the touch interface that will have a place in new T-Engine code.

While most of the libraries build "out-of-the-box" using Xcode 4.3.1 but you'll need to download a GLu replacement for OpenGL ES at least: http://code.google.com/p/glues/.

Apple won't allow LuaJit to run under iOS, but either the interpreted version or the standard Lua engine should work fine. I'm using the standard implementation because I figure it is more likely to work :)

Here are the final linking issues I've hit during the engine build:

- The latest versions of PhysFS (not the one included with the t-engine source) contains iOS support, but some custom work from the engine had to be ported in due to the newer version missing those symbols required by the engine.
- OpenGL ES also does not provide the following functions.. but, here are the fixes!

glOrtho: http://stackoverflow.com/questions/7131 ... z-values-f
glClearDepth: http://stackoverflow.com/questions/4704 ... ng-problem
glPush/PopAttrib: http://stackoverflow.com/questions/4657 ... -opengl-es

- Many symbols exported in SDL_compat.h are missing. Issues in the compatibility layer aren't unexpected, but I haven't had time to look into these:
SDL_WM_ToggleFullScreen
SDL_SetAlpha
SDL_ListModes
SDL_SetGamma
SDL_WM_SetCaption
SDL_EnableRepeatKey

I've also been able to package the engine's requisite file structure and I don't think there will be any issues there. Adding additional TE4 modules (ie InfiniteRoad) once the app is installed on a device would require the device to be jailbroken (!). Save games are large, yes, but iPads start at 16GB... plus there's always iCloud :)

Android

I haven't really started on this side of things, but the process is similar to iOS. Use the Android NDK to build everything. It provides a mechanism for native-only applications, so a Java wrapper isn't a strict requirement. The OpenGL ES and SDL issues apply to Android as well as iOS. I haven't looked at Android support in PhysFS yet.

Happy hunting! :)

Re: Work in Progress: Bringing T-Engine 4 to iOS and Android

Posted: Fri Apr 13, 2012 8:28 pm
by yufra
Neat, keep us updated!

Re: Work in Progress: Bringing T-Engine 4 to iOS and Android

Posted: Wed May 02, 2012 3:06 am
by Manipulative
Eager Android user here!

I'm using an Asus Transformer TF101, anything I can do to help?

Re: Work in Progress: Bringing T-Engine 4 to iOS and Android

Posted: Thu Jun 28, 2012 4:15 am
by Salkhir
How is the project coming along? I saw something in the newest Beta Regarding changes to the font format for 'Driod' Devices, just going to assume that is in relation to this?

Re: Work in Progress: Bringing T-Engine 4 to iOS and Android

Posted: Thu Jun 28, 2012 11:29 am
by Grey
The font is just a standard fixed width font that I suggested be used because it looks nicer than the Vera one used before (especially the @ symbol).

Re: Work in Progress: Bringing T-Engine 4 to iOS and Android

Posted: Sat Jun 30, 2012 2:21 am
by heavensblade23
I'd also be very interested in seeing this on the App Store.

Re: Work in Progress: Bringing T-Engine 4 to iOS and Android

Posted: Mon Jul 09, 2012 9:49 am
by Aravan
Rappler wrote:I've also been able to package the engine's requisite file structure and I don't think there will be any issues there. Adding additional TE4 modules (ie InfiniteRoad) once the app is installed on a device would require the device to be jailbroken (!). Save games are large, yes, but iPads start at 16GB... plus there's always iCloud :)
Couldn't you use the iTunes sideloading functionality for modules etc.? Don't get me wrong, I'm on a jailbroken device, but it seems like a possible thing to implement.

Re: Work in Progress: Bringing T-Engine 4 to iOS and Android

Posted: Sun Aug 12, 2012 7:03 am
by Canderel
Any.progress?

Also how is Darkgod's own adventures in this genre coming along? Personally i see this (tablets and phones) the direction roguelikes will get a strong.life again.

Re: Work in Progress: Bringing T-Engine 4 to iOS and Android

Posted: Thu Feb 28, 2013 10:52 pm
by muso
Looks like this is an old thread now. Is it now dead in the water?

I'd support an Android / Ouya version on Kickstarter if it was feasible...

Re: Work in Progress: Bringing T-Engine 4 to iOS and Android

Posted: Fri Mar 01, 2013 3:34 pm
by darkyr
Just a small commentary: ToME is unable to work correctly on my netbook, Samsung N102S (bought a few months ago). Whereas a monolithic Nethack has no problem on my phone I guess the LUA stuff easily gets too heavy, and there is probably no hope of having ToME working on a standard phone. Maybe on very very expensive tablets but that's all.

Re: Work in Progress: Bringing T-Engine 4 to iOS and Android

Posted: Fri Mar 01, 2013 4:02 pm
by darkgod
Well yes it requires a real computer, with a CPU and a GPU and all such things; I think it can be made to work on android & ios yes

Re: Work in Progress: Bringing T-Engine 4 to iOS and Android

Posted: Fri Mar 01, 2013 4:06 pm
by Grey
muso wrote: I'd support an Android / Ouya version on Kickstarter if it was feasible...
I'd very strongly support an Android port :)

Re: Work in Progress: Bringing T-Engine 4 to iOS and Android

Posted: Thu Mar 07, 2013 8:47 pm
by chezzo
It should be a matter of using OpenGL for android and compiling it, yeah? Easy!*

* By, "easy" I mean may be possible, but I would have no idea how to do it.

Re: Work in Progress: Bringing T-Engine 4 to iOS and Android

Posted: Thu Mar 07, 2013 10:43 pm
by darkgod
It's veyr hard acually, but yeah "possible" :)

Re: Work in Progress: Bringing T-Engine 4 to iOS and Android

Posted: Sat Aug 03, 2013 8:51 am
by Zireael
You mean an Android port would actually be *possible*?