Android Bounty


#161

Hey Tobias, I’m a fan of your Render Pipeline!

All of the demos I tried above hit 60FPS (when I put the FPS counter back), besides Roaming Ralph which runs at about 38FPS average. That was on a “Who-Are-We” MediaPad M1 8.0 with everything as ARMv5. It would be a bit faster under ARMv7a, of course.

Update: OpenAL now working (sans Vorbis decoding at the mo).


#162

Hello all :slight_smile:

I’ve just released a project called Cub3D, on the Play Store. It has Panda3D at the core.

There is a Python editor, Bullet and ODE Physics, working OpenAL audio, virtual joysticks, multi-touch, very fast sensor support, and many other features, all bundled into a nice Applet manager. You can write Panda3D, and/or Cub3D-specific code and see changes, in literally, an instant.

Currently it runs Python 2.7, and retains as much compatibility with the current release of Panda3D as possible. This means projects can co-exist on both Panda3D and Cub3D with minor changes or conditionals. The Python version on Cub3D may be upgraded when necessary, and we may add installation support for more third-party packages soon.

Please understand that whilst I know Panda3D is a free project, the Cub3D project has been worked on for a commercial company, and there was simply no way for us to do so without some sort of investment. We have made a huge effort to keep the core Panda3D features free, rather than simply charging for everything outright. As a result, many features we added are on in-app purchases. This version, also, cannot currently create APKs on the device (yet), but it can create other packages you can share.

All the regular Panda3D samples are included (along with the physics examples), and credits to authors are retained.

You can now play Ball in Maze (the Bullet version) using the accelerometer, at 60FPS. Roaming Ralph is playable too (without a keyboard)!

https://play.google.com/store/apps/details?id=com.u2600inventions.cub3d

Have fun :slight_smile:


#163

Nice work! You’ve gone above and beyond just porting Panda to Android, but you’re offering a complete development environment. That’s pretty cool. Congratulatons on the release!

Would you consider making the package installable on Android TV devices as well? This requires a few modifications to the AndroidManifest.xml, such as adding the LEANBACK_LAUNCHER category to your main intent filter, as well as declaring touchscreen as not being required. I ask because I do a fair amount of Panda dev on my Nvidia Shield.


#164

Thanks rdb, your compliments really mean a lot to me, and I’m really glad you like the app. I’ll pass on your kind words.

Regarding TVs, the only reason I’ve not given you a Leanback Launcher just yet, is because the front-end isn’t yet fully compatible with remote controls which only have D-Pads. I believe that was one of the quality rules Google enforced, and as such the primary reason I didn’t do it. So, currently I can’t upload an official APK to the TV store. I expect you already know this, but if you sideload the current APK, then it should work fine, as I did design the front end for huge TV screens as well as the tiniest phones. You’ll need a USB/Bluetooth air mouse combo, or similar. I can validate it works on Android USB dongles, and the keyboard plays games well. It is on my to-do list to add proper support for this, but currently it isn’t right at the top.

Smartwatches work too. Panda3D should be playable, on your wrist, with Python, even with RAM as low as 512MB. Ball-in-Maze (with Bullet Physics) should tilt with your arm, and may also make your watch shake when the ball gets lost. I may not be able to offer an official version on the store for this, as Google may not accept it on the grounds that we aren’t supporting circular screens, and there’s nothing in the manifest for me to exclude them, last I checked, but watches weren’t exactly a priority – just something cool. I only have a smartwatch emulator, not a real device, but if someone wants to try the APK on a real smartwatch, I would love to know if it works. Bear in mind if your watch doesn’t have a back button that works like Tablets/Phones, then you may have trouble stopping the app as it won’t know how to quit (yet), and may need to uninstall the app, or reboot your watch, to guarantee a closure.

I’ve already heard some comments about the Python version. Rest assured that I am not trying to hold anything back, or interfere in Panda3D’s progress, I have only just got to a point were I am in a position to replace it, and the decision hasn’t been made on which version of Python 3 will be used. Additionally, we always do our absolute best to retain compatibility with Panda3D. Despite the current Python version, I can assure you it is immensely fun to sit in a coffee shop and play with Panda3D code on a tablet. It plays on people’s curiosity when they see you messing with 3D code. It’s all good, extra, advertising for Panda3D’s amazing power too, as we are not hiding that Cub3D is based on Panda3D.

