Memory Game

Post

Posted
Rating:
Item has a rating of 5 (Liked by gbWilly)
#1 (In Topic #1981)
Avatar
Enthusiast
Yogi is in the usergroup ‘Enthusiast’
Hi folks,

Download

Latest Version:

Attachment

Memory-0.0.5.tar.gz


After playing cogier Wordsearch there was the idea to give some attention to
an old game "Memory", which I now play with my grand children.
You know, find pairs of pictures.

We usually play in pairs, but here you're not playing against the app,
you're playing against the clock.😇

As pictures I used the stock icons of gambas 128x128 px.

I couldn't find a reasonable solution to make the form fit the playing field,
as it is created on the fly.

So I gave it a fixed height. Does anyone have any ideas for the flexible height?

Image

Screenshot 2025-12-19.jpg

Screenshot 2025-12-19.jpg

Regards
Yogi

Last edit: by Yogi

Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Guru
cogier is in the usergroup ‘Guru’
cogier is in the usergroup ‘GambOS Contributor’
The way I would do this is to put 10 rows (HBoxes) of 10 Buttons. Have a look at the attached program. You can resize the form horizontally and vertically.



Attachment

MemoryCO-0.0.1.tar.gz

Online now: No Back to the top

Post

Posted
Rating:
#3
Avatar
Enthusiast
Yogi is in the usergroup ‘Enthusiast’

cogier said

The way I would do this is to put 10 rows (HBoxes) of 10 Buttons. Have a look at the attached program. You can resize the form horizontally and vertically.

Dear cogier ,

Thanks for pointing me in the right direction. I already used the 10 HBoxes, but - I don't know why -
I put them in a separate container. Even used the form arrangement.vertical.

So the solution was just removing the container and it works as expected…
(struggling again with the containers)

Big thanks! 👍
Kind regards
Yogi

Attachment

Memory-0.0.3.tar.gz

Online now: No Back to the top

Post

Posted
Rating:
#4
Avatar
Guru
cogier is in the usergroup ‘Guru’
cogier is in the usergroup ‘GambOS Contributor’
I don't know if this will help, but I have created the same program, mainly on the Form.

Attachment

MemoryCO-0.0.2.tar.gz


Off topic: - I floated past your town in 2017on the Danube
Online now: No Back to the top

Post

Posted
Rating:
#5
Avatar
Enthusiast
Yogi is in the usergroup ‘Enthusiast’

cogier said

I don't know if this will help, but I have created the same program, mainly on the Form.

Off topic: - I floated past your town in 2017on the Danube


I had a look and it helped me to go on.
Just working on a solution Player versus PC. At the moment I am winning against the random, but
I am working on a solution that the computer "knows" the last shown cards.


@offtopic
I'm sure every country has its special places, and for me I am at a special place where others come to visit.
With our children we have been in the summertime mostly every day at the Danube at the beach opposit to
"Dürnstein". It is like in heaven if you are aware of it.
Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 5 (Liked by Yogi)
#6
Avatar
Administrator
gbWilly is in the usergroup ‘unknown’
gbWilly is in the usergroup ‘Blogger’
gbWilly is in the usergroup ‘GambOS Developer’

Yogi said

After playing cogier Wordsearch there was the idea to give some attention to
an old game "Memory", which I now play with my grand children.
You know, find pairs of pictures.
Nice  :thumbs:

I made something likewise long time ago, guess around 2013, when overthinking and messing with some application ideas for a simple gaming guide (never written  :lol: ).
It makes for good programming exercise. I created a small application named 'Kids Memory' for little kids with different selectable (8x8) themes like:
- Thomas the engine images
- Shleicht (?) Knight images
- Family member images
In my version you see 32 backs. Click one, it turns, click the next it turn. If a match they stay turned. If not they turned around.
A counter kept track how may turns it took to get all done.

I also made a maze like 2D-outlay in those days, and had a animated figure that could run through it, with a class for collision detection, positioning, moving etc, with teleport places, that would teleport you to another teleport point. The idea was to create an enemy that would chase you and upon touching you, you lost. You would need to survive a certain period in the maze without getting caught.
The latter never got done, the first part did running, teleporting etc., really good material for a Gambas3 learning guide.

