draconisPW / PWMAngband

A free, multi-player roguelike dungeon exploration game based on Angband
35 stars 12 forks source link

Update Android client #538

Closed s88100 closed 2 years ago

s88100 commented 2 years ago

java code dependencies:

/src/android/pwmangclient/build.gradle
dependencies {
    implementation 'androidx.appcompat:appcompat:1.1.0'
}

in compileSdkVersion 30 - 31 may be warnings: Manifest merger failed : android:exported needs to be explicitly specified for element <activity#org.pwmangband.pwmangclient.PWMAngClient>. Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details. android:name="android.permission.MANAGE_EXTERNAL_STORAGE" https://stackoverflow.com/questions/68140893/android-studio-throwing-ioexception-operation-not-permitted compileSdkVersion 28, targetSdkVersion 28 works correctly.

when I click 'Make Project' it downloads automatically Preparing "Install NDK (Side by side) 21.4.7075529 (revision: 21.4.7075529)". Preparing "Install Android SDK Build-Tools 30.0.3 (revision: 30.0.3)". tested on Android 12(API 31), Android 11, Android 4.4 client is running

window 'Allow' appears but without wait if (!storageAvailable()) finish(); client closes and needs to be restarted with SD card access allowed. pwm-image

s88100 commented 2 years ago

checked connect to home server. in emulator keyboard control problems. android-studio intercepts keyboard. pwmangclient.ini

[MAngband]
nick=PLAYER
pass=pass
host=192.168.1.2
;meta_address=mangband.org
;meta_port=8802
DisableNumlock=1
LighterBlue=1
IntroMusic=1

lib/user/sdl2init.txt

window-wallpaper-path:0:/storage/emulated/0/PWMAngband/lib/icons/001.jpg
window-wallpaper-mode:0:scaled

pwma-image2

s88100 commented 2 years ago

also works server Termux https://github.com/termux/termux-app

pkg upgrade

pkg install build-essential autoconf

may be required

pkg install wget unzip mc nano htop

pwmangclient.ini
host=localhost

but if android connects to windows server character is not saved. restart and displayed: a) Name... (deceased, expires in 255 days) deleted the character, created a new one and booted from the place where first left. update: this error happens with android device there is no error on emulator.

character doesn't run with shift + numlock, only shift + arrows or key ' . ' run.

s88100 commented 2 years ago

compiled PWMAngband on Windows and tested home server connection via windows android emulator. the Player is saved and loaded fine. if 'Open Project' displays an error, chose 'Import Project' this should work. pwma-image3

s88100 commented 2 years ago

checked run shift+numlock works. (does not run on Android Studio Emulator) or something needs to be configured in Settings -> System -> Languages ​​& input

Android architecture 'x86', 'x86_64' should work correctly character creation error in architecture 'armeabi-v7a' checked android Linux Deploy + VNC Viewer (debian jessie (lxde), linux armhf) same error a) Player... (deceased, expires in 255 days) and in the create character menu c) Reroll this character writes 'Quitting: Unknown packet type' (also in pwmangclient.apk) ~/.pwmangrc host=localhost I was able to enter the game 'c) Reroll this character' loaded the character Screenshot_2022-03-20-22-41-27-990

Screenshot_2022-03-20-22-50-21-123

s88100 commented 2 years ago

checked terminal output 'x86_64' and 'arm'

Linux Deploy 'armhf' terminal:
client/ui-birth.c: In function 'get_char_name':
client/ui-birth.c:1923:33: warning: comparison is always false due to limited range of data type [-Wtype-limits]
         else if (char_expiry[i] == -1)
                                 ^
client/ui-birth.c:1970:80: warning: comparison is always false due to limited range of data type [-Wtype-limits]
         if ((i == (size_t)char_num) || (char_expiry[i] > 0) || (char_expiry[i] == -1))
                                                                                ^
Successfully compiled client/ui-birth.c.

pwma-sdl-armhf.txt pwma-sdl-x86_64.txt

s88100 commented 2 years ago

in 'x86_64' only one: warning: comparison is always false due to limited range of data type

common/net-unix.c: In function ‘DgramConnect’:
common/net-unix.c:1712:33: warning: comparison is always false due to limited range of data type [-Wtype-limits]
 1712 |     if (addr_in.sin_addr.s_addr == (unsigned long)-1)
      |                                 ^~

'armhf' terminal: warning: comparison is always false due to limited range of data type client/c-cmd.c: In function 'cmd_master_aux_generate_item_aux' client/c-cmd.c: In function 'cmd_master_aux_summon_type' client/c-cmd.c: In function 'cmd_master_aux_summon' client/ui-birth.c: In function 'get_char_name' client/ui-input.c: In function 'inkey_ex' common/z-color.c: In function 'color_char_to_attr' server/netserver.c: In function 'Receive_features' server/netserver.c: In function 'Receive_clear' server/main.c: In function 'server_log'