B4A Library libGDX - Game Engine

logo.png


One of the best game engines for Android is now available to B4A users. Unleash your creativity!

You can read a description of this library in this guide.

Download for B4A v10.60 and older (4 MB)
Download for B4A v10.70 and newer (4 MB)

Starting from version 1.13, the library is compiled with Java 8, and thus requires a recent version of B4A and Java 8+.
To install the library, copy the .jar file and the .xml file in your libraries folder.

This library is not compatible with the Debug mode. Ensure that you always compile in Release mode.

Download also the examples and templates.

You can reduce the weight of the library if you want to keep your APK file as small as possible. Read this post to learn how to create your Lite version.

Tutorials:
How to make games
Introduction to the libGDX library
PacDroid: from scratch to fun
Shaders

Take also a look at the Cloney Bird tutorial by andymc.

Plugins:
Box2DLights
SpecialFX

Versions:
v1.14:
- I fixed a bug when Looping was changed during the execution of a sound;
- I added the RenderImageLayerAt function to all map renderers;
- I added the support of the new packaging tool used by B4A v10.70 (this mainly fixes the problem of / in paths of internal assets);
- I updated the manifest of all examples.

v1.13:
- I fixed a bug when the device was rotated (the Timer thread, for example, was not disposed which caused a problem in lgGestureDetector);
- I added two functions for Tiled maps: renderImageLayerAt and renderTileLayerAt.

v1.12:
- I added the .so libraries for 64 bits CPU;
- I added the PinchStop event to lgGestureDetector;
- I added the Orientation property to lgBox2DTransform;
- I fixed minor bugs.

v1.11:
- I fixed several bugs;
- I removed the unwanted delay after a change of screen in the Render event;
- I added the lgAsyncExecutor and lgAsyncTask classes;
- I added the missing file for the Progression demo;
- I updated the Freetype library (.so).

v1.10:
- I fixed several bugs;
- I added the support of expansion files: classes lgZipResourceFile and lgZipEntry, functions lgFiles.SetAPKExpansion and lgFiles.ExpansionFile (untested);
- I added a HashCode function to all lg...Array classes;
- I added a dozen of predefined colors to lgColor;
- I added the "raw_y" property to lgMapObjects;
- I added the grow, growX and growY functions to lgScn2DTableCell;
- I added the lerpAngle and lerpAngleDeg functions to lgMathUtils;
- I improved Atan2 in lgMathUtils;
- the collision objects of TMX tiles are now accessible via the Objects property of lgMapAnimatedTiledMapTile and lgMapStaticTiledMapTile;
- I added two new examples: Progression and Map_Box2D;
- I updated the manifest of most examples and templates.

v1.09:
- I fixed bugs, notably a major bug that crashed sometimes the game in the Render event handler when the current screen is changed;
- I added getColumnWidth and getRowHeight to lgScn2DTable and all classes that inherit from lgScn2DTable;
- I added the defaults function to lgScn2DTableCell;
- TMX files are loaded faster.

1.08:
- I fixed bugs;
- I added the lgFontGeneratorParameters class;
- I added CreateFontWithParam to lgFontGenerator;
- lgFontGenerator can add now a border and a shadow to the generated fonts (via CreateFontWithParam);
- I added Initialize2, LabelAlign and LineAlign to lgScn2DLabel;
- I added SetStateWithoutEvent to lgScn2DButton and lgScn2DTextButton;
- I added TitleLabel and TitleTable to lgScn2DWindow (this deprecates ButtonTable, Title, TitleWidth and TitleAlignment);
- I added getIndex to lgMapLayers and lgMapObjects;
- I added Target to actions of Scene2D;
- I removed Print from lgScn2DGroup (use Log(myGroup) instead);
- lgMapTiledMapImageLayer uses now float values for position;
- lgNinePatch uses now float values for paddings;
- lgPixmapPacker and lgPixmapPackerPage were rewritten (the many changes will break your existing code).

1.07:
- I fixed a few bugs, as usual;
- I added InitializeTransparentView to LibGDX;
- I added the lgKTXTextureData class to support the KTX and ZKTX file formats;
- I added a new demo: Format_KTX;
- I added argb8888 and argb8888ToColor to lgColor
- I added the lgMapAtlasTmxMapLoaderParameters class;
- I added Initialize3 and Load2 to lgMapAtlasTmxMapLoader;
- I added LoadExternal and IsInitialized to lgMapTmxMapLoader;
- I added FrameTiles to lgMapAnimatedTiledMapTile;
- I added a Tag property to lgSprite;
- I added hasOppositeDirection, hasSameDirection, isCollinear, isOnLine, isPerpendicular, AngleRad and rotateRad to lgMathVector2;
- I added rotateRad to lgMathMatrix4;
- I added clamp4, log, log2, Randomize, randomInt, randomInt2, randomSign, randomTriangular and randomTriangular2 to lgMathUtils;
- the random number generator of lgMathUtils uses now the xorshift128+ algorithm;
- I renamed Create2 to Combine in lgMesh;
- I removed the Create and Create3 functions from lgMesh;
- I removed the deprecated Color property from lgVertexAttributesUsage;
- it is possible now to change the KeyFrames array of lgAnimation after its initialization.

