Need help with memory game

This forum is currently in read-only mode.
0 favourites
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Could someone please tell me how i could make a memory type game with Construct?.It's like that picture game where you have to match the two pictures in order to score points.And if the two pictures match the pictures that matched will dissapear.Ive tried the animation frame set in the event editor but it will only work with two pictures.Some help would be greatly appreciated.It must be like the example pic below.This was done with the oldskool knp.

    <img src="http://dl.dropbox.com/u/7658043/knpcg.jpg">

    Thanks in Advance

    DravenX

    [quote:3veoqbgw]Knowledge is Power

  • Is this game to complicated for Construct?.I see that no one knows how to do this.Please help if you can.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I would be a little more patient for someone to reply, this isn't exactly the fastest forum in the world.

  • Lol yes i can see that.My kids are nagging me to create this memory game ,Thats why im so impatient.I am getting the hang of this though.The events are almost the same as my 1994 oldskool KNP game creator.I just don't know why the event's are so complicated with Construct,Or im just too oldskool for these new events lol.

    I have created some nice games with Construct for my kids.I did the old contra and a maths game with Construct.But this memory game is starting to frustrate me now.And KNP can only do 8 bit colors which are useless in today's standards.And i do not want to use XNA game studio because im creating my 3d games with that prog.

  • I had KNP once.... well, I had the manual. The actual CD was missing. That's second hand for ya. The manual was a good read though.

  • I already created a memory game and it isn't particularly complicated to achieve this. You could just have all your card images as frames of a single sprite. Then compare those frames. That's like the basic principle.

    I'd share my cap but it's using family photos as card images. I would have to edit those out before I put it on the internet. Which I can't do right now. But it's easy enough to figure this out by yourself (hopefully).

  • Yes that's what im doing but the events will only recognise one thing.For instance ,when i click on one card and then on the next card which matches then those two cards will be destroyed ,But if i put in a different card and try to compare those frames then nothing happens

    [quote:hqe32xhd]I'd share my cap but it's using family photos as card images. I would have to edit those out before I put it on the internet. Which I can't do right now. But it's easy enough to figure this out by yourself (hopefully).

    Could you make an example of such a game for me please.just with 4 blank sprites with different color blocks for each animation frame.I want to see how you use the events in creating such a game.

  • Pixel's way sounds pretty good. All you would need is a private, and a global variable.

    Something like:

    global.picked is less than 2

    -on object card clicked add one to global.picked

    --object card set frame to turned

    global.picked is less than 2

    object card frame = turned

    object variable = club

    - object card destroy

    - set global.picked to 0

    Course you might want a loop if your doing all 52 cards.

    Also the function "call function after delay" would work nice here.

    The key is picking.

    Edit yeah dont use frames to compare use a pv.

  • Thanks for your help newt.But im so in the dark with all this new coding stuff.And im starting to confuse the codes with XNA lol.Please if someone could create a tutorial cap for a game like this then it would be wonderfull for oldskool newbs like me.

  • I just created a quick memory example from scratch. It's nothing to look at, just plain colored cards and it's also not commented. I'm using an Array object, HashTable object and the Function object. You probably should be familiar with those in order to understand this example (consult wiki).

    http://dl.dropbox.com/u/2306601/memory_004x2.cap

    The X/Y Size of the array defines the number of cards. Not too different from the puzzle tutorial I create the cards from that array. I randomize it so that there will be 2 of every possible card by using the hashtable (adding and deleting keys from it in a certain manner). You'll see there are different loops and some math with Globals involved which might look confusing on first sight. But it's nothing too complicated really.

    There may always be a better method to do this. At least this is a lot less of a hassle than the old version I did over a year ago. Anyway, I hope it's helpful to you.

  • Thank you very much for the demo cap.Finally i can create this game and keep the kids happy.

  • WOW this looks nice!

    Can you add pictures to the demo?

  • Ok just to make things very clear on how i want this game to behave.Here is the oldskool KNP card game.Just unzip the contents to a place on your hd.Note: The game works perfectly with Winxp but i haven't tested it yet on win7.The year the game was created was 1994 and still uses 256 colors.

    http://dl.dropbox.com/u/7658043/cardgame.zip

    This is just to show how i want to create the game with Construct , But with enhanced gfx.

    The array trick won't work because if you want to destroy the tiles then one tile will always show.

  • <img src="http://dl.dropbox.com/u/7658043/cardscira.jpg">

    http://dl.dropbox.com/u/7658043/cardsmem.exe

    Ok here is the demo with the images instead of the boxes.I will post the cap later.But i still want the cards to dissapear when i click on the right cards.

  • Well you can always change visibility, opacity, or use a dummy like your pic.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)