I didn’t mention beforehand, but I did get Airblade and YORG running on a tablet with minimal effort. YORG seems to require a 2GB device to run well, and quite a lot of horsepower, but this may perhaps be down to model sizes. Additionally you can make any Bullet game use sensors, by simply transferring the real world sensors into the Panda3D Bullet world, and there are special functions to take screen/sensor orientation into account. I’ve written some brief instructions on how to do that in the Settings > Cub3D documentation.


#165

Fair enough about the Android TV version; as long as I can somehow download an .apk to sideload. (I’m using a bluetooth keyboard and mouse, so that is no problem for me.) I’m also happy to test it on my smartwatch if I manage to get an .apk; that would be cool to see.


#166

Okay, I’ve asked for the APKs to be stored elsewhere, so they can be sideloaded officially. Currently there are just two, one for ARMv7a specifically, and one for x86. If it turns out that I don’t handle these uploads personally, then that version may be slightly behind the one on the store.


#167

I found a copy of the Cub3D apk on a mirror site, it seems to work great:

Unfortunately, without a keyboard, it seems to be rather tricky to exit the applet.

I hope you don’t mind that I dropped a mention to Cub3D in the new blog post!


#168

I’m fine with a company porting an open source engine and making it proprietary. I would even pay for one. But that said, not being able to deploy your panda3d program as an apk and/or in th store makes this very limiting in my opinion.


#169

In reply to rdb:

I’ve seen your announcements for February! That split screen demo with Termux is amazing, and of course it’s okay to mention Cub3D or screenshot it – as you might have noticed the store listing does advertise Panda too. There are large updates going on at the moment, so I might be quiet on the forums until I post another APK. The next version will have a major update, but again without breaking compatibility.

Thanks for trying out the watch, the results look cool! Does the stem button quit you out to the watch face with just a quick press, or do you hold it? Cub3D can place an ‘esc’ key at the centre-top with a one-liner, or a standard Panda3D click event somewhere can quit the script in any of the ways you normally would, but you’ll know this already and I understand this should probably be automatic. From what I remember with the emulator, I think that ‘stem’ button carries the same rules as ‘home’ regarding trapping the event, which would stop me using it, unless I quit on it. Any other button could be used, but I haven’t set that up as I understand many watches have just the one button. I have got some other ideas on how to quit cleanly, which I’ll experiment with at some point.

In reply to Shifr:

This is something on my to-do list.

You can export to c3d or signed c3d within Cub3D and directly share, but as you said they’re not compatible with the store. Store-compatible Release APK spawning is planned, without leaving the device, and there will be multiple ways of doing it. If you use Cub3D for any reason, you aren’t losing out, as your code is still Panda3D anyway, which you can see is being frequently developed too. The add-ons are designed to be simple, non-obtrusive, and compliment your Panda code instead of taking it over.

Starting an applet externally is already allowed and can be done with an Android intent (currently undocumented). You can in theory already create your own ‘dropper’ that puts a native icon on the home screen, and just call this intent with it. It’ll then run your applet without completely starting up the interface, but you’ll need the script to be ‘configured’, i.e. defining if you want portrait, landscape etc. You should be able to create these type of APKs within the app soon. Regarding completely stand-alone support, this is to come later, and it’ll retain the same feature set, but produce smaller APKs depending on what you use.


#170

A single press of the stem button takes me back to the watch face (unless I’m on the watch face, in which case it goes to the application list), and holding it brings up the Google Assistant, so it functions like the home button on a phone. I doubt they can be mapped by the application since none of the apps I’ve tried seem to use it. My watch does not have a rotatable bezel, so besides the touch screen or flick gestures, the button is the only input.

(Quitting the app by going to the home screen does not quit the applet; the next time I start up Cub3D it leaves me back where I left off. I have to Force Quit and reopen the app to switch applets. However, I understand that it is the application developer’s responsibility to add a way to quit the app.)


#171

Any news about standalone APK export as well as app store APK export?


#172

Since a few days kivy is able to build python 3.7+ and apk, so i guess it may be possible to build a Panda3D recipe for it and package nicely.

@Shifr for android kitkat (4.4) i use gradle to build panda3d apk, storing code and stuff in “assets” folder is ok for small apps.

apk extensions files are more complicated stuff but they allow huge data but i know nobody who used them for that particular case.