Goodbye

ilan

Expert
Licensed User
Longtime User
i will simplify the issue @Space is talking about.

the game he is trying to create is a 2d game and i dont agree with people here saying that b4x can create flappy bird kind games only. i did many games using b4x and many other users did very cool games and also successful games. so b4x is capable to do any 2d game that you can do with any other platform.

anyway his issue is that there is no 1 "strong" game engine in b4x that is cross platform and i do agree with him on this point.
if we would have a libgdx wrap for b4i it would be a much simpler solution to create cross platform games.

we do have x2 that is cross platform and also has box2d physic engine implemented although HE SAID that he tried to push it to its limit and he get very fast to those limits.
this is why i suggested him to use either libgdx for b4a or ispritekit for b4i. i used both of those engines and they are very strong for 2d games.

so the real question is if he wants to create a game for both OS (android and ios) or focus on android only or ios only.

in my opinion if you want to create a though game for android use libgdx. after publishing the game and get success create a b4i version using ispritekit. should not be to complicated. you can do almost everything in ispritekit what you can do in libgdx. i do agree that libgdx is a stronger engine but again for very though games ispritekit is way enough. just have a look at the appstore. many games where made using spritekit!
 

Sagenut

Expert
Licensed User
Longtime User
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!
Making the same game for 3 completely different platforms is far from simple.
And I think that this is not a B4X limit.
B4X try to make a lot to standardize certain things between the 3 platforms, and often succeed in this.
Maybe your case fall out from this.
I think that you will end using 3 different languages to completely support every platform at his best.
Lucky you if you are so skilled. :)
The best suggestion is probably to be able to use an Engine like Unity for very complex games, but I have no idea about it.
I wish you all the best for the future.... both if you will abandon B4X or if you will just take a break.
 

ajk

Active Member
Licensed User
Longtime User
I use Unity, Xcode, Androdi Studio. B4a, B4i, B4J, B4R beats them all (for my needs)
-speed of programming
- ability to easily inline what you need
-"multiplatform" - Let's say - there are no "truly multiplatform" tools - eg in Unity you have to put lot of work to make it work on different systems.
 

chikega

Member
Licensed User
For now, I would probably stick with one of the many game engines that have more ready-made tooling for cross-platform development. The top three game-engines used on Steam are:
Unity
Unreal
Gamemaker

Godot (FREE) is certainly making a showing with growing support for interfacing with many languages

Game Engines on Steam: The definitive breakdown

Many others:
Flame a Flutter-based game engine
Construct can use Javascript to enchance no-code environment
GDevelop (FREE) similar to Construct
Stencyl written in Java but uses the surprisingly versatile Haxe language which can compile to many platforms.
AGK Studio BASIC scripting language with C++ backend, also has user-supported plugins for other scripting languages like C#.
Castle Engine (FREE) Object Pascal
Orx (FREE) "Portable Game Engine" 2.5D data-driven game development engine, uses C/C++

There's really too many to list!
Watch GamesFromScratch YouTube channel to see the multitude of 2D, 2.5D and/or 3D game engines, pros and cons of each, etc...
 
Last edited:

BlueVision

Active Member
Licensed User
Longtime User
Somehow this discussion depresses me. I can understand the reasons for frustration as well as the enthusiasm about a successful solution to a problem. Without being able to understand the specific problems in game design, I am firmly convinced that there are programmers here in this community who could take care of such problems.
It's always primarily about a certain division of labour when programming or using a programming environment, no one will be able to ideally implement the most diverse areas and facets of a programming language. Most programmers have a problem in mind at some point and then solve this problem with a program, in the best case this is then also the solution to the problem of other people who may not even know that they have this problem. Just as well, however, there are programmers who are "closer to the programming language itself". They push the improvement of the programming environment through new and effective libraries, which in the best case are then usable by everyone. That is how I understand B4X.
Admittedly, B4X is perhaps not primarily suitable as a development environment for games, but it is excellently suited as the basis for a robust environment for this.
Maybe I'm wrong, I honestly don't even know if the Android operating system supports something like sprites or player-missile graphics (sprites -> Commodore64, PM -> Atari, those were my programming beginnings with games). Both sprites and PM elements were always hardware-oriented, but I think they should be available in software nowadays because of the very fast processors compared to back then.
From this point of view, perhaps one would also need developers within B4X who would increasingly throw themselves into the development (and documentation!) of powerful libraries and then make them available to other developers. The problem is really only the merging of a "need" with a "solution", paved with many weeks of hard programming work.
This all sounds very vague now and perhaps also misses the actual goal or is not feasible at all for other reasons.
I am very saddened by this kind of frustration, it resembles writer's block. For the writer himself, it quickly becomes such a big problem that it is perceived as existential.
For example, I spent half a year writing an algorithm with B4X to represent the current position of the Earth's moon reasonably accurately on a two-dimensional compass rose. In the end, I had the solution. But the time required for this solution was disproportionate to the effort. It was simply the will to implement this problem. Nobody can pay for that...

So, never give up!
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
This forum is for development with B4X. This is not the place to promote other tools. There are many general programming sites where you can discuss other tools.

I will also add - it is fine and expected that developers come and go. Everything good. I myself develop with ~5 different programming languages (B4X counts for one) daily.

No need to make drama about you (I'm not writing it to anyone specific) choosing to switch to a different tool. And we are always happy to see developers return.
 

tufanv

Expert
Licensed User
Longtime User
This forum is for development with B4X. This is not the place to promote other tools. There are many general programming sites where you can discuss other tools.

I will also add - it is fine and expected that developers come and go. Everything good. I myself develop with ~5 different programming languages (B4X counts for one) daily.

No need to make drama about you (I'm not writing it to anyone specific) choosing to switch to a different tool. And we are always happy to see developers return.
Well said!
 

aminoacid

Active Member
Licensed User
Longtime User
In my opinion B4X is an amazing and unique tool. No tool will ever do everything that you want, but B4X comes close. The swiss army knife was a failure and any tool that proclaims to do anything and everything well should be taken with a grain of salt. Enuf said!
 

Bucky108

Member
Licensed User
Longtime User
I agree would be nice to have really good documentation. I'm just in the process now of migrating an app from B4A to B4X so good documentation would be quite helpful.

I use the B4X Object Browser application quite extensively I find it quite helpful. Unfortunately it doesn't handle libraries in the B4XLib format.
 

mcqueccu

Well-Known Member
Licensed User
Longtime User
To add my voice to this thread, I will say B4X is a great tool, and even though I am not a game developer, I have seen a few games developed using this tool and it looks amazing. I wish I can also do even the basic of games for my kids to play.

In any case, I think the pro game developers on this page should reach out to our friend, and give me pointers (help) on how they also go about their game programming. I hate to see members leave on simple things like this.
 
Top