v1.06:
- I fixed a few bugs;
- I added a Texture property to lgSprite;
- I added the MotorJoint type to lgBox2DWorld;
- I added GetFixture to lgBox2DBody;
- I added Initialize3 to lgShapeRenderer to allow the use of custom shader programs;
- I added ScaleEffect to lgParticleEffect;
- I added CleanUpBlendFunction to lgParticleEmitter;
- I added scl2 to lgMathVector2;
- I added IsEnabled to lgGLProfiler;
- I added Percent, VisualPercent and VisualInterpolation to lgScn2DProgressBar;
- I added Percent, VisualPercent, VisualInterpolation and VisualInterpolationInverse to lgScn2DSlider;
- I added isLeftEdge, isRightEdge, isTopEdge, isBottomEdge to lgScn2DScrollPane;
- The Reset function of lgScn2DTableCell sets now all constraints to their default values;
- I modified the Map_Hexagonal example to display the coordinates of the touched hex.

v1.05:
- I fixed two bugs;
- the latest TMX format of Tiled Map Editor is now properly decoded (with support of animated tiles and image layers);
- I added the RenderImageLayer function to the map renderers;
- I added the lgMapTiledMapImageLayer class for the image layer of tiled maps;
- I added the OffsetX and OffsetY properties to lgMapAnimatedTiledMapTile and lgMapStaticTiledMapTile;
- I added the CurrentFrame and CurrentFrameIndex properties to lgMapAnimatedTiledMapTile;
- I added the FinishLoadingAsset function to lgAssetManager;
- I added the SetAlpha function to lgBitmapFontCache;
- I added FixtureCount and GetAllFixtures to lgBox2DWorld;
- I added the ResetOnTouchUp property to lgTouchpad;
- I removed Scale and Div from lgMathVector3 because these functions were deprecated.

v1.04:
- I fixed various bugs, notably a bug affecting the Backspace key on the virtual keyboard of some devices;
- I added the missing OpenGL functions in lgGL;
- I added the KeepWithinStage function to lgDragAndDrop;
- I added the dampingRatio and frequencyHz fields to lgBox2DWeldJointDef;
- I added the DampingRatio and Frequency properties to lgBox2DWeldJoint;
- I added the Line6 function to lgShapeRenderer;
- I added VisualScrollPercentX, VisualScrollPercentY and FlickScrollTapSquareSize to lgScn2DScrollPane;
- the LineHeight property of BitmapFonts can be modified;
- I updated the .so files;
- I added an example: Sensors.

v1.03:
- I fixed various bugs;
- I added the VertexColor property to lgPolygonSprite;
- I added the Equals function to lgArray;
- I renamed Ellipse to Ellipsis in lgScn2DLabel;
- I improved the code of lgPixmapIO (less memory used, PNG with compression);
- I fixed a problem with the fragment shaders of two examples.

v1.02:
- I fixed 3 bugs in lgScn2dTable and a few others in other classes;
- I added 4 examples using shaders;
- I removed the lgDefaultGroupStrategy class because it was useless and changed the initialization of lgDecal objects;
- I added the SetRotation function to lgDecal;
- I added the Tint function to lgBitmapFontCache;
- I added the Cancel and Reset functions to lgGestureDetector;
- I added the IsKeyJustPressed function to lgInput;
- I added the Colinear and EnsureCCW functions to lgMathGeometryUtils;
- I added the Equals function to lgMathGridPoint2, lgMathGridPoint3 and lgMathRay;
- I added the IntersectRayRay and DistanceLinePoint2 functions to lgMathIntersector;
- I added the Extract4x3Matrix function to lgMathMatrix4;
- I added the WindowSize property to lgMathWindowedMean;
- I added the IsDrawing function to lgShapeRenderer;
- I added the ColorUnpacked field to lgVertexAttributesUsage;
- I added the Clear function to lgScn2DButtonGroup;
- I added the CancelTouchFocus property to lgScn2DDragAndDrop;
- I added the Rows, Columns, BackgroundTop, BackgroundLeft, BackgroundBottom, and BackgroundRight properties to lgScn2DTable;
- I added the ClearActor function to lgScn2dTableCell;
- I added the ActionsRequestRendering property to lgScn2DStage;
- I renamed CancelTouchFocus2 to CancelTouchFocusExcept in lgScn2DStage;
- I removed the Clear function from lgScn2dTableCell;
- The color markups are now supported by lgScn2dLabel and lgScn2dWindow (title).

v1.01:
- I fixed a handful of minor bugs and a big bug affecting the screen events;
- I added IsDrawing in lgSpriteBatch.