Might pick up on that again someday…
You got me inspired and I bet the grandkids enjoy it a lot more knowing 'tech grandfather' build it  :lol:


gbWilly
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories


… there is always a Catch if things go wrong!
Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 5 (Liked by YogiLiked by gbWilly)
#7
Avatar
Expert
Quincunxian is in the usergroup ‘Expert’
Quincunxian is in the usergroup ‘Blogger’
Selection_002.png

Hi Yogi - I have something similar with a 'Memory Game' as part of a set of Gambas Games that I'm developing.
It has 6 modes from Easy ( 6 x 6 - 18 pairs with a 3 second view to memorize) to Legendary ( 16 X 16 - 118 pairs with a 1 second view)
I can manage to get 'medium' so far. Still playing around with the timing aspect and working out a suitable scoring system.

The application has a long way to go but the memory game ( more or less ) works.
The games may crash and suddenly catch fire for no particular reason - as I said, very early days.

I am in the process of developing the rest of the games as time permits. 
Memory works, Logics & Blocks sort of work

cogier - I would like to add your words game to the set as I really like the format and I would only have to change some aspects to suit the overarching game template.
same with the Sudoku game.

gbWilly - Love the concept of the Maze game - if you would like to share the code, I'd be happy to see what I could do. 


This is the list of games that I want so far - if anyone has thoughts of a simple game that they would like to see add - please feel free.


Selection_004.png


I can't attach the Game code as it's 635Mb ( images, sound effects and some background music make it so large)




 

Cheers - Quin.
I code therefore I am
Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 5 (Liked by gbWilly)
#8
Avatar
Enthusiast
Yogi is in the usergroup ‘Enthusiast’
I started out in the early 80s with a Commodore 64 and discovered the world
of computers. That led to an 80286 PC, and so it went on.

Always discovering something new, and the programming languages were always
‘high level’, never Assembler, C, etc.
And it was always the playful aspects of learning languages that appealed to me.

Quincunxian
gbWilly
Nice of you to share your insights with us.

Here is the "Memory" version to play against the Computer too. It has no
choosing of different strength levels. I decided to keep the last pictures
in a variable (up to ten) and if the 1st random picture is found within the
last pictures kept the Computer gets it - like real life: if you turn 2 pictures
and they are not the same the other person may now one of the counterpart
of the 2 pictures…

At the moment I won against the Computer with about 60% - depends
on the random numbers created.
I think the game level could depend on the size of the "Stack" holding
the last pictures shown - the more pictures in the variable, the greater
the chance for the computer.

Thanks to all of you 👍
kind regards
Yogi

Attachment

Memory-0.0.4.tar.gz

Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 5 (Liked by gbWilly)
#9
Avatar
Guru
cogier is in the usergroup ‘Guru’
cogier is in the usergroup ‘GambOS Contributor’

Quincunxian said

 cogier - I would like to add your words game to the set as I really like the format and I would only have to change some aspects to suit the overarching game template.
same with the Sudoku game.

Please feel free to use the game. If you have not tried it have a look at 'Clear Lines', it's on the Farm, it's that game I play the most.

I have just update Four2Nine due to an API change, that is also on the Farm and may be of interest.

Last edit: by cogier

Online now: No Back to the top

Post

Posted
Rating:
#10
Avatar
Administrator
gbWilly is in the usergroup ‘unknown’
gbWilly is in the usergroup ‘Blogger’
gbWilly is in the usergroup ‘GambOS Developer’

Quincunxian said

@gbWilly - Love the concept of the Maze game - if you would like to share the code, I'd be happy to see what I could do. 

 
I'll have to go find it under a pile of dust and make it suited for current versions.
It was made in Gambas 3.6.2, if I remember correctly, using qt4, no longer available on my system.
I might find KidsMemory under that same dust pile  :lol:

gbWilly
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories


… there is always a Catch if things go wrong!
Online now: No Back to the top

Post

Posted
Rating:
#11
Avatar
Enthusiast
Yogi is in the usergroup ‘Enthusiast’
Hi Folks,

Just want to share the latest version of the memory game.
It is possible to play against the Computer, 3 level of difficulty, change the playfield etc.

Attachment

Memory-0.0.5.tar.gz


Enjoy 😇
Yogi
Online now: No Back to the top
1 guest and 0 members have just viewed this.