Android Tutorial 💡 Match the flags. Simple XUI cross platform game tutorial for new B4X B4A developers - Newer developers

Hello B4X'ers,
This morning as my new clients are currently beta testing software that I developed for them using B4J 👍, I thought to myself lets create a quick and simple game using B4A for the influx of new B4X developers that will be happening in the near future :cool:

I decided to modify and use the flip cards code that I previously posted to help me create this game, this is to show developers new to the B4X suite of development tools just how quick and simple it can be to create a simple game using B4A. Whilst using my previously posted code to create this game, I realised that there were a couple of issues with that code. I've now resolved those issues and re-uploaded the flip cards code file for all to use.

So taking into consideration that this morning I had to resolve issues with the flip cards code, resolving those issues and using that code to create this extremely simple game took me about 2 hours in total to complete. I've tried to make the code as simple as possible for all new B4X developers to follow as I've added comments throughout the whole code.

Note: The downloaded source code includes both B4A and B4i projects. Ignore the initial missing files warnings, just run the project and the files WILL be copied over.

Click below for the B4i version

>>> Download the source code <<<

11/06/2020: Updated V1.0.0.1 - Made the MatchFlag.bas shared module file 100% B4A/B4i cross platform

Libraries needed.
1586533854584.png


Screenshot.jpg



Enjoy...
 
Last edited:

aeric

Expert
Licensed User
Longtime User
I haven't see the code but this example is a good for teaching B4X. Thanks.
 

John P

New Member
I suppose I'm part of the "influx of new B4X developers"! I'm not sure I'll stick with it, but it's interesting to get an idea of how it works. Loading a library (that SD_XUIView one) had some challenges, but I suppose learning how to do that is part of using the overall product. As always, "Read the manual" is the important thing. So it works, and thank you.

Hey, "This is an old thread"? OK, 3 months, but I really think it's better to reply here than start a new one.
 

Peter Simpson

Expert
Licensed User
Longtime User
I suppose I'm part of the "influx of new B4X developers"! I'm not sure I'll stick with it,

Hello John and welcome to the forum.
I'm more than sure if you are serious about learning how to develop either single or cross platform applications using the B4X RAD tools, then you will enjoys being on this forum.

The forum is always active and there are plenty of example source code for you to learn from, don't forget to watch the videos under the 'Learn' link at the top of the forum and read the well written B4X manuals, they really are full of useful information and tips to get you started.

There are plenty of developers on this forum that are always willing, ready and able to help you with your enquiries.

So now you can start your new journey developing your applications using B4X, we'll all see you on the forum as and when you need help.

Peter...
 
Last edited:

Peter Simpson

Expert
Licensed User
Longtime User
disregard

Did you find it?
 

TheRnker

Member
Hi Peter

Thanks for sharing the code.

I am a newbie and I wanted to check how to modify the code to display only 3 images instead of 6.
 

Peter Simpson

Expert
Licensed User
Longtime User
I am a newbie and I wanted to check how to modify the code to display only 3 images instead of 6.

Hello @TheRnker
You just need to change the Rows and Columns values.

From
B4X:
     Dim OffSetX, OffSetY, Rows = 4, Columns = 3 As Int
To
B4X:
     Dim OffSetX, OffSetY, Rows = 1, Columns = 3 As Int


Enjoy...
 
Top