v1.0:
- I fixed bugs in various classes;
- I rewrote big chunks of internal graphics classes;
- the TMX map loaders are now able to read the Rotation property;
- the FrameDuration property of lgAnimation can now be changed during the animation;
- I added an Initialize function to lgMapAnimatedTiledMapTile to be able to set dynamically an animated tile;
- I added two new classes for debugging: lgGLProfiler and lgScn2DDebugRenderer;
- I added DebuggingEnabled and DebugColor to all actors of Scene2D;
- I added ChildrenDebuggingEnabled to all groups of Scene2D;
- I added CellDebugColor to lgScn2DTable and removed all its debug functions;
- I added SetCenterPosition, CenterX and CenterY to all actors of Scene2D;
- I replaced the Widget word by Actor in lgScn2DTableCell;
- I added the Equals and HashCode functions to a few lgMath classes;
- I added the ApproxLength function to lgMathBezier, lgMathBSpline and lgMathCatmullRomSpline;
- I added Set3, SetPosition2, Contains2, Circumference and Area to lgMathCircle;
- I added Set3, SetPosition2, Circumference and Area to lgMathEllipse;
- I added Merge2, Area and Perimeter to lgMathRectangle;
- I added Len and Len2 to lgMathSegment;
- I added Volume and SurfaceArea to lgMathSphere;
- I added Interpolate to lgMathVector2 and lgMathVector3;
- I added the following functions to lgMathMatrix4: mulLeft, Set2, Set3, Set4, Set5, Set6, ScaleX, ScaleY, ScaleZ, ScaleXSquared, ScaleYSquared, ScaleZSquared;
- I added a LoadMipMap event and replaced UseHardwareMipMap by Get/SetGenerationMethod in lgMipMapGenerator;
- Box2D has now its own .so library;
- I added Separations to lgBox2DWorldManifold;
- I added the following functions to lgBox2DEdgeShape: Vertex0, SetVertex0, SetVertex0_xy, HasVertex0, Vertex3, SetVertex3, SetVertex3_xy, HasVertex3;
- I added LocalAxisA to lgBox2DPrismaticJoint;
- I added two new classes to Box2D: lgBox2DMotorJoint and lgBox2DMotorJointDef;
- I added the LoadTextureWithParam function to lgAssetManager and the related lgTextureLoaderParam class;
- I added two new properties (Normalized, Type) and a function (HashCode) to lgVertexAttribute;
- I renamed Color to ColorPacked in lgVertexAttribute;
- I renamed Loop to Repeat in lgSound;
- I renamed consumeCompressedData to consumeCustomData in all TextureData classes;
- I protected some important classes against a repeated initialization to avoid memory leaks and side effects;
- I added a Scene2D_EventsHierarchy demo and modified the following examples: BitmapFont, FrameBuffer, Map_tIDE and Scene2D_Table.

v0.99:
- I fixed numerous bugs, especially in Scene2D where the listeners did not work as expected and actors were not fully re-initialized when Initialize was called again;
- I set to Null the internal objects of classes after a call to Dispose;
- I added the following functions:
+ IsInitialized where it was still missing;​
+ Move to lgArray;​
+ ComputeScaleForPixelHeight to lgBitmapFont;​
+ SetNameForColor, GetColorByName and SetAlpha to lgColor;​
+ Clear to lgMapLayers;​
+ Lerp to lgMathUtils;​
+ Load3 and LoadEmitterImages3 to lgParticleEffect;​
+ SetString to lgScn2DLabel;​
+ Initialize4 to lgScn2DSpriteDrawable, lgScn2DTextureRegionDrawable and lgScn2DTiledDrawable;​
+ UpdateMatrices to lgShapeRenderer;​
+ SetCenterX, SetCenterY and SetCenter to lgSprite;​
- I added a ChildrenCount property to lgScn2DGroup;
- I added a Draw event to lgScn2DImage and lgScn2DLabel;
- I added a Disabled property to lgScn2DScrollPane;
- I added the following predefined colors to lgColor: Olive, Purple, Maroon, Teal, Navy;
- I renamed the alpha function to to255 in lgColor;
- lgBitmapFont and lgBitmapFontCache now support in-string colored text through a simple markup language (see the demo);
- I added the MarkupEnabled property to lgBitmapFont;
- I added a BitmapFont demo;
- I modified the FrameBuffer demo;
- I removed the yUp and yDown parameters from the tiled map loaders and renderers (yUp is now always true);
- I removed Rotation and rotateBy from lgScn2DLabel, lgScn2DList, lgScn2DSelectBox and lgScn2DTouchpad because they were not effective.

v0.98:
- I fixed a bug affecting the scaling and rotation of lgScn2DImage;
- I fixed a bug in lgBox2DParticleEmitter;
- I fixed a bug in lgScn2DButton;
- I added the lgFrameBuffer class and a FrameBuffer demo;
- I added the IsInitialized function where it was missing;
- I added the PolygonRegion type to lgAssetManager;
- I added a Payload parameter to the SrcDragStop event of lgScn2DDragAndDrop;
- I added the Draw2 function to lgScn2DSpriteDrawable;
- I added the Set3 function to lgMathMatrix3.

v0.97:
- I fixed a few bugs (the immersive mode works now as expected);
- I found a solution for the repetition of tiles, so I added two properties (RepeatX, RepeatY) to lgMapTiledMapLayer and I modified the Map demos.
- I added an IsInitialized function to 15 classes;
- I added a RemoveRange function to all the lgArray classes;
- I added the Fling function to lgScn2DScrollPane;
- I added the IsVisualPressed function and the VisualPressedDuration property to lgScn2DClickListener.

