The purpose of this framework is to allow developers to build cross platform 2D games.
It is made of three main components:
XUI2D (B4A + B4J) / iXUI2D(B4i) - wrappers for Box2d. Box2d is a powerful physics engine. If you are not familiar with Box2d then it is recommended to start with its manual: http://box2d.org/documentation/
BitmapCreator - Cross platform class, mostly written in B4X, that can make fast drawings.
Latest version of BitmapCreator is available in the XUI2D thread.
X2 classes - A set of B4X classes that tie all things together.
Currently it is made of:
- X2Utils - The main class with the game loop implementation and various utility methods.
- X2BodyWrapper - Wraps B2Body objects and adds useful features.
- X2SoundPool - A class that hides the differences between the various low latency playback libraries in the different platforms.
- X2DebugDraw - "debug draw" implementation. Very useful to better understand what happens in the physical engine.
- X2SpriteGraphicCache - Manages a cache with the various graphics. This is a very important class and it is critical for the game performance.
The various classes and their usages will be explained in the next tutorials.
You can try the two attached examples. Note that all the classes are identical between the three platforms. It should look like this, with the grey paths:
The difference between the projects is in the layout files and the code in the main module.
Two examples are currently available:
- Hello world, the projects are attached.
- Walking character:
The B4i projects will be released when the next version of B4i is released.
48.6 KB Views: 216
41.7 KB Views: 201