The Daily Click ::. Forums ::. Klik Coding Help ::. Memory game
 

Post Reply  Post Oekaki 
 

Posted By Message

matej podjavorsek



Registered
  03/01/2004
Points
  101
14th May, 2004 at 16:58:26 -

Can anybody tell me how to make a simple memory game?

 
n/a

Arf :: FPP Games



Registered
  15/05/2002
Points
  1364
14th May, 2004 at 17:47:49 -

You basically need to get it so that every active object representing a card has an alterable value that shows which group it belongs to, and that there are only two cards in each group. Then when two cards are selected you just check if they share this value, and if so remove them.
In practice this might be more complicated than you expect. Short of just giving you the code, it's hard to just tell you how to do it. First try yourself and then come up with some more specific questions -- they're generally easier to answer.

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
14th May, 2004 at 21:04:41 -

Here's some easy code but it'll be hard with alot of cards.

Start of frame:
* pick a card at random
+ card.dir = 1
+ card.alt a = dir

* pick a card at random
+ card.dir = 1
+ card.alt a = dir

If player clicked on card + counter1 = 0.
Set counter 1 to card.alt a

If player clicked on card + counter1 > 0.
Set counter 2 to card.alt a

counter 1 > 0
+ counter 2 > 0
+ counter 1 = counter 2
+ Find all cards with alt a = counter 1:
Destroy.

That code is very basic and won't really work . But it's just meant to give you an idea of how it works.



 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

vortex2



Registered
  27/05/2002
Points
  1406
14th May, 2004 at 21:22:40 -

First, there is my mmf 1.5 engine I created :

http://www.clickteam.com/CTforum/showflat.php3?Cat=&Board=upload&Number=198555&page=&view=&sb=&o=&vc=1


Then there is an improved version Alien built off of my base:

http://www.clickteam.com/CTforum/showflat.php3?Cat=&Board=upload&Number=201669&page=&view=&sb=&o=&vc=1

 
A bit of insanity with every bite!
   

Post Reply



 



Advertisement

Worth A Click