oNaiPs wrote:No idea

i managed to include a file in an apk putting it on res/raw and using some code (for instance with file named androidvncserver):
Android market has some restrictions on raw resource data, 1 or 2 megabytes, I don't remember. The officially supported way is to download data from the net yourself on the first run.
oNaiPs wrote:I guess you should change the downloader code, 70% of the times i download the data files from net, the app will crash... maybe if you download first the whole zip file and unzip after...
Yeah, I've noticed that - if the phone goes to sleep 'till data is downloading the app wil crash, I'll fix that.
kurosu wrote:bout the physical keyboard vs accelerometer, instead of the application doing that work, could the java part do the detection, for instance keyboard != Configuration.KEYBOARD_NOKEYS, and set like a static variable
Thanks for the reference. I thought of writing "Select your phone type" dialog which pops up on app first run where you can choose to use accelerometer or dpad or trackball etc.
Jug6ernaut wrote:kurosu wrote:Jug6ernaut wrote:Any one else getting a "Undefined Reference" error when trying to use TTF_OpenFont() :\
Wormux use SDL_ttf, and we don't have such problem. Are you sure the font you request is actually available? The freetype lib is separated from the whole android environment, so I expect you have to provide your own fonts.
wouldn't that cause a run time error not a compile error?
also how would I go about disabling the gsensor as soar? or have direct access to the gsensor?
I'm getting some REALLY bad performance compared to the (generally) same code running on wm. not sure y... sdl code on windows flys so idk what it is.
Dunno about SDL_ttf, I didn't test it, just included in the project and made sure it compiles. Please check that SDL_ttf properly links to freetype lib - check that LOCAL_STATIC_LIBRARIES var in SDL_ttf/Android.mk includes "freetype", and the libfreetype.a itself exports symbol TTF_OpenFont. I'll check it in Monday when I'll get to the office.
About performance: the only configuration where you're getting HW-acceleration is when you're using SDL 1.3, with revision tagged "android-market-release-01" or later. SDL 1.2 has only SW rendering available, I intend to add HW accelerated surfaces to it but it will require two weeks, if not more. Also you may use SDL 1.3 in OpenGL mode (it uses OpenGL internally anyway to be accelerated). Don't know about SDL 1.2, I did not test it with OpenGL.
Also HW acceleration depends on your app greatly - if you're drawing to 24 or 32 bpp 640x480 px SW surface you'll get awful performance, even though if it runs okay on your PC. Using 16 bpp surfaces will increase performance greatly, even if you're not using HW acceleration.
kurosu wrote:That's probably what I'll need to do. Currently, Wormux needs:
- shoot key (usually space, but I'll map it also to camera)
- left/right (to move the character, ok with accelerometer but I'll provide a way to deactivate it)
- up/down (to aim, ok with accelerometer)
- esc (to move out of menus, to change game options while playing)
- s (to start chatting, probably deactivated for Android)
- jump (mapped to enter, or ok button on dpads)
- mouse (we have kinetic motion now)
Except troublesome to handle mouse gestures (double clicks or the like), I hardly see how we can cram than many events with only touchscreen.
So, you need accelerometer for up/down/left/right, touchscreen for mouse input and 2 keys - to fire and to jump.
You can bind Fire to Menu key and Jump to Volume Up, and you even have one unused Volume Down key (I believe that keys are available on any device, correct me if I'm wrong).
Raw Android touchscreen events include your finger pressing force and radius of spot your finger touches, I think I can use that somehow to emulate double-click or right mouse click.
kurosu wrote:What about popping a
text entry of some kind (disclaimer: I know zilch about jni and the android platform), and import the resulting string into a native buffer?
That would be cool, if I'll manage to get virtual keyboard to be half-transparent and don't totally hide your app screen, however I think Android won't allow me to do that.
kurosu wrote:Back key is also usable, but should not be binded to any game action IMO because user should be able to close game anytime without any nasty popup dialogs like "Are you really want to exit (y/n)?". Well, just my thoughts about usability.
I've seen other people recommend this (for instance, our Maemo maintainer prefers the game to exit instantly, but as I said, we allow checking help, modify options etc during gameplay).
I meant that you should be able to exit by pressing Back key 5 times in a row for example, like in built-in web-browser. Exiting to game main menu is okay, just no confirmation dialogs plz.