Android - V10 release candidate

Previous topic - Next topic

MrTAToad

Does loading bitmaps on Android work - mine seems to crash when attempting to do so...

Kitty Hello

I did a quick test and, yes I could load sprites.

They must be in the "Media" directory!! I copy the contents of that to the android project on compile.

matchy

Quote from: matchy on 2011-Apr-24
These work:
- loadsprite/loadfont/loadsound

I've only tested transparent PNG only (GLB website logo), smalfont.png and snd.WAV file formats.

MrTAToad

The BMP file was certainly present in the Media directory

Code (glbasic) Select

PRINT "Ok1!",0,0; SHOWSCREEN; MOUSEWAIT
LOADSPRITE "Media/line.bmp",self.sprite%
PRINT "Ok2!",0,0; SHOWSCREEN; MOUSEWAIT


Ok1 was displayed, but when the screen was pressed, the program crashes to the main screen, with Ok2 not being displayed.

Kitty Hello

paste the logfile? In android/bin there's a file "_logview.bat"

If not, try:
Code (glbasic) Select

@ECHO OFF

:: install Android SDK, Android NDK
:: install JDK


set HERE=%~dp0

set ANDROIDSDK=%HERE%..\android-sdk-windows
set JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_24


set PATH=%JAVA_HOME%\bin;%PATH%

"%ANDROIDSDK%\platform-tools\adb.exe" shell logcat *:I


IF "%NOPAUSE%"=="" PAUSE


MrTAToad

#80
Once it's charged up, I'll try and find it.  The tablet goes through power like anything...

Another with - with the version number, I'm currently using 001.001, however, when packing for webOS, the routine is using a slightly different version string of :

creating package com.unmap.vectoreditor_000.001.0_all.ipk in C:\Users\Nicholas\Documents\GLBasic\Utilities\VectorEditor

The tablet crash seems to have sorted itself out now... :blink:

Albert

My project was on d: and my glbasic was on c: so the glb_build.bat cannot changed dir, because it should to change the drive first...

Kitty Hello

OK. Will have to fix that, too.

Albert

Thank you. Everyhing working just fine and smooth! Except the music.  :nw:

MrTAToad

#84
This is the log file crash I get when loading a bitmap (its either a sprite or a font file) :