v0.96: Major update!
In this version, I:
- removed all the code supporting OpenGL ES 1.x
- fixed a few bugs
- added new classes for decals (2D objects in 3D space): lgDecal, lgDecalBatch, lgCameraGroupStrategy, lgDefaultGroupStrategy, lgSimpleOrthoGroupStrategy
- added an example for decals
- removed the Mesh example as it cannot work with OpenGL 2 without being rewritten
- added the lgScn2DProgressBar class and modified the Scene2D_TextFieldsAndSliders example to show how to use it
- added the IsInitialized function to a dozen of classes
- added these functions:
lgBox2DWheelJoint: isMotorEnabled
lgFontGenerator: CreateFont5, CreateFont6 (for mip maps and filters)
lgMathGeometryUtils: polygonArea, triangleArea
lgMathMatrix3: getScale, getTranslation, setToRotation2, setToRotation3, setToRotationRad, rotateRad
lgMathMatrix4: det3x3, setToRotationRad, setTranslation
lgMathUtils: isEqual, isEqual2, isZero, isZero2
lgMesh: CalculateRadius, CalculateRadius2, CalculateRadiusSquared
lgScn2DDragAndDrop: SetTouchOffset
lgSprite: SetOriginCenter
- added these properties:
lgBox2DJoint: CollideConnected
lgBox2DDistanceJoint, lgBox2DFrictionJoint, lgBox2DRopeJoint, lgBox2DWeldJoint: LocalAnchorA, LocalAnchorB
lgBox2DGearJoint: Joint1, Joint2
lgBox2DPrismaticJoint: LocalAnchorA, LocalAnchorB, MaxMotorForce, ReferenceAngle
lgBox2DWheelJoint: LocalAnchorA, LocalAnchorB, LocalAxisA
lgMathMatrix3: Rotation, RotationRad
lgScn2DActor: isTouchable
lgScn2DScrollPane: ScrollHeight, ScrollWidth, VariableSizeKnobs
lgScn2DWindow: ButtonTable, Resizable, ResizeBorder, TitleWidth
- renamed the functions Translate -> MoveBy, Rotate -> RotateBy and Size -> SizeBy of the lgScn2DActor class
- removed toScreenCoordinates from lgStage and toWindowCoordinates from lgScissorStack
- removed the yDown parameter from ComputePolygon and ComputePolygon2 in the lgMathConvexHull class
- improved a bit the help text of a few functions

v0.95:
Bugfixes and minor improvements
New classes: lgFloatArray, lgIntArray, lgShortArray
The lgMathConvexHull and lgMathEarClippingTriangulator classes are now usable
New functions:
- lgPerspectiveCamera: GetPickRay
- lgScn2DStage: SetViewport2
- lgMathFrustum: pointInFrustum2, sphereInFrustum2, sphereInFrustumWithoutNearFar2
- lgBox2DChainShape: createLoop2
- lgMathIntersector: intersectSegments2
- lgMathVector2: isUnit, isUnit2, isZero, isZero2
- lgMathVector3: set2, isUnit2, isZero2
New configuration setting: useImmersiveMode (for Kitkat)

v0.94:
Bugfixes (including a serious bug with the listeners of Scene2D)
New classes: lgMapTmxMapLoaderParameters and lgMipMapGenerator
New functions:
- lgAnimation: KeyFrames
- lgAssetManager: LoadTMXWithParam
- lgBitmapFontCache: SetColors, SetColors2, SetColorsRGBA
- lgGestureDetector: Initialize2
- lgMapTmxMapLoader: Initialize3, Load2
- lgMathVector2: Rotate90
- lgMesh: UpdateVertices, UpdateVertices2
- lgMusic: Duration, Position
- lgScn2DClickListener: inTapSquare2
- lgScn2DList: ItemHeight
- lgShapeRenderer: RectLine
- lgSocket: RemoteAddress
- lgSprite: Alpha, SetFlip
New parameters: ListBox and ScrollPane styles in lgScn2DSelectBoxStyle.Initialize
New example: Filters
Modified example: Map_tIDE (I fixed the visual issues)
New configuration setting: disableAudio

v0.93:
Bugfixes (including the problem reported for the Get...List functions of Box2D)
Class rewritten: lgTexture (some functions have been added, some have been removed)
New configuration setting: useGLSurfaceViewAPI18 (for Gingerbread and older versions)
New functions: lgFileHandle.equals, lgFileHandle.hashCode, lgShapeRenderer.Triangle2
New class: lgPerspectiveCamera (for 3D)
New example: ShapeRenderer
Modified example: Perf_Skaters (the background scrolls endlessly now)

0.92:
Minor bugfixes
Internal changes for texture handling
Viewport parameters added to CalculateScissors in lgScissorStack
New function in lgScn2DScrollPane: setScrollBarPositions
New function in lgMathVector2: epsilonEquals2
New function in lgMathIntersector: intersectRectangles
Initialize3 and FindDirectionForIsoView functions removed from lgOrthographicCamera

0.91:
Bugfixes (including the problem reported for tIDE properties)
New event for gesture detector: PanStop
New Initialize function for Bitmapfont to allow to flip the font
New Rect functions for the ShapeRenderer
New class: lgMapIsometricStaggeredMapRenderer (for staggered isometric maps)
New function for lgScn2dScrollPane: Cancel
lgMathBezier and lgMathBresenham2 are now fully usable
New functions in lgMathIntersector
A few internal changes to improve performance and stability

