B4A Library libGDX - Game Engine

melonZgz

Active Member
Licensed User
Hello.
I have a problem with a tmx map with animated tiles.
Using the example provided "map_tIDE", but loading a tmx file (I don't have tide installed...) I see the animated tiles.
But if instead of doing renderer.render I render the layers one by one I don't see the animation:
B4X:
    Camera.Update
    renderer.SetCameraView(Camera)

    renderer.SpriteBatch.Begin
    renderer.renderTileLayer(layer)
    renderer.SpriteBatch.End
This way it renders the layer, but the tiles wich are supposed to have an animation are static in their first frame.
Thank you.
 

Informatix

Expert
Licensed User
Hello.
I have a problem with a tmx map with animated tiles.
Using the example provided "map_tIDE", but loading a tmx file (I don't have tide installed...) I see the animated tiles.
But if instead of doing renderer.render I render the layers one by one I don't see the animation:
B4X:
    Camera.Update
    renderer.SetCameraView(Camera)

    renderer.SpriteBatch.Begin
    renderer.renderTileLayer(layer)
    renderer.SpriteBatch.End
This way it renders the layer, but the tiles wich are supposed to have an animation are static in their first frame.
Thank you.
Use Render2 instead of RenderTileLayer.
 

melonZgz

Active Member
Licensed User
Thx. I'm allready rendering that way. I just wanted to use renderTileLayer to keep all the drawings in the same batch draw (between batch.begin and bach.end) as render and render2 have to be outside the begin-end.
 

ldhyob

Member
Licensed User
Informatix, how do you do? LibGDX's B4A library is great! Thank you so much for sharing!

But in the use of found a question need to report to you:

AssetManager seems to be under the high android version can not run normally, such as the android 7.1.1, would collapse, don't know is what reason, please Informatix experts to help solve, thank you!
 

Informatix

Expert
Licensed User
Informatix, how do you do? LibGDX's B4A library is great! Thank you so much for sharing!

But in the use of found a question need to report to you:

AssetManager seems to be under the high android version can not run normally, such as the android 7.1.1, would collapse, don't know is what reason, please Informatix experts to help solve, thank you!
My only mean to test libGDX with Android v7.1 is Genymotion and I see nothing unusual with AssetManager. Could you elaborate? Do you have this issue with the AssetManager demo? Does anyone else have the same problem?
 

ldhyob

Member
Licensed User
My only mean to test libGDX with Android v7.1 is Genymotion and I see nothing unusual with AssetManager. Could you elaborate? Do you have this issue with the AssetManager demo? Does anyone else have the same problem?
Could you please tell me that the version of libGDX library you tested is 1.12? I am using the demo project that you released on the AssetManager demonstration project installed on Android v7.1.1, and the result, a run, will exit after the splash screen.
 

Informatix

Expert
Licensed User
Could you please tell me that the version of libGDX library you tested is 1.12? I am using the demo project that you released on the AssetManager demonstration project installed on Android v7.1.1, and the result, a run, will exit after the splash screen.
Yes it is 1.12.
There's no splash screen in the AssetManager demo.
 

ldhyob

Member
Licensed User
Yes it is 1.12.
There's no splash screen in the AssetManager demo.
I made a few modifications to the demo project, and found that the resource loading in LG_Create event was no problem after the test run, but it was found that there was a problem of reading resources in LG_Render event. I will show the relevant screenshots, please give an analysis to the teacher of Informatix.
QQ图片20171002084032.png
Screenshot_2017-10-02-08-30-49-14.png
 

Informatix

Expert
Licensed User
I made a few modifications to the demo project, and found that the resource loading in LG_Create event was no problem after the test run, but it was found that there was a problem of reading resources in LG_Render event. I will show the relevant screenshots, please give an analysis to the teacher of Informatix.View attachment 60178 View attachment 60179
You put the image to load in the loading queue, but you don't load it with Update, so the result is normal.
 

wonder

Expert
Licensed User
Hi!!

There seems to be a problem with the Gesture Detector after device rotation.
The LongPress event doesn't register anymore...

For testing, I added this line to the template (attached):
B4X:
Sub GD_LongPress(X As Float, Y As Float) As Boolean
    Log(DateTime.Time(DateTime.Now) & " GD_LongPress")
    Return False
End Sub
Could you please have a look? Many thanks in advance. :)
 

Attachments

wonder

Expert
Licensed User
Hello again!

I don't want to duplicate my thread in the questions sub-forum, but I'd still like to ask it here...

With regards to the CatMullRomSpline class, I would like to access the "derivativeAt" method. Is it doable with reflection and/or inline JAVA?

https://libgdx.badlogicgames.com/ci/nightlies/docs/api/com/badlogic/gdx/math/CatmullRomSpline.html

I'm looking forward into implementing the solution for this problem:
https://stackoverflow.com/questions/32665262/libgdx-path-catmullromspline-constant-speed

SOLVED: https://www.b4x.com/android/forum/threads/reflection-and-template-argument.106102/#post-664183
 
Last edited:

Informatix

Expert
Licensed User
Hi!!

There seems to be a problem with the Gesture Detector after device rotation.
The LongPress event doesn't register anymore...

For testing, I added this line to the template (attached):
B4X:
Sub GD_LongPress(X As Float, Y As Float) As Boolean
    Log(DateTime.Time(DateTime.Now) & " GD_LongPress")
    Return False
End Sub
Could you please have a look? Many thanks in advance. :)
This bug is fixed in the new version. There was a bug with objects (the Timer thread in this case) not disposed when the device is rotated.
 

wonder

Expert
Licensed User
This bug is fixed in the new version. There was a bug with objects (the Timer thread in this case) not disposed when the device is rotated.
Thank you so much Fred!!! I'll try the latest version as soon as I can! :)
 
Top