ℹ️ For Yop2D Next, the new 2D + 3D version of Yop2D (coming soon). Button and node names are those of Yop2D Next.
🔍 How do I…? All short recipes, with a search
Yop2D Next has ready-made nodes for puzzle games, card games and strategy games. The names in bold are the ones you see on the screen.
👉 A word you don't understand? See The words of Yop2D.
How do I make a match-3 game (like Candy Crush)?
- Place an object to be the board (a Square for example), and a few model objects: the pieces (at least 3, one per color), outside the screen.
- On Start → Fill the grid: Object = the board, the number of columns and rows, and the names of the pieces separated by commas. There is never a match at the start.
- Finger held down → Play on the grid (match 3) (Object = the board). The player swaps two neighbor pieces; matched pieces disappear, the others fall down.
- One exit fires for each matched piece (to add points), another one when the move is finished (to count moves). A “Shuffle” button: Shuffle the grid.
👉 To see a complete game: Home → Example games → “Candy match”.
How do I make a memory game (find the pairs)?
- Each card = an image (its face) with the tag “carte”. Put an image of its back on top, with the tag “dos”, and choose the card as its Parent Object (Inspector, For the nodes (tag, parent) part).
- On Start → Shuffle places on “# carte”: the cards change places, their backs follow them.
- On Object Click on “# dos” → Visibility (the involved object, no): the card turns over. Then variables remember the first card to compare it with the second one.
- The easiest way: open the ready-made example Home → Example games → “Memory cards” and look at its Blueprint.
How do I make a card game (poker, drawing cards, choosing cards)?
- Each card = an image with the deck tag (“paquet”). Give it its value (2 to 14, the Ace is 14) and its suit (one number per suit) with Change a statistic.
- Draw cards fills the player's hand up to the number you want and lines the cards up in a row.
- Arrange the cards puts the hand back in order; the chosen cards (tag “choisie”) are raised a little.
- Card combination (poker) looks at the chosen cards and leaves by the right exit: pair, three of a kind, straight, flush, full house…
- Complete example: Example games → “Aces and Jokers”.
How do I make a “connect the dots” game?
- Place an object to be the grid (a Square), and dots on it: Circle shapes with the tag “point”. Two dots of the same color make a pair.
- Finger held down → Connect the dots: Object = the grid, the number of columns and rows.
- The player pulls a wire from a dot to its twin, square by square. One exit fires for each connected pair, another when everything is connected (next level!).
👉 Complete example: Example games → “Connect the Dots”.
How do I roll a die?
- Create a variable “dice” (New variable).
- A “Roll” button: On Object Click → Modify Variable “dice” =
=random(1, 6): a number from 1 to 6, 6 included. - Modify Text =
=diceto show the result. - To move a pawn by that number of squares: Repeat (number of times
=dice) → each time → Move the piece one cell.
👉 A ready-made template: Home → How do I make it? → “If / Else: roll a die”.
How do I make a turn-based game (strategy)?
- Place a Tile decor (the map) and your units: tag “joueur” for yours, “ennemi” for the others.
- On Start → Give a unit sheet for each unit (life, attack, movement…), then Go to the next turn (teams “joueur,ennemi”).
- Tapping a unit: If it is the turn of… “joueur” → Select the object → Show reachable cells.
- Tapping the map: If the cell is reachable → Go to the cell (path). Then Attack, Mark as having played, and Go to the next turn.
- At the start of each turn, the Local Event “tour_joueur” or “tour_ennemi” fires on its own: that is where you make each team play.
👉 All these nodes are in the Turn-based (strategy) category. Step-by-step example: Example games → “Tactics tutorial”.
How do I make the computer play in a turn-based game?
- In the Local Event “tour_ennemi”: Play like a computer (AI) on the enemy unit, with the tags of the enemies to aim at (“joueur”).
- The unit picks the best square by itself and goes there. Choose its style: aggressive, careful or defensive.
- When it has arrived, the chosen target becomes the involved object: connect Attack (the unit attacks the involved object), then Go to the next turn.
- The unit needs a sheet (Give a unit sheet): the computer uses its movement and its range.
How do I make a fog of war?
- Update the fog of war: the squares your team can't see become dark, and hidden enemies disappear.
- Write the tag of your team (“joueur”) and the tag of the enemies to hide (“ennemi”). Each unit sees 3 squares around it (you can change it).
- Run this node again at the start of each turn and after each move.
- Remove the fog of war shows the whole map (at the end of the game, for example).
How do I give stats to units (attack, defense, ammo)?
- Give a unit sheet (under On Start): life, attack, defense, movement and range. You can read them anywhere, for example
=archer.attaque. - A stat of your own (ammo, mana, armor…): Change a statistic adds to it, removes from it or sets it. It is created on its own.
- To test it: If the statistic… (for example “ammo greater than 0” before shooting).
- Attack uses these sheets by itself: damage = the attacker's attack minus the target's defense.
How do I make hexagon or isometric (diamond) tiles?
- With a Tile decor: tap it, then in the Inspector Configure Tiles → Cell shape: Squares, Hexagons (flat top), Hexagons (pointy top) or Diamonds (isometric view).
- Without a tile decor: On Start → Grid shape (hexagons, isometric), and place the images of your squares yourself.
- Then all the grid nodes follow the chosen shape: Show reachable cells, Go to the cell (path), Move the piece one cell, Place on a cell (column, row)…
👉 Can't find a node? In the Blueprint, look at the Puzzles and cards and Turn-based (strategy) categories, or read My game doesn't work.