0.9:
Bugfixes
New class: lgArray (ordered array with an initial capacity)
Many Lists have been replaced by lgArray for a better performance and more possibilities
Improved documentation (mainly in lgMath and lgSprite classes)
lgMathBSpline and lgMathCatmullRomSpline are now fully usable
New example: SplinePath
New function for particle effects and particle emitters: BoundingBox
New property for lgScn2DLabel: Ellipse

0.8:
First release
 
Last edited by a moderator:

Asmoro

Active Member
Licensed User
Longtime User
Sometimes I wonder whether some questions are serious or not. You have an error message saying "Missing parameter" and you ask what to do? Then, it's simple: add the missing parameter. This parameter, EvtPrefix, is present in hundreds of functions in LibGDX and in other B4A libraries and is described in the help of the function: prefix of the Completed event. If you don't want to use this event, put an empty string.

Yes I knew it really sounds stupid, but had a solution for it by now.

But can I ask you another question that may have some `challenge ingredient` in it:

Learning and testing using Andymc cloney bird game I wonder how to code
if a score reach every 50 or 100 another image beside "pipe" will appear, like:

B4X:
If Score>100 Then

............
End If

Thanks for now.

gr.
 
Last edited:

Informatix

Expert
Licensed User
Longtime User
Yes I knew it really sounds stupid, but had a solution for it by now.

But can I ask you another question that may have some `challenge ingredient` in it:

Learning and testing using Andymc cloney bird game I wonder how to code
if a score reach every 50 or 100 another image beside "pipe" will appear, like:

B4X:
If Score>100 Then

............
End If

Thanks for now.

gr.
You have to use the mod function:
if Score mod 50 = 0 then 'the code after this will run every 50 pts
 

shashkiranr

Active Member
Licensed User
Longtime User
Hi Fred,

I am loading an image using a texture. How do i set the gravity of the image.

Is it a good practice to scale the image to the device height and width and then set it as a background using texture

Or

Is there a way where i can crop the images using LibGDX.

Kindly let me know.

Regards,
Sk
 

Informatix

Expert
Licensed User
Longtime User
I am loading an image using a texture. How do i set the gravity of the image.
I don't have any generic answer to your question as the Gravity setting does not exist outside of ImageViews and I don't know what you want to do exactly. For example, I could suggest to place an lgScn2DImage inside a lgScn2DTable, or to use a texture region.

Is it a good practice to scale the image to the device height and width and then set it as a background using texture

Or

Is there a way where i can crop the images using LibGDX.
I cannot give you a single answer. The visual result is completely different in these two cases (stretching vs. panning). To crop a texture, use a texture region.
 

Douglas Farias

Expert
Licensed User
Longtime User
hi informatix
i m trying to use your examples and i have error on AssetManager
here is the log

in release mode app open and close

in debug show me this error
gnoring event: lg_create. Raised from the wrong thread.

how can i fix this?

B4X:
LogCat connected to: B4A-Bridge: motorola XT1033-359321054369100
--------- beginning of /dev/log/main
libcore.io.ErrnoException: recvfrom failed: ECONNRESET (Connection reset by peer)
sending message to waiting queue (CallSubDelayed - UpdateStatus)
Ignoring event (too many queued events: CallSubDelayed - UpdateStatus)
Connected to B4A-Bridge (Wifi)
sending message to waiting queue (CallSubDelayed - UpdateStatus)
Ignoring event (too many queued events: CallSubDelayed - UpdateStatus)
Installing file.
PackageAdded: package:flm.b4a.testlibgdx
Installing file.
PackageAdded: package:flm.b4a.testlibgdx
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
sensor listener setup
OGL renderer: Adreno (TM) 305
OGL vendor: Qualcomm
OGL version: OpenGL ES 3.0 [email protected] AU@  (CL@)
OGL extensions: GL_AMD_compressed_ATC_texture GL_AMD_performance_monitor GL_AMD_program_binary_Z400 GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_robustness GL_EXT_texture_format_BGRA8888 GL_EXT_texture_type_2_10_10_10_REV GL_NV_fence GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_texture GL_OES_depth24 GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_fragment_precision_high GL_OES_get_program_binary GL_OES_packed_depth_stencil GL_OES_depth_texture_cube_map GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_vertex_type_10_10_10_2 GL_OES_vertex_array_object GL_QCOM_alpha_test GL_QCOM_binning_control GL_QCOM_driver_control GL_QCOM_perfmon_global_mode GL_QCOM_extended_get GL_QCOM_extended_get2 GL_QCOM_tiled_rendering GL_QCOM_writeonly_rendering GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_texture_sRGB_decode GL_EXT_texture_filter_anisotropic GL_EXT_multisampled_render_to_texture GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_EXT_disjoint_timer_query
framebuffer: (5, 6, 5, 0)
depthbuffer: (16)
stencilbuffer: (0)
samples: (0)
coverage sampling: (false)
Managed meshes/app: { }
Managed textures/app: { }
Managed shaders/app: { }
Managed buffers/app: { }
Ignoring event: lg_create. Raised from the wrong thread.
Ignoring event: lg_resize. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
** Activity (main) Pause, UserClosed = false **
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_pause. Raised from the wrong thread.
paused
sensor listener tear down
** Activity (main) Resume **
sensor listener setup
Ignoring event: lg_resize. Raised from the wrong thread.
Ignoring event: lg_resume. Raised from the wrong thread.
resumed
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
** Activity (main) Pause, UserClosed = true **
Ignoring event: lg_render. Raised from the wrong thread.
Ignoring event: lg_render. Raised from the wrong thread.
 

