GameMaker Tutorial - Make a Memory Match Card Game

Поділитися
Вставка
  • Опубліковано 8 жов 2024
  • Get Element Earth ▶ tinyurl.com/hga...
    Try Element Earth Demo ▶ tinyurl.com/hod...
    Support This Channel ▶ tinyurl.com/jet...
    Follow me on Facebook ▶ tinyurl.com/opj...
    Follow me on Instagram ▶ / jp_damstra
    Follow me on Twitter ▶ / slasherxgames
    Follow me on Google+ ▶ plus.google.co...
    ▼ More ▼
    General Game Maker Playlist ▶ tinyurl.com/omg...
    Game Maker Networking ▶ tinyurl.com/oau...
    We've all played a memory match card game at some point of our lives, whether it be to improve our memory or kill some time. In this video, I explain the very dynamics behind this cool idea.
    ▼ Useful Links and Resources ▼
    GameMaker Studio Project ▶ tinyurl.com/qg4...
    Happy Coding :D

КОМЕНТАРІ • 79

  • @bobafruti
    @bobafruti 9 років тому +1

    Thanks for the tutorial. I was making a memory game recently and it's very interesting to see your approach to the same problem.

  • @davidcortes4211
    @davidcortes4211 5 років тому +2

    Awesome tutorial man. I'm doing this on GMS2 and it works, thank you!

    • @CaseyKitchel
      @CaseyKitchel 4 роки тому

      What changes did you make to get it to work in GMS2?

  • @Hagnas3
    @Hagnas3 2 роки тому +3

    If anyone is wondering I fixed the problem in Game maker studio 2 where clicking the sprites does nothing. All you have to do is go to your obj_card and give it any sprite (doesn't matter what since we replace it dynamically anyways).

  • @UnreadySil
    @UnreadySil 5 років тому +1

    Thank you! You really helped me out I needed to make a memory match card game for a school project :P

    • @SlasherXGAMES
      @SlasherXGAMES  5 років тому

      Awesome. I'm glad it helped you out.

  • @yakmoon
    @yakmoon 9 років тому +3

    I've made this engine last year in a different way, and I got rid of it. because such games are very nostalgic nowadays and nobody want's to play them any more.
    thank you for sharing this tut, I've made a "match three" game as well (like crash candy) ,let's see if you can make that.
    I believe in your magic.

  • @julianoferreiradelima
    @julianoferreiradelima 9 років тому +1

    Very nice! Thanks for the tutorial =D

  • @M4rCO5x
    @M4rCO5x 8 років тому

    Nice tutorial there!
    I was wondering is there a way to shorten the amount of cards as I have a lot more than yours and I only want a few...
    Let me know!

  • @Bagas373
    @Bagas373 7 років тому +1

    Nice Tutorial. Mind if i ask some questions?
    1. I got a problem. When i started the game (playtest in other name). I can't flip my card. Instead backside of my card, I got the front side of it! And it can't be flipped! Any Solution?
    2. Is there a way to opening the dialog box if the player managed to flipped all cards?

  • @nextdoodle6103
    @nextdoodle6103 8 років тому

    Great tutorial, help me on my assignment to use game maker. However, I am required to add show score in the game. How to add the score and /or time to the memory game? I want to set the time to maybe 60secs and when the time is out, the game will end and display the score. The initial score is 0 and whenever the player matched the cards correctly, a score of 1 will be added. Then click on a button to move from the easy level to the difficult level.

  • @chelsealee6914
    @chelsealee6914 8 років тому

    This has been extremely helpful for me. So thanks for posting this video! I'm actually an artist, but I'm stuck doing some programming for a particular class project which involves a matching game. I have a question though, I'm having trouble figuring out how to get two different cards to match. We're trying to make a foreign language matching game, so matching a Spanish word card to an English word card. Any suggestions?

    • @SlasherXGAMES
      @SlasherXGAMES  8 років тому +1

      +Chelsea Lee, I tackle this very situation of matching associated yet unlike cards in my memory match revisited tutorial here: ua-cam.com/video/03ZgJD7WM3Y/v-deo.html

  • @rtkiiiprod
    @rtkiiiprod 9 років тому +1

    great tutorial. Thanks!

  • @zyyeolline3819
    @zyyeolline3819 8 років тому

    hi,thanks for the tutorial,this help me a lot with my final yr project :) anyway i'm very new to game maker. how can i make all the cards to flip and flash the answer for a while at the beginning before the game start?

    • @SlasherXGAMES
      @SlasherXGAMES  8 років тому

      +Zy Yeolline Please check out my memory match revisited tutorial here: ua-cam.com/video/03ZgJD7WM3Y/v-deo.html

  • @Robbiegod1
    @Robbiegod1 9 років тому

    how might you approach a memory card game where the matching cards are two different cards...like matching salt to a pepper card. Would that be vastly different?

  • @costapolidoros9743
    @costapolidoros9743 7 років тому

    I have 2 problems I can't solve. Firstly, when I left click the cards they don't flip. Secondly, instead of 12 cards the rows of cards goes on forever. Where have i gone wrong?

  • @sphinx856
    @sphinx856 8 років тому +1

    How I do that when I finished the game the room change to next? please help me.

  • @bloodsport9090
    @bloodsport9090 9 років тому

    hello i have a question. what music and sound effects program can i use for game maker studio.was is good for gamer maker studio?

  • @gienelleguinanao9060
    @gienelleguinanao9060 9 років тому

    hello sir, what if i want only 12 cards, 4 card to right and 3 cards to down. what code should i change??

  • @CaseyKitchel
    @CaseyKitchel 4 роки тому

    Great tutorial! I'm trying to make this in GMS2 and I go to run it I get some errors. I also noticed there are some differences between GMS2 and the older version in the tutorial. Any help would be fantastic.

    • @SlasherXGAMES
      @SlasherXGAMES  4 роки тому

      Hi Casey. No prob. What sort of errors are you having?

    • @CaseyKitchel
      @CaseyKitchel 4 роки тому

      @@SlasherXGAMES Sure thing. It appears the errors stem for this part of the code:
      var card = instance_create (xx,yy, obj_card);
      Simply "instance_create" does not register as a function. There are some similar functions that come up instance_create_depth and instance_create_layer.
      I just managed to get var card = instance_create_depth (xx,yy, 1, obj_card); to run, but nothing happens when I click the cards. I have the object obj_controller in an instance layer as that's the only layer type I have gotten to accept it.
      If I try var card = instance_create_layer (xx,yy, Instance_1, obj_card); this error pops up:
      FATAL ERROR in
      action number 1
      of Create Event
      for object obj_controller:
      Variable obj_controller.Instance_1(100021, -2147483648) not set
      before reading it.
      at gml_Object_obj_controller_Create_0 (line 33) -
      var card = instance_create_layer (xx,yy, Instance_1, obj_card);

  • @killbot234
    @killbot234 8 років тому

    im making a memory game atm making 3 different difficulties with a 26 (52) different cards to choose from at the hardest however i want to in a lesser card deck to 14 (28) cards however i get to the end and cant figure out what to change in the code so it has the correct amount of pairs instead of mismatched pairs what code should i change?

  • @carlharialisangco8594
    @carlharialisangco8594 4 роки тому

    Help, how to add countdown time? like when a specific time limit reached, the user will lose

    • @SlasherXGAMES
      @SlasherXGAMES  4 роки тому

      Check this tutorial out ua-cam.com/video/j0nCWJvoHDU/v-deo.html It's a bit older but still works.

  • @skyborne98a
    @skyborne98a 8 років тому

    Any ideas if this will work for Game Maker 7, the GameMaker Studio zip file is a gmx, and my version only opens GB1 files. Need to figure out a matching game for a Class. I don't mine writing the code, if there is no dependencies on a newer Version

    • @SlasherXGAMES
      @SlasherXGAMES  8 років тому

      There shouldn't be any dependencies to Studio. In this solution I use plain old arrays.

  • @CorruptedFlame13
    @CorruptedFlame13 8 років тому

    I have been getting this error code. could you helpFATAL ERROR in
    action number 1
    of Create Event
    for object obj_controller:COMPILATION ERROR in code action
    Error in code at line 29:
    for (var i = 0; i < width; i+=1)
    ^
    at position 13: Unexpected symbol in expression.and I have no idea why it is giving my that error code

  • @ingridtaylor9829
    @ingridtaylor9829 9 років тому

    This tutorial is really good but i seem to be getting a few errors with the code.
    I am using game maker 8.1 so i have changed the ++ variables to +=1 but for some reason there are still errors. are you able to help me?

    • @ingridtaylor9829
      @ingridtaylor9829 9 років тому

      when i try to play my game it comes up with this:
      ___________________________________________
      FATAL ERROR in
      action number 1
      of Create Event
      for object obj_controller:
      COMPILATION ERROR in code action
      Error in code at line 31:
      for(var j=0; j < height; j+=1)
      ^
      at position 15: Unexpected symbol in expression.

    • @yasmingrace571
      @yasmingrace571 9 років тому

      +ingrid taylor i know right i have the same prob!

    • @SlasherXGAMES
      @SlasherXGAMES  9 років тому

      +ingrid taylor A very strange situation. How about declaring j outside the for loop instead and then just setting it to 0 in the statement?

    • @ingridtaylor9829
      @ingridtaylor9829 9 років тому

      +SlasherXGAMES ™ Hi sorry. I'm not too familiar with this concept. Do you mind giving me an example?

    • @SlasherXGAMES
      @SlasherXGAMES  9 років тому

      +ingrid taylor Wait, never mind. That won't change anything. Are you sure you have that variable "height" set?

  • @MilanDragojevic
    @MilanDragojevic 8 років тому

    How to add another player?

  • @sitinadia9187
    @sitinadia9187 8 років тому

    hi.. i have an error anyone can help me?
    FATAL ERROR in
    action number 1
    of Create Event
    for object obj_controller:
    Variable obj_controller.found(100016, -2147483648) not set before reading it.
    at gml_Object_obj_controller_CreateEvent_1 (line 33) - while (found == false)

  • @gjgaming882
    @gjgaming882 9 років тому

    +SlasherXGAMES ™ oh man... all that work and only 3 cards appear on the screen.. help

    • @SlasherXGAMES
      @SlasherXGAMES  9 років тому

      GJ gaming Calm down bud, tell me a bit about what you've got going on and we can figure it all out in no time :)

    • @gjgaming882
      @gjgaming882 9 років тому

      SlasherXGAMES ™ I tried to copy what you did exactly, with two exceptions. I made it for months cards (educational purposes). so 12x 2 rather than 6x4 work out to the right number (making some parts more laborious). It wasn't drawing at all (oh 1 card back on the left) and I noticed others had problems with ++ notation here, so I tried changing everything to +=1 then it drew 3 cards on the left. I made my cards a little bigger 75long 45 wide. I can message or post the whole code if you think i should (its long though haha)

    • @SlasherXGAMES
      @SlasherXGAMES  9 років тому

      GJ gaming Which version of GameMaker are you using?

    • @gjgaming882
      @gjgaming882 9 років тому

      SlasherXGAMES ™ game maker studio 1.4 it was a free d/l

    • @gjgaming882
      @gjgaming882 9 років тому

      SlasherXGAMES ™ game maker studio 1.4 it was a free d/l

  • @heimymorales3232
    @heimymorales3232 9 років тому

    I did the sequence and did not work: '(
    Error in code at line 6:
    global.flipAttempts ++;

    • @SlasherXGAMES
      @SlasherXGAMES  9 років тому +1

      Heimy Morales Could you paste the entire error message :)

    • @heimymorales3232
      @heimymorales3232 9 років тому

      SlasherXGAMES ™ FATAL ERROR in
      action number 1
      of Mouse Event for Left Pressed
      for object obj_carta:
      COMPILATION ERROR in code action
      Error in code at line 6:
      global.flipAttempts++;
      ^
      at position 29: Assignment operator expected.
      I checked out and i did not see the problem

    • @heimymorales3232
      @heimymorales3232 9 років тому

      Heimy Morales I´m working... What´s the problem?? Help me, please...imageshack.com/a/img661/2356/ueVSDA.jpg

    • @SlasherXGAMES
      @SlasherXGAMES  9 років тому +1

      Heimy Morales You're using Game Maker 8. You'll need to use variableName += 1 wherever you see me use variableName++.I.e.
      Use global.flipAttempts += 1 instead of global.flipAttempts++; to increment the flips by one.

    • @heimymorales3232
      @heimymorales3232 9 років тому

      SlasherXGAMES ™ ok. Thank you very much. I will try.

  • @vandyfadrigon580
    @vandyfadrigon580 8 років тому

    hey i have an error in the create event for object obj_controller
    it says
    FATAL ERROR in
    action number 1
    of Create Event
    for object obj_controller:
    COMPILATION ERROR in code action
    Error in code at line 30:
    for(var i = 0; i < width; i++)
    ^
    at position 12: Unexpected symbol in expression.
    can somebody help me

    • @SlasherXGAMES
      @SlasherXGAMES  8 років тому

      +Cyrell Vandy Fadrigon, What version of GameMaker are you using? GM8 doesn't support i++ so you'll have to use i += 1 instead.

    • @vandyfadrigon580
      @vandyfadrigon580 8 років тому

      ahhh ok +SlasherXGAMES thank u

    • @vandyfadrigon580
      @vandyfadrigon580 8 років тому

      for(var i + 0; i

    • @vandyfadrigon580
      @vandyfadrigon580 8 років тому

      +SlasherXGAMES it says FATAL ERROR in
      action number 1
      of Create Event
      for object obj_controller:
      COMPILATION ERROR in code action
      Error in code at line 30:
      for(var i + 0; i

    • @SlasherXGAMES
      @SlasherXGAMES  8 років тому

      +Cyrell Vandy Fadrigon, Why do your have extra brackets within that for loop? for(var i + 0; i

  • @julialavagnini2313
    @julialavagnini2313 5 років тому

    which language of code is this game?

    • @SlasherXGAMES
      @SlasherXGAMES  5 років тому

      We use GML (GameMaker Scripting Language) in this tutorial.

  • @asdasdasdderp
    @asdasdasdderp 8 років тому +2

    You talk way too fast.

  • @nicked_1700
    @nicked_1700 8 років тому

    When my game starts it freezes anyone an idee why ?

    • @SlasherXGAMES
      @SlasherXGAMES  8 років тому

      +Nicked _, Memory leak maybe? Open task manager and watch its resource requirements as it starts.

    • @AshwinSKumar
      @AshwinSKumar 8 років тому

      How would you add pause menu, options menu, sound when a match is made, background image, score, final score and share to Facebook score option

  • @gjgaming882
    @gjgaming882 9 років тому +1

    thanks for posting, but alot of the time you are going too quick. its hard to follow. and don't explain things slowly and clearly. also this is a massive video. it would be better broken up into parts. if we follow along and make its like 2hours or so

    • @SlasherXGAMES
      @SlasherXGAMES  9 років тому +1

      GJ gaming Hi, sometimes it can be rather challenging to determine the right amount of time or depth to go into details in these tutorials. My audience consists of viewers of various backgrounds and skill levels. Try watching the video a few times or specifically the areas where you're a little confused on. You can even ask me questions if need be :)

    • @gjgaming882
      @gjgaming882 9 років тому

      SlasherXGAMES ™ Thanks a lot, will do. I am a newb if you hadn't guessed. Pretty much done now, just adding my own sprites. I have made a shooter and half a platformer and mistakenly thought memory would be simple haha

    • @gjgaming882
      @gjgaming882 9 років тому

      SlasherXGAMES ™ you have great sprites btw did you make them?

    • @gjgaming882
      @gjgaming882 9 років тому

      SlasherXGAMES ™ oh man... all that work and only 3 cards appear on the screen.. help

    • @SlasherXGAMES
      @SlasherXGAMES  9 років тому

      Yep, I make the sprites myself specifically for each video :)