The Contribution Mega-Thread

There are other android codes inside the android.asset & vobisAudio packages that needs refractor to BufferedInputStream & try with res too, but I prefer to have a focused look on them before touching any code.

2 Likes

Try with is fine but it might be that many already sport a buffer. This was the case at least with the desktop loaders. It is not always obvious where the buffer is set or utilized.

2 Likes

Right ! That’s why I didn’t rush with the android assets package…and that’s why every method must do only and only one thing & at least if it delegates something, it needs to be so obvious in using the resources.

EDIT : if in.close() is present then obviously its using the resources locally…otherwise there might be a trick I think.

In those AssetLoaders, if it uses assetInfo.openStream() then I think it is in charge of also closing the resource as the openStream contract is that it returns a new stream always. But with Audio… if the play mode is stream… Already a bit tricky as the AssetLoader.load behaves differently…

1 Like

Yes, but keep in mind that android needs these streams open for native code, so I am not sure yet if java closes the stream or delegates the closure to the native code.

1 Like

Thank you for your hard work on android! :+1:

1 Like

I am waiting for your shaders support.

1 Like

Haha, I have spent most of my time this year on webGL. I hope that I will have time to return to the research of jme3 after the work is stable, and I hope to contribute some code to the community! :grinning: :grinning:

3 Likes

Anyone, who uses android or testing jme apps on emulators, Let me know what you think about this :

Simply gesturing on these parts would trigger these events, gesturing supports both the analog & pressure gesturing.

Is that result is satisfying ? (Keep in mind that is a touch boundary debugging mode, when it shuts off, the boundaries are invisible but still touchable) :

2 Likes

I think it is very important to provide a set of virtual joysticks with general JME functions. In mobile games, the virtual joystick is the most important input control.
I am trying to write such a virtual joystick library, which can be comparable to joysticks in mainstream games. If you have seen nippleJS(NippleJS), it is what I want.
Have you ever thought about developing such a rocker library?

1 Like

Yeah the virtual joystick, I have already developed a one using native android views, users also are capable of customizing it :slight_smile:.

You can check class name GameStickView inside superiorPlugin module:

It appears in the images on git readme above the GullWing but with a transparent boundaries, boundaries are optional of any color and any shape.

Would that be good if integrated into the engine ? I think its better to use it as a separate plugin.

Edit :

But for fly camera, there are multiple input events that can happen at the same time like around 14 CameraFlyInput events (some of them are MouseEvents), we cannot really trigger those using just a joystick of 4 inputs, so logically I have split the screen into 2 touch boundaries, one for WASD & one for QR controls, those are the default controls for the fly camera, the user can customize the flyCam for a trivial code too and shut down those default controls on the new CompatHarness activity, so I am talking about default touch controls for the flyCam, also if the user uses getFlyByCam().setEnabled(false); inside their SimpleApplication that would inhibit the Harness from adding these touch controls for the flyCam.

2 Likes

Very good, hard work. :+1: :+1: :+1:
But my idea is to directly use jme’s gui to implement the virtual joystick instead of relying on the ui system of the android system. I think it would be better to unify in the jme engine thread, and because it is the jme gui, it can be more reasonable Cross-platform, so you don’t have to maintain their ui libraries independently for IOS and Android.
I don’t know if you plan to do this. I know this is another trouble. In theory, I want to provide JME with several joysticks implemented in NippleJS, including dynamic mode, semi-mode and static mode.
If you plan to develop such a library, please let me know what you think. thanks. :grinning:

2 Likes

I am not sure if js would work with jme, but the concept is already the same, we could implement the same interpretation for jme using a Quad with a circular background image and another one with a stick like image may be at the center of the first quad, that may be the easiest approach.

1 Like

My idea is that if you want, you can use jme pictures to transplant your android joystick logic.
A simple idea is that I plan to use the Picture class to achieve. It was the first time I saw someone else in the community implement this, but he only implemented a basic joystick. Hope to provide a complete rocker library for JME.

1 Like

IDK what’s Picture class ?

1 Like

You may be able to take a look at this old post, my rocker inspiration comes from here: :grinning:

1 Like

The author’s approach in that post is to use only com.jme3.ui.Picture to complete.

1 Like

That Picture should be a Quad or 4*4 custom mesh with texture ?

Edit : I may add that in my todo-list :slightly_smiling_face: but not sure I can really do it now, since I have exams and I have already utilized a lot of time for the new jme harness and this FlyCam listeners :slightly_frowning_face:

1 Like

The Picture class actually uses the Quad grid to draw pictures.

1 Like

I know everyone is very busy :monkey_face:, if you have time to do this, it will be great :+1:, then I don’t have to do it, or anyone in the community has an idea to complete this library. Or I will do it myself. :eyes:

1 Like