Douglas Farias

Expert
Licensed User
Longtime User
B4X:
You will need to run it in Release mode. Until B4A v3.50 the rapid debugger didn't support raising events from other threads.
You will need to run it in Release mode. Until B4A v3.50 the rapid debugger didn't support raising events from other threads.

i m runing at release mode but when open the app close in the same time

my b4a is 3.20 it is the problem?
 

Informatix

Expert
Licensed User
Longtime User
B4X:
You will need to run it in Release mode. Until B4A v3.50 the rapid debugger didn't support raising events from other threads.
You will need to run it in Release mode. Until B4A v3.50 the rapid debugger didn't support raising events from other threads.

i m runing at release mode but when open the app close in the same time

my b4a is 3.20 it is the problem?
The explanation is given in the post just above yours.
 

Douglas Farias

Expert
Licensed User
Longtime User
Hi again @Informatix
i have buyed the 3.8 i test now and again
in release mode the game run and close at same time
on debug mode now is diferent show me this error now

AssetManager example


LogCat connected to: B4A-Bridge: motorola XT1033-359321054369100
--------- beginning of /dev/log/main
libcore.io.ErrnoException: recvfrom failed: ECONNRESET (Connection reset by peer)
sending message to waiting queue (CallSubDelayed - UpdateStatus)
Connected to B4A-Bridge (Wifi)
sending message to waiting queue (CallSubDelayed - UpdateStatus)
Installing file.
PackageAdded: package:flm.b4a.testlibgdx
Installing file.
PackageAdded: package:flm.b4a.testlibgdx
Copying updated assets files (55)
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
sensor listener setup
OGL renderer: Adreno (TM) 305
OGL vendor: Qualcomm
OGL version: OpenGL ES 3.0 [email protected] AU@ (CL@)
OGL extensions: GL_AMD_compressed_ATC_texture GL_AMD_performance_monitor GL_AMD_program_binary_Z400 GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_robustness GL_EXT_texture_format_BGRA8888 GL_EXT_texture_type_2_10_10_10_REV GL_NV_fence GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_texture GL_OES_depth24 GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_fragment_precision_high GL_OES_get_program_binary GL_OES_packed_depth_stencil GL_OES_depth_texture_cube_map GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_vertex_type_10_10_10_2 GL_OES_vertex_array_object GL_QCOM_alpha_test GL_QCOM_binning_control GL_QCOM_driver_control GL_QCOM_perfmon_global_mode GL_QCOM_extended_get GL_QCOM_extended_get2 GL_QCOM_tiled_rendering GL_QCOM_writeonly_rendering GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_texture_sRGB_decode GL_EXT_texture_filter_anisotropic GL_EXT_multisampled_render_to_texture GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_EXT_disjoint_timer_query
framebuffer: (5, 6, 5, 0)
depthbuffer: (16)
stencilbuffer: (0)
samples: (0)
coverage sampling: (false)
Managed meshes/app: { }
Managed textures/app: { }
Managed shaders/app: { }
Managed buffers/app: { }
------
Queued assets=10
------
Unexpected event (missing RaiseSynchronousEvents): am_error
Check the unfiltered logs for the full stack trace.
Progress=0%
Progress=0%
Progress=0%
Progress=0%
- ERROR !!! ---
FileName=font/font.fnt
Class=class com.badlogic.gdx.graphics.g2d.BitmapFont
Message=Couldn't load dependencies of asset: font/font.fnt
- ERROR !!! ---
Progress=0%
Progress=0%
- ERROR !!! ---
FileName=maps/tide/Map01.tide
Class=class com.badlogic.gdx.maps.tiled.TiledMap
Message=Error parsing file: maps/tide/Map01.tide
- ERROR !!! ---
Progress=0%
- ERROR !!! ---
FileName=audio/reggae.mp3
Class=class com.badlogic.gdx.backends.android.AndroidMusic
Message=Couldn't load dependencies of asset: audio/reggae.mp3
- ERROR !!! ---
Progress=0%
Progress=0%
- ERROR !!! ---
FileName=audio/bubblepop.ogg
Class=class com.badlogic.gdx.backends.android.AndroidSound
Message=Couldn't load dependencies of asset: audio/bubblepop.ogg
- ERROR !!! ---
Progress=0%
Progress=0%
- ERROR !!! ---
FileName=audio/shotgun.wav
Class=class com.badlogic.gdx.backends.android.AndroidSound
Message=Couldn't load dependencies of asset: audio/shotgun.wav
- ERROR !!! ---
Progress=0%
- ERROR !!! ---
FileName=particles/particles.p
Class=class com.badlogic.gdx.graphics.g2d.ParticleEffect
Message=Error reading file: particles/particles.p (Internal)
- ERROR !!! ---
Progress=0%
Progress=0%
- ERROR !!! ---
FileName=background.jpg
Class=class com.badlogic.gdx.graphics.Pixmap
Message=Couldn't load dependencies of asset: background.jpg
- ERROR !!! ---
Progress=0%
- ERROR !!! ---
FileName=tree.psh
Class=class com.badlogic.gdx.graphics.g2d.PolygonRegion
Message=Error reading file: tree.psh (Internal)
- ERROR !!! ---
Progress=0%
Progress=0%
- ERROR !!! ---
FileName=smiley.png
Class=class com.badlogic.gdx.graphics.Texture
Message=Couldn't load dependencies of asset: smiley.png
- ERROR !!! ---
Progress=0%
- ERROR !!! ---
FileName=atlas/atlas.pack
Class=class com.badlogic.gdx.graphics.g2d.TextureAtlas
Message=Error reading file: atlas/atlas.pack (Internal)
- ERROR !!! ---
Progress=0%
------
Loaded assets:
------
Dependencies of Map01.tide:
Error occurred on line: 81 (main)
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.shell.Shell.runGoodChain(Shell.java:408)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:248)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:238)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:121)
at anywheresoftware.b4a.ShellBA$1.run(ShellBA.java:66)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5102)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at flm.b4a.testlibgdx.main._lg_render(main.java:495)
... 18 more
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
Installing file.
PackageAdded: package:flm.b4a.testlibgdx
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
sensor listener setup
OGL renderer: Adreno (TM) 305
OGL vendor: Qualcomm
OGL version: OpenGL ES 3.0 [email protected] AU@ (CL@)
OGL extensions: GL_AMD_compressed_ATC_texture GL_AMD_performance_monitor GL_AMD_program_binary_Z400 GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_robustness GL_EXT_texture_format_BGRA8888 GL_EXT_texture_type_2_10_10_10_REV GL_NV_fence GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_texture GL_OES_depth24 GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_fragment_precision_high GL_OES_get_program_binary GL_OES_packed_depth_stencil GL_OES_depth_texture_cube_map GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_vertex_type_10_10_10_2 GL_OES_vertex_array_object GL_QCOM_alpha_test GL_QCOM_binning_control GL_QCOM_driver_control GL_QCOM_perfmon_global_mode GL_QCOM_extended_get GL_QCOM_extended_get2 GL_QCOM_tiled_rendering GL_QCOM_writeonly_rendering GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_texture_sRGB_decode GL_EXT_texture_filter_anisotropic GL_EXT_multisampled_render_to_texture GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_EXT_disjoint_timer_query
framebuffer: (5, 6, 5, 0)
depthbuffer: (16)
stencilbuffer: (0)
samples: (0)
coverage sampling: (false)
Managed meshes/app: { }
Managed textures/app: { }
Managed shaders/app: { }
Managed buffers/app: { }
------
Queued assets=10
------
Unexpected event (missing RaiseSynchronousEvents): am_error
Check the unfiltered logs for the full stack trace.
Progress=0%
Progress=0%
- ERROR !!! ---
FileName=font/font.fnt
Class=class com.badlogic.gdx.graphics.g2d.BitmapFont
Message=Couldn't load dependencies of asset: font/font.fnt
- ERROR !!! ---
Progress=0%
Progress=0%
Progress=0%
- ERROR !!! ---
FileName=maps/tide/Map01.tide
Class=class com.badlogic.gdx.maps.tiled.TiledMap
Message=Error parsing file: maps/tide/Map01.tide
- ERROR !!! ---
Progress=0%
Progress=0%
- ERROR !!! ---
FileName=audio/reggae.mp3
Class=class com.badlogic.gdx.backends.android.AndroidMusic
Message=Couldn't load dependencies of asset: audio/reggae.mp3
- ERROR !!! ---
Progress=0%
Progress=0%
- ERROR !!! ---
FileName=audio/bubblepop.ogg
Class=class com.badlogic.gdx.backends.android.AndroidSound
Message=Couldn't load dependencies of asset: audio/bubblepop.ogg
- ERROR !!! ---
Progress=0%
Progress=0%
- ERROR !!! ---
FileName=audio/shotgun.wav
Class=class com.badlogic.gdx.backends.android.AndroidSound
Message=Couldn't load dependencies of asset: audio/shotgun.wav
- ERROR !!! ---
Progress=0%
- ERROR !!! ---
FileName=particles/particles.p
Class=class com.badlogic.gdx.graphics.g2d.ParticleEffect
Message=Error reading file: particles/particles.p (Internal)
- ERROR !!! ---
Progress=0%
Progress=0%
- ERROR !!! ---
FileName=background.jpg
Class=class com.badlogic.gdx.graphics.Pixmap
Message=Couldn't load dependencies of asset: background.jpg
- ERROR !!! ---
Progress=0%
- ERROR !!! ---
FileName=tree.psh
Class=class com.badlogic.gdx.graphics.g2d.PolygonRegion
Message=Error reading file: tree.psh (Internal)
- ERROR !!! ---
Progress=0%
Progress=0%
- ERROR !!! ---
FileName=smiley.png
Class=class com.badlogic.gdx.graphics.Texture
Message=Couldn't load dependencies of asset: smiley.png
- ERROR !!! ---
Progress=0%
- ERROR !!! ---
FileName=atlas/atlas.pack
Class=class com.badlogic.gdx.graphics.g2d.TextureAtlas
Message=Error reading file: atlas/atlas.pack (Internal)
- ERROR !!! ---
Progress=0%
------
Loaded assets:
------
Dependencies of Map01.tide:
Error occurred on line: 81 (main)
java.lang.NullPointerException
at flm.b4a.testlibgdx.main._lg_render(main.java:495)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:636)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:302)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:238)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:121)
at anywheresoftware.b4a.ShellBA$1.run(ShellBA.java:66)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5102)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
Installing file.
PackageAdded: package:flm.b4a.testlibgdx
Installing file.
PackageAdded: package:flm.b4a.testlibgdx
 

