Thursday, May 6, 2021

The Essentials

 The essential procedure for using match3 to play

puzzles starts with the puzzle image. Everything works out for 

a square image of 256 x 256 pixels that will become 8 x 8

tiles of sides 32. One places the image in the graphics file

and labels it match3.png.


From there, the utilities file will be altered to make quads

for our now perfect square, and return the tiles file.

Dependencies is an extension of main






StartState and Playstate use the tiles file separately. I am 

currently running a choose puzzle image in StartState, but one can

run the actual puzzle image for just one. And I have commented out

all the game stuff. (The knife Timer is essential for moving tiles).


From StartState:



The tiles actually get messed up in the Tile class. Here, the perfect

image gets shuffled, ensuring we get one and just one of everything.

Board has to feed in that perfect image beforehand.




main.lua loads everything. I am currently using one song and no sounds.

I am also showing a 200 x 200 image of the puzzle, which I have distorted

with Windows10 photos.


From main:


From Dependencies:



So, I am mulling how to switch between puzzles. And will be looking into how

Mario is organized for inspiration.

No comments: