.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   YaPB (http://forums.bots-united.com/forumdisplay.php?f=55)
-   -   YaPB Android Port (http://forums.bots-united.com/showthread.php?t=10003)

openglhk 16-12-2015 18:02

YaPB Android Port
 
Quote:

Originally Posted by jeefo (Post 66377)
Not sure, what you want exactly.

Just a note: Xash3D engine compatibility is now fixed. try: https://yapb.jeefo.net/drop/yapb/4348_git152/

is it possible to compile yapb on Xash3D Android ver? :shifty:

jeefo 16-12-2015 18:16

Re: YaPB2 Updates
 
Quote:

Originally Posted by openglhk (Post 66379)
is it possible to compile yapb on Xash3D Android ver? :shifty:

Is there some cs available on android on xash?

openglhk 17-12-2015 05:14

Re: YaPB2 Updates
 
Quote:

Originally Posted by jeefo (Post 66380)
Is there some cs available on android on xash?

Yes, but Yapb not working on Xash3d android ver: :P

Critical: Mod that you has started, not supported by this bot (gamedir: cstrike)
svc_bad expected 0 bytes, it written 32. Ignored. :sweatdrop:

rewritten client.dll? https://github.com/SDLash3D/cs16-client
csdm mod? http://hlfx.ru/forum/showthread.php?threadid=3889

jeefo 17-12-2015 07:43

Re: YaPB2 Updates
 
Quote:

Originally Posted by openglhk (Post 66383)
Yes, but Yapb not working on Xash3d android ver: :P

Critical: Mod that you has started, not supported by this bot (gamedir: cstrike)
svc_bad expected 0 bytes, it written 32. Ignored. :sweatdrop:

rewritten client.dll? https://github.com/SDLash3D/cs16-client
csdm mod? http://hlfx.ru/forum/showthread.php?threadid=3889

client.dll is not necessary for bot to work.

looked into the sources of csdm mod, it's totally different game. not sure, if it's possible to adapt yapb for that game.

jeefo 17-12-2015 12:04

Re: YaPB2 Updates
 
1 Attachment(s)
Ok i have made quick'n'dirty port to CSDM mod for bot dll, but it's not fully functional.

weapon usage is totally wrong, as this csdm has different weapon ids.

i have used standard de_dust2 from cs 1.6 (+ added wad's from there), to not make the waypoints.

file attached. (windows, by now) :)

i think it's possible to port bot code to arm.

openglhk 17-12-2015 12:12

Re: YaPB2 Updates
 
Quote:

Originally Posted by jeefo (Post 66384)
client.dll is not necessary for bot to work.

looked into the sources of csdm mod, it's totally different game. not sure, if it's possible to adapt yapb for that game.

how about mp.dll decompile code? :sweatdrop:
https://github.com/Nagist/cs16nd

openglhk 17-12-2015 12:12

Re: YaPB2 Updates
 
Quote:

Originally Posted by jeefo (Post 66385)
Ok i have made quick'n'dirty port to CSDM mod for bot dll, but it's not fully functional.

weapon usage is totally wrong, as this csdm has different weapon ids.

i have used standard de_dust2 from cs 1.6 (+ added wad's from there), to not make the waypoints.

file attached. (windows, by now) :)

i think it's possible to port bot code to arm.

Thank you! You're awesome! :thumbup:

openglhk 18-12-2015 07:41

Re: YaPB2 Updates
 
Do I need to reference xash3d engines header file for compile yapb?

jeefo 18-12-2015 08:16

Re: YaPB2 Updates
 
Quote:

Originally Posted by openglhk (Post 66389)
Do I need to reference xash3d engines header file for compile yapb?

Nope.

openglhk 18-12-2015 11:06

Re: YaPB2 Updates
 
Quote:

Originally Posted by jeefo (Post 66390)
Nope.

asm volatile not available on ARM? :crying:
http://i.imgur.com/VoZmPug.png

jeefo 18-12-2015 12:33

Re: YaPB ARM Port
 
Replace function SineCosine in corelib.h

Code:

  static inline void SineCosine (float rad, float *sin, float *cos)
  {
#if defined (_WIN32) && defined (_MSC_VER)
      __asm
      {
        fld dword ptr[rad]
        fsincos
        mov ebx, [cos]
        fstp dword ptr[ebx]
        mov ebx, [sin]
        fstp dword ptr[ebx]
      }
#elif defined (__linux__) || defined (GCC) || defined (__APPLE__)
      register double _cos, _sin;
      __asm __volatile__ ("fsincos" : "=t" (_cos), "=u" (_sin) : "0" (rad));

      *cos = _cos;
      *sin = _sin;
#else
      *sin = sinf (rad);
      *cos = cosf (rad);
#endif
  }

with:

Code:

  static inline void SineCosine (float rad, float *sin, float *cos)
  {
      *sin = sinf (rad);
      *cos = cosf (rad);
  }


jeefo 18-12-2015 12:36

Re: YaPB ARM Port
 
1 Attachment(s)
You're also need working with CSDM sources, they're not in git, as i'm currently not going to add complete support for this mod.

openglhk 18-12-2015 14:31

Re: YaPB ARM Port
 
Quote:

Originally Posted by jeefo (Post 66392)
Replace function SineCosine in corelib.h

Code:

  static inline void SineCosine (float rad, float *sin, float *cos)
  {
#if defined (_WIN32) && defined (_MSC_VER)
      __asm
      {
        fld dword ptr[rad]
        fsincos
        mov ebx, [cos]
        fstp dword ptr[ebx]
        mov ebx, [sin]
        fstp dword ptr[ebx]
      }
#elif defined (__linux__) || defined (GCC) || defined (__APPLE__)
      register double _cos, _sin;
      __asm __volatile__ ("fsincos" : "=t" (_cos), "=u" (_sin) : "0" (rad));

      *cos = _cos;
      *sin = _sin;
#else
      *sin = sinf (rad);
      *cos = cosf (rad);
#endif
  }

with:

Code:

  static inline void SineCosine (float rad, float *sin, float *cos)
  {
      *sin = sinf (rad);
      *cos = cosf (rad);
  }


Thanks, compile successful after i remove that fsincos - x86 instruction :sweatdrop:
But seems that xash3D build all *.so library into the apk package. :ph34r:

It is necessary to compile mp_dll? or just replaced by yapb.so?

jeefo 18-12-2015 20:13

Re: YaPB ARM Port
 
Quote:

Originally Posted by openglhk (Post 66394)
Thanks, compile successful after i remove that fsincos - x86 instruction :sweatdrop:
But seems that xash3D build all *.so library into the apk package. :ph34r:

It is necessary to compile mp_dll? or just replaced by yapb.so?

i don't know actually how xash on android loads gamedll and how it's called. for the normal scenario xash should load yapb binary, and yapb binary will load gamedll binary creating somewhat bridge between xash and gamedll.

any tut on how to build for android?

RoboCop 19-12-2015 00:54

Re: YaPB ARM Port
 
Post not required but unable to delete

openglhk 19-12-2015 02:31

Re: YaPB ARM Port
 
Quote:

Originally Posted by jeefo (Post 66395)
i don't know actually how xash on android loads gamedll and how it's called. for the normal scenario xash should load yapb binary, and yapb binary will load gamedll binary creating somewhat bridge between xash and gamedll.

any tut on how to build for android?

if yapb binary is a bridge, xash3d (ARM arch) should not able to load x86 .dll/.so:shifty:

yapb source code here: https://github.com/jeefo/yapb/blob/m...face.cpp#L3043

i build the xash3d for android from the below sources: :flowers:

https://github.com/SDLash3D/xash3d-android-project

openglhk 20-12-2015 07:54

Re: YaPB ARM Port
 
Quote:

Originally Posted by openglhk (Post 66398)
if yapb binary is a bridge, xash3d (ARM arch) should not able to load x86 .dll/.so:shifty:

yapb source code here: https://github.com/jeefo/yapb/blob/m...face.cpp#L3043

i build the xash3d for android from the below sources: :flowers:

https://github.com/SDLash3D/xash3d-android-project

CSDM source code: https://github.com/mittorn/csdm
CSDM android build: https://github.com/mittorn/csdm-android

update: i'm trying to modify inferface.cpp :phone:

jeefo 20-12-2015 12:24

Re: YaPB ARM Port
 
I will build csdm with yapb for android next week. Just need to setup build env.

openglhk 21-12-2015 02:08

Re: YaPB ARM Port
 
Quote:

Originally Posted by jeefo (Post 66401)
I will build csdm with yapb for android next week. Just need to setup build env.

:punk:awesome!

jeefo 21-12-2015 22:42

Re: YaPB ARM Port
 
OMG! POD-Bots on my phone! :)

But.. Not yet playable, as they doesn't support the CSDM mod completely. Will work a little more, to a playable state.

https://yapb.jeefo.net/tmp/screen.jpg
https://yapb.jeefo.net/tmp/screen1.jpg
https://yapb.jeefo.net/tmp/screen2.jpg

openglhk 22-12-2015 02:24

Re: YaPB ARM Port
 
Quote:

Originally Posted by jeefo (Post 66405)
OMG! POD-Bots on my phone! :)

