Dynamics based on memory!

A game dynamic is memory. Memory not intended as a game but as a dynamic that we encounter where elements must be remembered to proceed in the ...

A game dynamic is memory. Memory not intended as a game but as a dynamic that we encounter where elements must be remembered to proceed in the game! Games that remember the state of your progress and game progress are absolutely common. The memory as a dynamic is often underestimated in modern games, present in puzzle and educational games. The game dynamic memory can be extended to many game contexts that we will design together in the course. The use of data structures is essential in using the game dynamic memory. The simple structure for storing previous states is often the list or array also called vector. Follow the next tutorial for Construct to realize the use of the memory dynamic with an array or matrix. For the first thing create a new project and call it as you wish. 1. Set the Windows size to 640 x 480. 2. Set the layout size to 640 x 480. 3. Set the background color to your choice or add a background image. 4. Now add 2 levels and call them Cards and HUD. 5. Allows you to add sprites for cards and Front card, Front card Add the mouse and the rest is what you want. When we finish adding anything it should appear on your screen. For sprites, you can use them as long as you create two. An example like my sprites is the fruit. So I have 2 bananas, 2 cherries etc. For this tutorial, you will need 1 sprite for the front and 1 for the back, your sprite is similar to the following. Set the sprite size to 77 x 102. Optional: Find other card assets on the following sites that interest you or you like https://opengameart.org/art-search?keys=card. With these, we will create our animations by adding frames and calling the animation with names like Untap0, Untap1, Untap2 etc. First, create the apple sprite or whatever you have chosen. Something like below. This is the default animation. Do not rename it as I did. In the animation window, add a new animation and call it Untap0, so you can create a small animation and will also be used as an instance variable. Your animation should appear as follows. And the animation window appears as follows. Do above the animation 1 frame width to 11, compared to 32, 57, 71 and 77. Do not modify the height, keep it at 102. All the frames you made starting from Untap0, Untap1, Untap2, Untap3, Untap4, Untap5, Untap6, Untap7, Untap8. Now create these frames again, but in reverse order as follows. All the frames you made starting from tap0, tap1, tap2, tap3, tap4, tap5, tap6, tap7, tap8. Now create the Card-back that looks like this. For this, you will create the same type of animations as above. Ah, you've done enough, rest. The rest time is over, now it's time for code. Now for the front-face sprites, we will have to add some INSTANCE VARIABLES. Click on Add instance variable and add imageNumber as a number and destroy as a boolean. And for the other sprite, add just selected as a boolean. This is our work for the screen done. We have to add the code, so open the Event Editor and start writing. Your code will also have global variables and local variables. SUGGESTION: if you don't know how to create local variables, create the global first and drag it under where you want as a local variable. Bingo will be done automatically. Global variables remember uppercase and lowercase. cardsDestroed = 0. secondCard = 0. firstCard = 0. cardsTapped = 0. here we are in the real code that we will comment on together in the lesson.