Android Bounty

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).

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:

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.

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.

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.

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.

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!

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.

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.

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.)

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

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.

I can’t find this on Android Play Store. I paid for the Full Version cause I knew this had a lot of potential.
I couldn’t learn most coding languages, but Python was the only I easily understand. I want to make games, learned about 3D Modeling, Game Engines, IDLEs and Animation that lead me to Blender 2.7.x [Blender Game Engine] & Panda3D [C + Python] then for easy cross platform Cub3D.

Please if You changed the name or link please Update me, otherwise where can I get a Full Version of Cub3D

I had a 3 theories
A. GPU render = Faster GUI == Even though Python is slow, if an Non-Game App [Notepad, File Browser] was made in a Game Engine would the GUI/App be running faster

B. Python is easier to maintain. I notice Android get more developed than Windows and Kotlin Apps are developed longer than C Apps based on workers, but devs give up around the same time.
Looking at Blender & Panda3D, it seems Python is easier on devs

C. Like ARM Chips that have low power, but backed with ANdroid still are able to do the same task as PC’s Intel (Kingsoft Office vs MicroSoft Office)…power isn’t the answer…its innovation

If your no longer developing the app please PM me a Full version that doesn’t need reactivating or link to the next Cub3D I should buy

@EndUserGames You still have the option to sideload your own version of Panda3D and help improve the android port for the greater good with an open source apk.

Actually Panda 3D developpement version and Python 3.8 can run on Android 4.4 +. if there was enough supporters maybe a prebuilt apk could land on f-droid open source repo.

Here you can see a minimal Python repl+Panda3D debug apk, not as fancy as Cub3D but it’s free, does the job and has no strings attached whatsoever https://pmp-p.github.io/aiodemo_webview.mp4

Thanks Pmpp…and even found another APK Game Engine that is easier than Cub3D, but sadly & oddly underdeveloped.

Blender Player 2.63 [https://download.blender.org/demo/android/]

  • Able to Play Blender Game Engine Games saved as .Blend [Blender can export BGE Games as .Exe Runtimes for Windows, so Cross-platform isn’t a problem]

  • Its last update just so happen to be for Tegra 2 Android Phones [I have a keyboard phone w/a Tegra 2 GPU so I can do IDLE Coding/Learning without a Computer, but the GPU is worst than Adreno Series]

  • Problem it loads the Blender UI & .Blend File and doesn’t seem to work [I have to test on OpenGLES 3 and Adreno GPUs]

  • Pro: Game Logic == No Coding, It responds to Touch Input

  • Con: It doesn’t respond to Keyboard Input, I have to manually make Touch Controls

My Log

  • I learned Python/Cython 3.6 from SoloLearn…later got Python 3.6 for PC and later found Cub3D that uses Python 3.6

  • Blackberry Passport/BBOS10.3/Android Emulator can’t utilize Adreno 305 for Android Games [My Update killed PPSSPP usability]

  • Tegra 2-3 is on OpenGLES 2 and an Android’s Tegra 2 can’t Render Panda3D Apps like an Android’s Adreno 200/205/225 can

And that is the problem…a PreBuilt APK…so many times their isn’t an App to just install & run…that is what separates the People who Think [ME] and the Brains who Work [Developers].

Questions

  • Last where did Cub3D go?

  • How comes no is talking about its disappearance?

  • Cub3D & BlenderPlayer2.63 already works and there Built APK
    …I see that the Github you linked is yours…so you know how to code?
    …Why not Expand BlenderPlayer2.63 to 2.78 [w/o Cycles Render, but w/Upto Date Blender Game Engine features]?
    …Do you want to hear some of my Game ideas and help me build & market a game/shop?

Last where did Cub3D go? / How comes no is talking about its disappearance ?

Sadly the only person here that could tell us more about that has probably an NDA floating around preventing him to do so …

I see that the Github you linked is yours…so you know how to code ?

i do, but android is a bit time eating, and if no people are around for support / test / innovate / write samples / bug reports and confident enough to run binary on their devices then it’s a dead end.

it’s far more easier to focus on webgl-port which anyone is a link away to test.

Do you want to hear some of my Game ideas and help me build & market a game/shop ?

As i said in another android topic there’s a currently unused gitter channel here https://gitter.im/panda3d/panda3d that maybe could be reconverted for specific discussions about mobile “plumbing” ( as support is already there : most discussions would probably end in out-of-topic discussions regarding the engine part ).

The biggest hurdle that remained for the Android port to be ready for general use was to get the deployment system to work with it. Having an easy way to deploy for it would alleviate the need for users to install the Android SDK, compile the Android port from source, and then have to jump through hoops to compile a launcher for their game.

After two days of working on it, I have managed to generate an Android App Bundle for the Asteroids sample directly using the bdist_apps command, which after a signing step¹ could be uploaded to the Play Store directly.

Here is a screenshot of having the app installed through the Play Store on my phone:

Here is a picture of it running on my Android TV:

My changes are in Git. More work remains, but I think the biggest hurdles have been cleared. I will later post some instructions on how to test this.


¹ Currently, you need to a run jarsigner in order to sign the app with an upload key before the Play Store will accept it. Ideally, this step would be wrapped up into bdist_apps so that you don’t need the jarsigner tool to be installed. I may yet investigate whether this is viable. (EDIT: it is, and this has been implemented.)

7 Likes

Oh wow, that is excellent! Well done, and congratulations on reaching such a milestone with the project! :slight_smile:

This is exciting news. If I may, how is the current touch screen and button support for Panda3D on Android?

It just supports single touch, emulating the mouse right now.

There is experimental multitouch support for Panda in a branch, but it’s not yet hooked up to the Android API yet.

2 Likes