B4J Library [B4X] X2 / XUI2D (Box2D) - Game engine

Erel

Administrator
Staff member
Licensed User
XUI2D is a wrapper for jbox2d engine: https://github.com/jbox2d/jbox2d
License: https://github.com/jbox2d/jbox2d/blob/master/LICENSE
iXUI2D is a wrapper for Box2D: http://box2d.org/

XUI2D and iXUI2D share the same API and together with BitmapCreator, XUI library and the X2 library they allow to build cross platform games.

Installation instructions:

Requires B4J v7.0+, B4A v8.8+ and B4i (v5.5+).

Download X2.b4xlib (this is a cross platform library) and copy it to the additional libraries folder.

Current versions:

- BitmapCreator - latest version is preinstalled.
- XUI2D - latest version is preinstalled.
- X2 - v1.22

Start here: [XUI2D] Example Pack

Updates

V1.23 - Custom transparent colors of tile sets are respected:



V1.22 -You can add X2SkipLogs as a conditional symbol (Ctrl + B) to remove the most frequent log messages.
V1.21 - Fixes an issue where drawings will not be resumed after the game was paused.
 

Attachments

Last edited:

konradwalsh

Active Member
Licensed User
Ok, I have downloaded the Bitmap Creator Lib from above several times but it is version 3.60?

Where is v4
 

Erel

Administrator
Staff member
Licensed User
XUI2D v0.92 and X2 framework v0.92 released.

- New class templates:



- Support for world contact callbacks. This is a more robust way to handle collisions. For example in this screenshot you can see a one way horizontal body. The collision is only enabled if the kid is above the block.



- Ray casting. Cast a ray and find the bodies that are intercepted by the ray. You can see its usage in the walking character example. Touch or click on the screen to fire a laser beam.

- Many small improvements and bug fixes.

Note that the Game class template has been updated. I will update all the current examples.
 

Erel

Administrator
Staff member
Licensed User
New versions released. Large update with many internal improvements. X2 framework now includes a class named X2TileMap that makes it easy to create tiled maps and objects with Tiled map editor: https://www.mapeditor.org/
 

Erel

Administrator
Staff member
Licensed User
Large update including BitmapCreator v4.17 and XUI2D v0.95. The X2 framework was also updated with many changes.

New examples pack with all the currently available examples: https://www.b4x.com/android/forum/threads/xui2d-example-pack.96454/#post-608505

There was an important breakthrough in the B4A implementation and the performance was significantly improved.
All the examples now run in 60 fps on a 5 years old (and quite weak) Nexus 5 device.
 

Johan Hormaza

Active Member
Licensed User
Large update including BitmapCreator v4.17 and XUI2D v0.95. The X2 framework was also updated with many changes.

New examples pack with all the currently available examples: https://www.b4x.com/android/forum/threads/xui2d-example-pack.96454/#post-608505

There was an important breakthrough in the B4A implementation and the performance was significantly improved.
All the examples now run in 60 fps on a 5 years old (and quite weak) Nexus 5 device.
Excellent EREL !!! Now it runs great! on a Motorola G2 .. Thanks!
 

Erel

Administrator
Staff member
Licensed User
BitmapCreator v4.20 released. It includes a new method for drawing rotated anti-aliased bitmaps. It is significantly faster in B4J and B4i (up to 10 times faster). It is not used in B4A for now as the performance is similar to the canvas based performance.
It is managed internally in X2SpriteGraphicCache.
 
Top