Creating a Memory Match Game

Index

Stats

14,804 visits, 39,387 views

Translations

This tutorial hasn't been translated.

Tools

Part 2: Laying out the Cards

Video Part 2a

Subscribe to Construct videos now

(If you don't see the video, follow this link to view Part 2a.)

Cheat Sheet for Part 2a

If you don't trust your ability to type in the more complicated expressions, you can copy them from here:

gCardHeight

        int((WindowHeight-((gNumberRows + 1)*gSpaceBetweenCards))/gNumberRows)


gCardWidth

int(gCardHeight * (Card.Width/Card.Height))

gMarginLeft

    int((WindowWidth - (gCardWidth + gSpaceBetweenCards) * gNumberColumns) / 2)


gMarginTop

    int((WindowHeight-(gCardHeight + gSpaceBetweenCards)*gNumberRows)/2)



Video Part 2b

Subscribe to Construct videos now

(If you don't see the video, follow this link to view Part 2b.)

Cheat Sheet for Part 2b

If you don't trust your ability to type in the more complicated expressions, you can copy them from here:

CurrentColumn

    CurrentTableauCard%NumberColumns

X (Create Card)

    gMarginLeft + (CurrentColumn*(gCardWidth + gSpaceBetweenCards))

Y (Create Card)

    gMarginTop + (CurrentRow*(gCardHeight + gSpaceBetweenCards))



  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!