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

Status
Not open for further replies.
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:

tiled_PTUSYuOIPo.png


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

  • X2.b4xlib
    24.2 KB · Views: 1,869
Last edited:

konradwalsh

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

Where is v4
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
XUI2D v0.92 and X2 framework v0.92 released.

- New class templates:

SS-2018-07-23_15.42.02.png


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

SS-2018-07-23_15.30.51.jpg


- 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

B4X founder
Staff member
Licensed User
Longtime 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

Well-Known Member
Licensed User
Longtime 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

B4X founder
Staff member
Licensed User
Longtime 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.
 
Status
Not open for further replies.
Top