QuoteD/alogcat ( 3240): stopping ...
D/alogcat ( 3240): stopped
D/alogcat ( 3240): starting ...
W/InputManagerService( 1412): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@45e64278
D/StatusBar( 1412): ***** HomeKey Pressed
I/ActivityManager( 1412): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.wmt.launcher/com.android.launcher2.Launcher }
V/alogcat ( 3240): save instance
V/alogcat ( 3240): paused
W/InputManagerService( 1412): Ignoring hideSoftInput of: com.android.internal.view.IInputMethodClient$Stub$Proxy@45e4e390
I/ActivityManager( 1412): No longer want android.process.media (pid 1689): hidden #16
D/alogcat ( 3240): stopping ...
D/alogcat ( 3240): stopped
D/Launcher.AllApps2D( 1562): -------------------------------showGroupedApps :8888 items NUM:41
D/dalvikvm( 1562): GC_EXTERNAL_ALLOC freed 788 objects / 38824 bytes in 141ms
I/ActivityManager( 1412): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.unmap.vectoreditor/org.libsdl.app.SDLActivity }
I/ActivityManager( 1412): Start proc com.unmap.vectoreditor for activity com.unmap.vectoreditor/org.libsdl.app.SDLActivity: pid=3371 uid=10045 gids={3003}
D/cursor  ( 1412): cursor_rotate 3
I/WindowManagerService( 1412): Setting rotation to 3, animFlags=1
I/ActivityManager( 1412): Config changed: { scale=1.0 imsi=0/0 loc=en_GB touch=3 keys=1/1/2 nav=1/1 orien=1 layout=35 uiMode=17 seq=11}
D/StatusBarPolicy( 1412): ***** ro.wmt.ui.portrait.hide.capbtn = 1
D/StatusBarPolicy( 1412): ***** wm.getRotation = 3
D/dalvikvm( 3371): Trying to load lib /data/data/com.unmap.vectoreditor/lib/libSDL.so 0x45f044c8
D/dalvikvm( 3371): Added shared lib /data/data/com.unmap.vectoreditor/lib/libSDL.so 0x45f044c8
D/dalvikvm( 3371): Trying to load lib /data/data/com.unmap.vectoreditor/lib/libSDL_image.so 0x45f044c8
D/dalvikvm( 3371): Added shared lib /data/data/com.unmap.vectoreditor/lib/libSDL_image.so 0x45f044c8
D/dalvikvm( 3371): No JNI_OnLoad found in /data/data/com.unmap.vectoreditor/lib/libSDL_image.so 0x45f044c8, skipping init
D/dalvikvm( 3371): Trying to load lib /data/data/com.unmap.vectoreditor/lib/libmikmod.so 0x45f044c8
D/dalvikvm( 3371): Added shared lib /data/data/com.unmap.vectoreditor/lib/libmikmod.so 0x45f044c8
D/dalvikvm( 3371): No JNI_OnLoad found in /data/data/com.unmap.vectoreditor/lib/libmikmod.so 0x45f044c8, skipping init
D/dalvikvm( 3371): Trying to load lib /data/data/com.unmap.vectoreditor/lib/libSDL_mixer.so 0x45f044c8
D/dalvikvm( 3371): Added shared lib /data/data/com.unmap.vectoreditor/lib/libSDL_mixer.so 0x45f044c8
D/dalvikvm( 3371): No JNI_OnLoad found in /data/data/com.unmap.vectoreditor/lib/libSDL_mixer.so 0x45f044c8, skipping init
D/dalvikvm( 3371): Trying to load lib /data/data/com.unmap.vectoreditor/lib/libSDL_ttf.so 0x45f044c8
D/dalvikvm( 3371): Added shared lib /data/data/com.unmap.vectoreditor/lib/libSDL_ttf.so 0x45f044c8
D/dalvikvm( 3371): No JNI_OnLoad found in /data/data/com.unmap.vectoreditor/lib/libSDL_ttf.so 0x45f044c8, skipping init
D/dalvikvm( 3371): Trying to load lib /data/data/com.unmap.vectoreditor/lib/libmain.so 0x45f044c8
D/dalvikvm( 3371): Added shared lib /data/data/com.unmap.vectoreditor/lib/libmain.so 0x45f044c8
I/glbasic ( 3371): Updating media files
I/copyAssets( 3371): assets found, copying...
I/copyAssets( 3371): assets still up to date, cancelling...
I/glbasic ( 3371): done with updating
I/glbasic ( 3371): external files dir is /data/data/com.unmap.vectoreditor/files
I/SDL     ( 3371): onResume()
I/ActivityManager( 1412): Displayed activity com.unmap.vectoreditor/org.libsdl.app.SDLActivity: 3775 ms (total 3775 ms)
I/SDL     ( 3371): pixel format unknown -1
I/SDL     ( 3371): SDL_Android_Init()
I/glbasic ( 3371): SDL_init video
I/glbasic ( 3371): SDL_GetVideoInfo = 480x800 @ 16 bpp
I/glbasic ( 3371): Setting video mode: 480x800x16 fl=4800000
I/SDL     ( 3371): [STUB] GL_LoadLibrary
V/SDL     ( 3371): Starting up OpenGL ES 1.1
D/libEGL  ( 3371): egl.cfg not found, using default config
D/libEGL  ( 3371): loaded /system/lib/egl/libGLES_android.so
I/glbasic ( 3371): SDL_SetVideoMode seems to be 1
I/glbasic ( 3371): BGRA ext NOT supported
I/glbasic ( 3371): GL_OES_byte_coordinates GL_OES_fixed_point GL_OES_single_precision GL_OES_read_format GL_OES_compressed_paletted_texture GL_OES_draw_texture GL_OES_matrix_get GL_OES_query_matrix GL_OES_EGL_image GL_OES_compressed_ETC1_RGB8_texture GL_ARB_texture_compression GL_ARB_texture_non_power_of_two GL_ANDROID_user_clip_plane GL_ANDROID_vertex_buffer_object GL_ANDROID_generate_mipmap
I/glbasic ( 3371): set cdir to: /data/data/com.unmap.vectoreditor
I/glbasic ( 3371): exepath=curdir= /data/data/com.unmap.vectoreditor
V/SDL     ( 3371): SDL audio: opening device
V/SDL     ( 3371): SDL audio: wanted stereo 16-bit 44.1kHz, 4096 frames buffer
V/SDL     ( 3371): SDL audio: got stereo 16-bit 44.1kHz, 16384 frames buffer
I/glbasic ( 3371): set cdir to: files
I/glbasic ( 3371): Init Finalized
I/DEBUG   ( 2281): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   ( 2281): Build fingerprint: 'generic/generic/generic/:2.2/Froyo/v1.2.0-20110321.152349:eng/'
I/DEBUG   ( 2281): pid: 3371, tid: 3382  >>> com.unmap.vectoreditor <<<
I/DEBUG   ( 2281): signal 7 (SIGBUS), fault addr 00000000
I/DEBUG   ( 2281):  r0 00000000  r1 0022e20e  r2 00003036  r3 4882b70a
I/DEBUG   ( 2281):  r4 81d25590  r5 439b2008  r6 0021ea18  r7 42086fc0
I/DEBUG   ( 2281):  r8 4882bd58  r9 42086fb8  10 42086fa4  fp 4882b6e4
I/DEBUG   ( 2281):  ip 00000000  sp 4882b6d0  lr 81c82f0c  pc 81c82f70  cpsr 60000010
D/dalvikvm( 1412): GC_EXPLICIT freed 13277 objects / 729424 bytes in 269ms
I/DEBUG   ( 2281):          #00  pc 00082f70  /data/data/com.unmap.vectoreditor/lib/libmain.so
I/DEBUG   ( 2281):          #01  lr 81c82f0c  /data/data/com.unmap.vectoreditor/lib/libmain.so
I/DEBUG   ( 2281):
I/DEBUG   ( 2281): code around pc:
I/DEBUG   ( 2281): 81c82f50 e51b3008 e1a03c23 e1822003 e51b3014
I/DEBUG   ( 2281): 81c82f60 e5832000 ea000002 e51b2008 e51b3014
I/DEBUG   ( 2281): 81c82f70 e5832000 e3a03001 e1a00003 e24bd004
I/DEBUG   ( 2281): 81c82f80 e8bd8800 e92d4800 e28db004 e24dd008
I/DEBUG   ( 2281): 81c82f90 e50b0008 e1a03001 e14b30ba ebff83d3
I/DEBUG   ( 2281):
I/DEBUG   ( 2281): code around lr:
I/DEBUG   ( 2281): 81c82eec e1a03000 e2233001 e20330ff e3530000
I/DEBUG   ( 2281): 81c82efc 0a000001 e3a03000 ea00001b ebff83f8
I/DEBUG   ( 2281): 81c82f0c e1a03000 e3530000 03a03000 13a03001
I/DEBUG   ( 2281): 81c82f1c e20330ff e3530000 0a00000f e51b3008
I/DEBUG   ( 2281): 81c82f2c e1a02c03 e51b3008 e1a03403 e20338ff
I/DEBUG   ( 2281):
I/DEBUG   ( 2281): stack:
I/DEBUG   ( 2281):     4882b690  afd41b6c  /system/lib/libc.so
I/DEBUG   ( 2281):     4882b694  00000004 
I/DEBUG   ( 2281):     4882b698  00000ffe 
I/DEBUG   ( 2281):     4882b69c  00000004 
I/DEBUG   ( 2281):     4882b6a0  4882b716 
I/DEBUG   ( 2281):     4882b6a4  81d25590  /data/data/com.unmap.vectoreditor/lib/libmain.so
I/DEBUG   ( 2281):     4882b6a8  439b2008 
I/DEBUG   ( 2281):     4882b6ac  0021ea18  [heap]
I/DEBUG   ( 2281):     4882b6b0  42086fc0 
I/DEBUG   ( 2281):     4882b6b4  81c64bd8  /data/data/com.unmap.vectoreditor/lib/libmain.so
I/DEBUG   ( 2281):     4882b6b8  4882b720 
I/DEBUG   ( 2281):     4882b6bc  00000004 
I/DEBUG   ( 2281):     4882b6c0  4882b6dc 
I/DEBUG   ( 2281):     4882b6c4  0001b6f8  [heap]
I/DEBUG   ( 2281):     4882b6c8  df002777 
I/DEBUG   ( 2281):     4882b6cc  e3a070ad 
I/DEBUG   ( 2281): #00 4882b6d0  4882b70a 
I/DEBUG   ( 2281):     4882b6d4  4882b6f8 
I/DEBUG   ( 2281):     4882b6d8  4882b716 
I/DEBUG   ( 2281):     4882b6dc  00003036 
I/DEBUG   ( 2281):     4882b6e0  4882b784 
I/DEBUG   ( 2281):     4882b6e4  81c932e0  /data/data/com.unmap.vectoreditor/lib/libmain.so
I/DEBUG   ( 2281):     4882b6e8  00201038  [heap]
I/DEBUG   ( 2281):     4882b6ec  008000ff 
I/DEBUG   ( 2281):     4882b6f0  0021f228  [heap]
I/DEBUG   ( 2281):     4882b6f4  4882b7a0 
I/DEBUG   ( 2281):     4882b6f8  afd41b6c  /system/lib/libc.so
I/DEBUG   ( 2281):     4882b6fc  00000000 
I/DEBUG   ( 2281):     4882b700  00003036 
I/DEBUG   ( 2281):     4882b704  00000006 
I/DEBUG   ( 2281):     4882b708  00211e60  [heap]
I/DEBUG   ( 2281):     4882b70c  80c1e870  /system/lib/libdvm.so
I/DEBUG   ( 2281):     4882b710  4882b720 
I/DEBUG   ( 2281):     4882b714  424dd794 
D/Zygote  ( 1178): Process 3371 terminated by signal (7)
I/ActivityManager( 1412): Process com.unmap.vectoreditor (pid 3371) has died.
I/WindowManagerService( 1412): WIN DEATH: Window{46076b40 com.unmap.vectoreditor/org.libsdl.app.SDLActivity paused=false}
I/WindowManagerService( 1412): WIN DEATH: Window{46099f28 SurfaceView paused=false}
D/cursor  ( 1412): cursor_rotate 0
I/WindowManagerService( 1412): Setting rotation to 0, animFlags=1
I/ActivityManager( 1412): Config changed: { scale=1.0 imsi=0/0 loc=en_GB touch=3 keys=1/1/2 nav=1/1 orien=2 layout=35 uiMode=17 seq=12}
I/UsageStats( 1412): Unexpected resume of com.wmt.launcher while already resumed in com.unmap.vectoreditor
I/BootReceiver( 1412): Copying /data/tombstones/tombstone_02 to DropBox (SYSTEM_TOMBSTONE)
D/StatusBarPolicy( 1412): ***** ro.wmt.ui.portrait.hide.capbtn = 1
D/StatusBarPolicy( 1412): ***** wm.getRotation = 0
W/InputManagerService( 1412): Got RemoteException sending setActive(false) notification to pid 3371 uid 10045
D/dalvikvm( 1412): GC_EXPLICIT freed 3708 objects / 875432 bytes in 159ms
D/StatusBar( 1412): ***** HomeKey Pressed
I/ActivityManager( 1412): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.wmt.launcher/com.android.launcher2.Launcher }
D/dalvikvm( 1562): GC_EXTERNAL_ALLOC freed 1137 objects / 53816 bytes in 136ms
I/ActivityManager( 1412): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.jtb.alogcat/.LogActivity bnds=[223,43][301,141] }
D/alogcat ( 3240): stopping ...
D/alogcat ( 3240): canceling periodic saves
D/alogcat ( 3240): starting ...
V/alogcat ( 3240): started
V/alogcat ( 3240): resumed

