Basically use socket to communicate with Android cellphone
Shake phone to recover health, the harder you shake, the more health you will recover
Phone vibrates when the player is taking damage
Issue:
1.It cannot be used with dedicated server, since
socket clients are opened on the
(dedicated) server, it's hard to make the
socket server on a
cellphone from LAN of client to listen to the
socket client on the
dedicated server, although I wrote vars for supporting multiplayers in the future...
2.Normally the sensor of phone will sleep after the screen is locked, so the acceleration will remain still after the screen of cellphone is locked,
this will happen a while after the locking operation, but not immediately.
3.In a word, these junky code are just for reference rather than practical gameplaying, use this plugin/Android app at your own risk
Plugin:
https://github.com/AlucardNosferatu/...20TCP/cpcc.sma
Android SocketServer:
https://github.com/AlucardNosferatu/...edCrowbar_CPCC
Reference:
https://forums.alliedmods.net/showthread.php?t=329181
The Attachment:
A Video showing the gameplay with HandShake MedicKit