But.. Not yet playable, as they doesn't support the CSDM mod completely. Will work a little more, to a playable state.

https://yapb.jeefo.net/tmp/screen.jpg
https://yapb.jeefo.net/tmp/screen1.jpg
https://yapb.jeefo.net/tmp/screen2.jpg

:punk: good news! i want try to port my first bot too! Yapb, the best bo i ever seen..
How could you load the yapb? build in with libserver.so or load the library from addon/bin/yapb.so? :phone:

In Addition, Are you using Android 6.0 ?

jeefo 22-12-2015 17:41

Re: YaPB ARM Port
 
Quote:

Originally Posted by openglhk (Post 66406)
:punk: good news! i want try to port my first bot too! Yapb, the best bo i ever seen..
How could you load the yapb? build in with libserver.so or load the library from addon/bin/yapb.so? :phone:

In Addition, Are you using Android 6.0 ?

I will have some time tomorrow to complete the port.

Xash3d has very good -dll switch, so it's loads libyapb.so and the bot dll loads gamedll the same as it's works on other platforms.

Nope, i have broke my nexus 5X, now i'm with Alcatel Idol3 4.7 @ Cyanogenmod 12.1

openglhk 23-12-2015 03:25

Re: YaPB ARM Port
 
Quote:

Originally Posted by jeefo (Post 66407)
I will have some time tomorrow to complete the port.