Informatix

Expert
Licensed User
Longtime User
Hi again @Informatix
i have buyed the 3.8 i test now and again
in release mode the game run and close at same time
I explained in post #208 that nothing visual is produced by this demo as it only loads assets. The output is in the log. So what do you expect?

on debug mode now is diferent show me this error now

As said in the first paragraphs of the introduction to libGDX, which is mandatory to read before using the lib, applications have to be run in Release mode only.
 

Computersmith64

Well-Known Member
Licensed User
Longtime User
I never tried to add an ad banner in my projects but I suppose it's a panel that you put at the bottom of the screen. I suppose also that you put your LibGDx view just above so what's the problem exactly?
Hi Informatix,

So I found an issue using this approach. On my Galaxy S3, if I create a a LibGDx view that is anything but full screen, it has a negative impact on the frame rate - to the point where it gets very jerky. I create a surface:

B4X:
Dim surface As View

Then initialize it as a LibGDx view:

B4X:
surface = lGdx.InitializeView("LG")

Then add it to my activity, leaving a gap (iHeight) at the bottom:

B4X:
Activity.AddView(surface, 0, 0, 100%x, 100%y - iHeight)

When I do this & then run the app, I find that the frame rate is dropping down into the 30's & 40's. If I add the surface full screen:

B4X:
Activity.AddView(surface, 0, 0, 100%x, 100%y)

