[Question] Where Erel is today?

Erel

B4X founder
Staff member
Licensed User
Longtime User
No vacation today :)

Some unexpected things however everything is good.

And I'm still playing:

SS-2018-07-09_18.12.25.jpg


First version of XUI2D with the supporting framework will be released soon...
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
do you need any beta testers?
Yes!

It will be released as a beta version. Not all features of Box2D will be available in the first few versions. Specifically joints are not yet wrapped. Once the main concepts are implemented and working, it shouldn't be difficult to add more features.
 

ilan

Expert
Licensed User
Longtime User
Yes!

It will be released as a beta version. Not all features of Box2D will be available in the first few versions. Specifically joints are not yet wrapped. Once the main concepts are implemented and working, it shouldn't be difficult to add more features.

sounds awesome. just a silly question. we already have a wrap of box2d for android and b4j. wouldn't it be simpler to use that source code??
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The answer is:

1. The B4J/A wrapper which is based on jBox2D is quite simple and straightforward.
2. The B4i wrapper is more complicated.
3. Both wrappers expose an identical API. I don't think that it would have been easier for me to start with the already wrapped library. If I remember correctly Informatix chose a different approach when exposing jBox2D. His approach is good for the library he created however it is less suitable when the API must be identical to the B4i library.

A lot of the work was actually in different areas related to BitmapCreator and the B4X code that ties the pieces together.

Latest example: www.b4x.com/b4j/files/games/X2WalkingCharacter.jar (executable jar)
You can see the "debug draw" mode. Note that performance is not optimal when it is enabled.
 

LucaMs

Expert
Licensed User
Longtime User
Well, the problem will be easier when you will have to make 3D too :D. This will happen very soon, because "I need" :D to implement an animation similar to one used in Zynga Poker: some coins are practically "thrown on the user's face", and they are 3d, they rotate during "the flight".

Obviously I'm joking, I give the coins in a much more polite way :)
 

ilan

Expert
Licensed User
Longtime User
Last edited:

ilan

Expert
Licensed User
Longtime User
You can see the "debug draw" mode. Note that performance is not optimal when it is enabled


is the debug draw done with canvas? in ios you will get very bad result when u use canvas. i am not sure how you are combining box2d and your drwing library but trying to use spritekit approach may work.

so try to take a simple imageview and connect it to the body and draw once on it the body shape may work well. even if you use canvas to draw on the imageview since you do it only once. by connect i mean use the center of the body as the center of the imageview and move the imageview according to the body including the rotation every timestamp.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Workaround: hold Shift and right click on "Form" in the task bar. Select move and hold the right arrow until it appears.

is the debug draw done with canvas?
Debug draw is done with a canvas. Performance didn't look too bad on iOS. I'm using a scaled down canvas.
Remember that debug draw is only used for debugging so its performance is not critical.
 

ilan

Expert
Licensed User
Longtime User
looks really good erel. performance is not bad at all. do you remove the bodies ones they are outside the screen?
what means counter? is it just a simple int that goes up each frame by 1?


it looks like when a ball falls down on another ball in full speed he enter a little bit the other ball. i am not sure if it has something to do with the collisions event or if the drawing has a delay.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I wasn't clear before. The debug drawing layer is made of the rectangles around the bodies. All other drawings are not related to debug drawing.
They are drawn with BitmapCreator. It is done in an efficient way.

do you remove the bodies ones they are outside the screen?
In this example, yes.
The counter is just an int that is incremented every loop.

am not sure if it has something to do with the collisions event
It is probably related to the engine settings. Need to check it.
 
Top