[attachment deleted by admin]

Albert

I've compiled my game to Android and I found, that if I move/turn my device my hero walk and jump. I'm implemented some joypad support, so I think there is some joy and accelerometer issue.

Xaron

This is AWESOME! Thanks, Danke! Einfach toll! Great!  :happy:

Any ETA when this will be in the official non beta version? :)

Cheers - Xaron

Xaron

#87
Quote from: matchy on 2011-Apr-24

These are not working properly:
- drawrect/drawline; no color only white  :S

Hmm... works for me on my Android.

edit: Is there a way to disable the debug mode yet? I have around 2-5 FPS on my Desire HD.

Xaron

Ok, one thing which is driving me crazy are the different device resolutions for Android:

So my game has a resolution of 480x320 but I get a black border on my Desire HD (which has 800x480):



Is there a way to center that image? I don't want to stretch it to full size just want to keep the aspect ratio and stretch it.

Here's a screeny from a Wildfire:



Same problem but now the menu on the right site is missing because it has only 320x240...

Ian Price

OOOHH!!! That game looks lovely Xaron!

Any chance of sharing a demo with the community?

I love tactical games like Advance Wars, HistoryLine 1914-1918 and Battle Isle etc. That looks like it'll keep me happy for a while.

Will you only be releasing for Android devices - I don't have one of those :(
I came. I saw. I played.