I don't see this problem. I don't see the same issue on my Nexus 7, but I think that's because it has a much faster processor.

Thanks - Colin.
 

Informatix

Expert
Licensed User
Longtime User
Hi Informatix,

So I found an issue using this approach. On my Galaxy S3, if I create a a LibGDx view that is anything but full screen, it has a negative impact on the frame rate - to the point where it gets very jerky. I create a surface:

B4X:
Dim surface As View

Then initialize it as a LibGDx view:

B4X:
surface = lGdx.InitializeView("LG")

Then add it to my activity, leaving a gap (iHeight) at the bottom:

B4X:
Activity.AddView(surface, 0, 0, 100%x, 100%y - iHeight)

When I do this & then run the app, I find that the frame rate is dropping down into the 30's & 40's. If I add the surface full screen:

B4X:
Activity.AddView(surface, 0, 0, 100%x, 100%y)

I don't see this problem. I don't see the same issue on my Nexus 7, but I think that's because it has a much faster processor.

Thanks - Colin.
I can't explain why. I tried to verify that on two of my devices less powerful than a Nexus 7 and was not able to reproduce it. Whatever the screen size or the method of initializing LibGDX (as a view or as a full screen surface), I got the same FPS.

You could try this:
in the Perf_skaters demo, note the FPS with 2000 sprites, then replace this line:
lGdx.Initialize2(Config, "LG")
by:
Activity.AddView(lGdx.InitializeView2(Config, "LG"), 0, 0, 100%x, 90%y)
Do you still notice a FPS difference?
 
Last edited:

sterlingy

Active Member
Licensed User
Longtime User
Informatix,

I want to scale a ChainShape, but I can't find a method to do it. I though I'd be able to read each vertex, but have not found out how to read them individually and then scale their position and save them to a new array of vertices or just scale the shape as a whole

Is it possible?

-Sterlingy
 

Informatix

Expert
Licensed User
Longtime User
Informatix,

I want to scale a ChainShape, but I can't find a method to do it. I though I'd be able to read each vertex, but have not found out how to read them individually and then scale their position and save them to a new array of vertices or just scale the shape as a whole

Is it possible?
I have no experience with ChainShapes. My first attempt would be to change the radius of the shape.
 

sterlingy

Active Member
Licensed User
Longtime User
I have no experience with ChainShapes. My first attempt would be to change the radius of the shape.
I resolved my issue as I was able to get the vertices from lgMapPolylineMapObject, however, You might want to look at GetVertex from lgBox2DChainShape. I had an XML error in the editor and couldn't figure out how to use it. The official libGDX docs show it takes an Index and Vertex, but that didn't seem to work in b4a.

~Sterling
 

PaulR

Active Member
Licensed User
Longtime User
Hmmm.... is there any obvious way of using some of the b4a output with apps created with this to load into Eclipse with libgdx and deploy to other platforms?
 

Informatix

Expert
Licensed User
Longtime User
I resolved my issue as I was able to get the vertices from lgMapPolylineMapObject, however, You might want to look at GetVertex from lgBox2DChainShape. I had an XML error in the editor and couldn't figure out how to use it. The official libGDX docs show it takes an Index and Vertex, but that didn't seem to work in b4a.

~Sterling
I will fix the documentation for the next version (you pass the index, and you get the result in the 2nd parameter). The help text of Radius needs a fix too (it should be "Gets or sets the radius of this shape.").
 
Top