2D Space Shooter in B4A

MiniDemonic

Member
Licensed User
Longtime User
In my opinion b4a isn't that great for making games.
I would suggest that you get Unity instead.

There should be a library for games here somewhere, I think that I saw one a while ago, but I can't help you with that.
 
Upvote 0

Johnmcenroy

Active Member
Licensed User
Longtime User
Thanks for reply . I know this. Among 2D engines I choose Gideros. Unity is more for 3D. But I am shure that it is possible in B4A also , so interesting how to make it in a better way.
In my opinion b4a isn't that great for making games.
I would suggest that you get Unity instead.

There should be a library for games here somewhere, I think that I saw one a while ago, but I can't help you with that.
 
Upvote 0

Informatix

Expert
Licensed User
Longtime User
Hello
What is the best way to make 2D Space Shooter in B4A ? What libraries are needed for that ? Also what is the best way to make explosion in B4A , simulating particles ? Thanks

If you want to create a space shooter with less than 100 enemies on screen and a reasonable amount of (small) particles (less than a few dozens), my Accelerated Surface lib should be good enough. You can try to expand my Space Enemies example to test performance. If that's not satisfying, you'll have to use OpenGL and probably not B4A. So your best choice will probably be a Java game engine.
I draw to your attention my new library: Steering Behaviors, which is the first brick of AI in a game. It is well suited for games like Galaxian for example.
 
Upvote 0

Informatix

Expert
Licensed User
Longtime User
At the core of them, there's the same thing: a view that benefits from hardware acceleration when you draw onto it (if the Android version >= 3). Behind the canvas methods, Android uses OpenGL to draw, but in an unoptimized way, so you will get a better performance by using directly OpenGL. BUT to get better results than AS or GV, you will have to master OpenGL and be able to produce good quality code. I don't know if you already looked at it but OpenGL is not for beginners and has a steep learning curve. The Java game engines hide (more or less) the complexity of OpenGL and have a solid framework with good code, so you will achieve greater results with them than with AS or GV. On the contrary, your own code using OpenGL could be very disappointing. Most of the amateurish code using OpenGL that I tested perform equally or less well than AS (usually, less well).
That being said, where are the differences between AS and GV?
GV is very simple and has very limited features (the basic features needed for a simple game). It is game oriented.
AS has an extended set of functions and has no particular orientation. I use it myself in a variety of situations not related to games (as an alternative to ImageView, for example, to have round corners, or to draw a graph). AS lacks some popular functions for games, like the one that animates a spritesheet (and I won't do it because using spritesheets is not a good idea). But you can recreate most needed functions with the existing set.
AS can be seen as an enhanced Canvas library.
For games, AS can offer a slightly superior performance because it provides a fast function to draw a bitmap.
Another difference: AS runs on Android versions < 3 (but without any hardware acceleration).
 
Upvote 0
Top