Xash3d has very good -dll switch, so it's loads libyapb.so and the bot dll loads gamedll the same as it's works on other platforms.

Nope, i have broke my nexus 5X, now i'm with Alcatel Idol3 4.7 @ Cyanogenmod 12.1

i have tried build libyapb.so in APK package, but no idea how to link or load libyapb.so. :sweatdrop:

i'm using LG G3 with Cyanogenmod 12.1, when i click launch CSDM, the apps crashed. :| another android 4.2 phone can run the game without any issues. :shifty:

jeefo 23-12-2015 17:40

Re: YaPB ARM Port
 
Quote:

Originally Posted by openglhk (Post 66408)
i have tried build libyapb.so in APK package, but no idea how to link or load libyapb.so. :sweatdrop:

i'm using LG G3 with Cyanogenmod 12.1, when i click launch CSDM, the apps crashed. :| another android 4.2 phone can run the game without any issues. :shifty:

rename sound folders in both csdm&valve to something else, need to debug, but i don't care of sounds.

the bots works ok, but navigation is totally broken, they stays at one place. i have no clue why.

jeefo 23-12-2015 20:40

Re: YaPB ARM Port
 
Quote:

Originally Posted by jeefo (Post 66409)
rename sound folders in both csdm&valve to something else, need to debug, but i don't care of sounds.

the bots works ok, but navigation is totally broken, they stays at one place. i have no clue why.

Well it's now fixed. here the alpha version:

https://yapb.jeefo.net/drop/android/

They doing some things strange, but atleast they work :)

openglhk 24-12-2015 02:58

Re: YaPB ARM Port
 
Quote:

Originally Posted by jeefo (Post 66411)
Well it's now fixed. here the alpha version:

https://yapb.jeefo.net/drop/android/

They doing some things strange, but atleast they work :)

Thanks, that's great! :thumbup:

but something really strange..:sweatdrop:
they all become gordon freeman
http://i.imgur.com/6FXc4yV.png

jeefo 24-12-2015 07:44

Re: YaPB ARM Port
 
Fixed.

openglhk 24-12-2015 14:26

Re: YaPB ARM Port
 
Quote:

Originally Posted by jeefo (Post 66413)
Fixed.

Could you pls share the code for link/load other .so library? :surrender:

i guess you compile yapb as libserver.so, link/load the libgamedll.so.

jeefo 24-12-2015 22:12

Re: YaPB ARM Port
 
https://github.com/jeefo/yapb/tree/yapb_csdm_arm_temp

dirty src, but working

openglhk 25-12-2015 04:08

Re: YaPB ARM Port
 
Quote:

Originally Posted by jeefo (Post 66415)

Thank you so much! :P

openglhk 18-01-2016 14:33

Re: YaPB ARM Port
 
Quote:

Originally Posted by jeefo (Post 66415)

After read your source code several times, i find that yapb is support metamod!
Is it possible to load as a plugin? :)

add g_isMetamod?

openglhk 18-01-2016 18:02

Re: YaPB ARM Port
 
ignore this post, solved

jeefo 18-04-2016 20:22

Re: YaPB Android Port
 
Well, YaPB is released as part of cs16 Android :))


All times are GMT +2. The time now is 02:13.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.