|
Post by jimmarlowe on Dec 1, 2015 2:01:37 GMT 1
After a day of reading and experimentation, I have "process" that allows me to build Urho3D for android. My target device is a tablet with Android 4.0 (IceCreamSandwich). I've have seen and run some of the demos on it. I'm merging in a DroneAnarchy angelscript version (like NinjaSnowWar) and attempting to run it with Urho3DPlayer. The 1st attempt ended up with a DroneAnarchy blue screen and two white boxes. I'll add the ability to output a log and see what's happening.
|
|
|
Post by jimmarlowe on Dec 1, 2015 6:10:33 GMT 1
DroneAndy.zip (135.92 KB) Attempt 1 and attempt 3, 3 obviously being better, as the drones come at you  We won't talk about attempt 2. I haven't been able to write a log yet, I may need to do some andriod/java to make that work. It'd be good to know where the hud went. Sadly, it has no user controls, I'll try to implement some touch controls.
|
|
|
Post by BlueMagnificent on Dec 1, 2015 22:20:45 GMT 1
Wow, android dev is going to be interesting... I guess am totally in at this one
|
|
|
Post by jimmarlowe on Dec 2, 2015 0:23:34 GMT 1
The newest can of worms is the touch interface in Urho3D. I've got it so you can aim by touching the screen and have a button for firing not optimal, but you can kill something. I want to use the onscreen joystick for aiming, but it's being difficult. The hud is also having trouble, I'm not sure why yet, I had similar problems in ClientAnarchy, but that solution didn't fix it. No logs, even though I've added android permissions to write stuff, nothing is written, I'm beginning to suspect that the Urho3D log system is not connected to the android log system. If you've got a Android 4+ device, I can emit an apk, but it's pre-demo code.
|
|
|
Post by BlueMagnificent on Dec 2, 2015 17:52:03 GMT 1
I've got an android device running Lollipop so I should be able to run the apk
|
|
|
Post by jimmarlowe on Dec 2, 2015 18:07:55 GMT 1
Fixed the HUD, in ClientAnarchy its turned off while the game menus are up, so simple fix, leave it visible, its all good now. I puzzled out how the onscreen joystick is suppose to work, it magically sends out keys events, so you collect WSAD keys in the keyup, keydown handlers and you feed the results of it into RotatePlayer. Sadly, it does not continously send out these keystrokes, so you need to look at keydown to move the XY position, and keyup to stop. It's working, but the simple move 1 pixel makes it unplayable, you just cant move fast enough, it needs the time based distance easing function from the game controllers. I learned how to use adb to look at the android logs, uninstall and install apks, which reduces the cycle time for changes even more, instead of putting the apk on the sdcard etc.. I have two apks, one with onscreen joystick only play, and one with touch play, still pre-demo, but better.
|
|
|
Post by jimmarlowe on Dec 2, 2015 19:25:55 GMT 1
I've thinned out the Data directory some and reduced the sizes of textures and sounds some, the apk is now 12.4MB, pm me an email address I can send it to 
|
|
|
Post by jimmarlowe on Dec 3, 2015 17:26:26 GMT 1
Ive fixed some branding issues, changed 1/3 of the java activity name, and the app is now DroneAnarchy instead of Urho3D in the device's app palette. Need to add pause button.
|
|
|
Post by jimmarlowe on Dec 4, 2015 21:08:02 GMT 1
Lots of things are fixed. -I gave up on the aiming with the onscreen joystick, it was just too flaky. So you aim by touch, I changed the move scaling a little when its android to make it feel more natural and be able to center on a drone. -I figured out how the mobile buttons work, and the top right "gear" pauses the game and you get choices to Quit or see the Credits. If you press it twice, it unpauses, ad infinitum. -It shows up as DroneAnarchy in the device, as opposed to DroidAnarchy or Urho3D. -All the android permissions have been removed, so it wont be looking to use the android internet or write to the sdcard.
|
|
|
Post by BlueMagnificent on Dec 6, 2015 13:26:19 GMT 1
It runs perfectly on my device and I'm so impressed by this. I've been battling a physics anomaly I discovered in Urho3D Physics Component for some days now and it has really distracted me from Drone Anarchy, but I guess its time to push that aside.
|
|
|
Post by jimmarlowe on Dec 6, 2015 21:05:48 GMT 1
Hey, that's good news, mobile things are notoriously finicky. What needs to be changed or fixed to make it better? These are things I know about... -change "<SPACE> To Replay | <ESC> To Quit" message to "Press Fire To Replay", they'll have to figure out how to quit by themselves. -change touchscreen move scaling again, this time to take into account the screen geometry, which can vary widely.
|
|
|
Post by BlueMagnificent on Dec 9, 2015 21:35:24 GMT 1
I noticed that the "top right" gear is active while game start count-down is going on. Due to this clicking it brings out the other interfaces for "credit" and "quit" and if you don't click to hide it before that count-down ends it remains like that switching the toggle of pause and unpause
|
|
|
Post by jimmarlowe on Dec 16, 2015 4:16:28 GMT 1
I've updated the code and have prepared version 1.00 of DroneAnarchy for Android.
Fixed the "top right" gear is active while game start count-down is going on. Fixed the you won/lost message to restart, exit. Update credits with source code location, version number. Fixed pressing fire when paused makes noise.
|
|
|
Post by BlueMagnificent on Dec 17, 2015 6:09:26 GMT 1
 Tested all those and they work fine
|
|
|
Post by jimmarlowe on Dec 17, 2015 17:18:17 GMT 1
There is a v1.01 prepared... I remembered that I had done a poor job of pruning non-DroneAnarchy assets out of the Data folder, so I turned on engine.DumpResources(true); and everything that wasn't on this list, got removed. This shrunk the apk size from 12.3MB to 9.4MB. And I added more stuff to the credits to say where the asset licenses are, they should really be directly in the credits, if I have to make a better credits window that scrolls I'll put them in there. I was also using this codebase as a prototyping area for enabling the SDL force feedback (Haptic), which was successful, and the test code is still in there for DroneAnarchy, so if you connect a `recognized` game controller to your android device that supports haptic, the controller will rumble a little when you destroy a drone, and rumble more when a drone hits you. It tested ok on linux, but even though the android code works like linux, my tablet doesn't even acknowledge I plug in a `recognized` game controller, let alone support haptic or even vibrate. Once I finish the haptic development ( code, as, lua, sample) I'll see how hard it is to get it back into Urho3D proper.
|
|