Ok. In short: I'm giving up on game programming in B4X. The progress I'm making is too slow and frustrating.
Why am I writing this here?
To vent my frustration.
First of all, a bit about me. I'm not a full-time programmer, but I have written many small things and also two big ones:
-A complete inventory management system that runs on Android, programmed in "Marmalade" (if anyone still knows that). The software is used in our company and works great.
-A CNC programming system for Fanuc lathes. It runs on Windows and is written in C++ with SDL. It has a source code size of about 70,000 lines. It is used to write all turned parts at our workplace.
So I think I'm not the stupidest.
How did I end up with B4X? I want to write a game that runs on Android and iPhone. B4X looked suitable for this at first glance.
How far have I come? The basic structure on the graphics side is written. That means I can run exactly the same program on Windows, Android, and iPhone. On Windows, everything is done via BitmapCreator. On Android, it's libGDX. And on iPhone, it's SpriteKit. The biggest challenge was using the same code for libGDX and SpriteKit. Since SpriteKit does things differently.
Why didn't use XUI2D?
I tried it. But first: there is no documentation. (No, example programs are not documentation. They are examples!) And second, it's too slow. A brief comparison with libGDX showed me: No. So really, I'm not sure if XUI2D renders on a hardware basis or, as I believe, in software.
It became clear to me on that it could only work with libGDX and SpriteKit. Speed was the main concern, but documentation was also important. If I had questions about how something worked, I could simply look it up in the official documentation and be done with it, unlike in B4X XUI2D, where there are always references to example programs. However, I had reservations about using libGDX and SpriteKit from the beginning. What would happen if they suddenly stopped working on newer operating systems? After all, they haven't been updated for a long time, and they were also integrated privately into B4X, so support cannot be assumed.
And now that I've realized that multitouch is not possible with SpriteKit, what else is there to do? I've also wasted 1.5 weeks on something like this again.
There have been so many frustrating moments where I've spent weeks trying to achieve something through trial and error.
I just want to be able to look up in the documentation how something works in principle when I have a problem. And not try to figure out what the command does and what the parameters mean through undocumented example programs in the forum.
I can't understand how on the one hand, there is a simple programming language that I really like. And on the other hand, complex code is needed for the simplest things.
For example, mouse/touch: left mouse button on Windows, no problem. Great. Then I wanted right/middle mouse button and the mouse wheel for my level editor. No chance. After two weeks, I copied together obscure code from the forum that I have no idea about.
And now that I've discovered that multitouch isn't possible with SpriteKit, what else can I do?
And what do I get from code that I somehow get to work? Great. It now works on my devices. But since you can only guess the commands through example programs, it is impossible to say whether the solution found now works universally everywhere.
That's why, after almost 2 years, I have reluctantly decided to close the chapter on B4X for game development.
Goodbye. And I wish you all health and success!
Why am I writing this here?
To vent my frustration.
First of all, a bit about me. I'm not a full-time programmer, but I have written many small things and also two big ones:
-A complete inventory management system that runs on Android, programmed in "Marmalade" (if anyone still knows that). The software is used in our company and works great.
-A CNC programming system for Fanuc lathes. It runs on Windows and is written in C++ with SDL. It has a source code size of about 70,000 lines. It is used to write all turned parts at our workplace.
So I think I'm not the stupidest.
How did I end up with B4X? I want to write a game that runs on Android and iPhone. B4X looked suitable for this at first glance.
How far have I come? The basic structure on the graphics side is written. That means I can run exactly the same program on Windows, Android, and iPhone. On Windows, everything is done via BitmapCreator. On Android, it's libGDX. And on iPhone, it's SpriteKit. The biggest challenge was using the same code for libGDX and SpriteKit. Since SpriteKit does things differently.
Why didn't use XUI2D?
I tried it. But first: there is no documentation. (No, example programs are not documentation. They are examples!) And second, it's too slow. A brief comparison with libGDX showed me: No. So really, I'm not sure if XUI2D renders on a hardware basis or, as I believe, in software.
It became clear to me on that it could only work with libGDX and SpriteKit. Speed was the main concern, but documentation was also important. If I had questions about how something worked, I could simply look it up in the official documentation and be done with it, unlike in B4X XUI2D, where there are always references to example programs. However, I had reservations about using libGDX and SpriteKit from the beginning. What would happen if they suddenly stopped working on newer operating systems? After all, they haven't been updated for a long time, and they were also integrated privately into B4X, so support cannot be assumed.
And now that I've realized that multitouch is not possible with SpriteKit, what else is there to do? I've also wasted 1.5 weeks on something like this again.
There have been so many frustrating moments where I've spent weeks trying to achieve something through trial and error.
I just want to be able to look up in the documentation how something works in principle when I have a problem. And not try to figure out what the command does and what the parameters mean through undocumented example programs in the forum.
I can't understand how on the one hand, there is a simple programming language that I really like. And on the other hand, complex code is needed for the simplest things.
For example, mouse/touch: left mouse button on Windows, no problem. Great. Then I wanted right/middle mouse button and the mouse wheel for my level editor. No chance. After two weeks, I copied together obscure code from the forum that I have no idea about.
And now that I've discovered that multitouch isn't possible with SpriteKit, what else can I do?
And what do I get from code that I somehow get to work? Great. It now works on my devices. But since you can only guess the commands through example programs, it is impossible to say whether the solution found now works universally everywhere.
That's why, after almost 2 years, I have reluctantly decided to close the chapter on B4X for game development.
Goodbye. And I wish you all health and success!