B4J Tutorial 💡 [B4X] [XUI] [B4XPages] B4J 'Erel Says' hand, eye memory game - Newer developers

Hello to you all,
I decided to recreate this simple but effective game example, the game is based on the B4XPages library. The game is designed for hand, eye and memory coordination, so I called it 'Erel Says' ;)

I've tried to make the code as simple as possible to follow for new to B4X developers. The code in B4XMainPage and B4XGame is cross platform and works with B4A, B4i and also B4J, I've added comments where feasible to do so. The code for the B4XSound module is also cross platform and can be found on the forum, I've added a link to the Erel's post to the code in the module.

I've only used the standard B4X views for this tutorial. There's nothing complicated about this game, you can read the code and try to learn from it.

>>> CLICK HERE <<< to download the B4XPages source code.

B4A and B4i projects


Libraries needed:
1614293195969.png


MacOS screenshots below:

Main screen

Main.png


Game screen
Game.png



Windows screenshots below:

Main screen

Main.png


Game screen
Game.png



Enjoy...
 

udg

Expert
Licensed User
Anyways I want to know what your level/score is?
First try
round: 11
score: 65
Is there any good in play back as fast as possible? (I didn't check the code..I wanted to experience the game as a never-seen-before challenge)
Don't know about you, but when playing my "memory" is based mainly (or exclusively) on sound. An experiment could be to assign to 4 keys on the keyboard the corrispondence to the four colors and play blindfolded..
 

JordiCP

Well-Known Member
Licensed User
Arrived to round 16... will have to delete it immediately, it's too addictive for me 😁

A really nice example, well done!!
Waiting for debugger to connect...
Program started.
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
*** mainpage: B4XPage_Resize [mainpage]
*** gamespage: B4XPage_Appear [mainpage]
*** gamespage: B4XPage_Resize [mainpage, gamespage]
Yeeeeeeeeeeeeeeeeeeeeeeeeeeeees
Yeeeeeeeeeeeeeeeeeeeeeeeeeeeees
Yeeeeeeeeeeeeeeeeeeeeeeeeeeeees
Yeeeeeeeeeeeeeeeeeeeeeeeeeeeees
Yeeeeeeeeeeeeeeeeeeeeeeeeeeeees
Yeeeeeeeeeeeeeeeeeeeeeeeeeeeees
Yeeeeeeeeeeeeeeeeeeeeeeeeeeeees
Yeeeeeeeeeeeeeeeeeeeeeeeeeeeees
Yeeeeeeeeeeeeeeeeeeeeeeeeeeeees
Yeeeeeeeeeeeeeeeeeeeeeeeeeeeees
Yeeeeeeeeeeeeeeeeeeeeeeeeeeeees
Yeeeeeeeeeeeeeeeeeeeeeeeeeeeees
Yeeeeeeeeeeeeeeeeeeeeeeeeeeeees
Yeeeeeeeeeeeeeeeeeeeeeeeeeeeees
Yeeeeeeeeeeeeeeeeeeeeeeeeeeeees
Noooooooooooooooooooooooooo
*** mainpage: B4XPage_Appear [mainpage, gamespage]
*** gamespage: B4XPage_Disappear [mainpage]
 

Peter Simpson

Expert
Licensed User
Is there any good in play back as fast as possible?
Just like the original 'Simon Says' electronic game of the late 70's and early 80's, the further you go in the game, the fast the game gets. I'm not sure what the origin milliseconds timing was and I can't remember at which levels the game starts to gets quicker, but it does so I tried to mimic that behaviour in this simple tutorial :)

Arrived to round 16... will have to delete it immediately, it's too addictive for me 😁
Wow, that's good, and yes this game is definitely addictive just like the original electronic game from my youth.
I do have another simple game example in mind, but I'll have to think about the best/simplest way to create it for new to B4X developers to hopefully learn from.

Thank you for the positive feedback.
 
Top