Match 3 Deep Dive

Post on 15-Feb-2017

1.868 views 1 download

Transcript of Match 3 Deep Dive

Match 3 Deep DiveKurt Bieg

Tuesday, October 22, 13

Tuesday, October 22, 13

Tuesday, October 22, 13

Tuesday, October 22, 13

Tuesday, October 22, 13

Tuesday, October 22, 13

Tuesday, October 22, 13

Tuesday, October 22, 13

kurt@simplemachine.co

Tuesday, October 22, 13

Art by Loren Bednar sheets.LorenBednar.com

Tuesday, October 22, 13

The next 2 hours of your life

• Chit chat about classic puzzles

• Learn some Corona SDK/Lua

• Daydream about grid based logic

• Code code code

Tuesday, October 22, 13

Recipe for a classic

• Single step mechanic

• Exponential agency loop

• Randomization

• Completion/order

Tuesday, October 22, 13

Single Step Mechanic

Do one small thing and only one small thing

Tuesday, October 22, 13

Tuesday, October 22, 13

Tuesday, October 22, 13

Exponential Agency

Repetition of simple choices build complex outcomes

Tuesday, October 22, 13

Tuesday, October 22, 13

Randomization

A set of objects presented in rule based randomization

Tuesday, October 22, 13

Tuesday, October 22, 13

Tuesday, October 22, 13

Completion/Order

A final state the player is attempting to reach

Tuesday, October 22, 13

Tuesday, October 22, 13

Tuesday, October 22, 13

Lua is all about tables

Tuesday, October 22, 13

Tuesday, October 22, 13

Grid Based Logic

• Make a grid

• Swapping

• Matching

• Repopulation/Randomize

Tuesday, October 22, 13

Make a grid

• Iterate through a number of columns and number of rows and insert an object at each point

Tuesday, October 22, 13

block_Gp

Tuesday, October 22, 13

block_Gp

j j j

j = number of columnTuesday, October 22, 13

block_Gp

j j j

i

i

i

i

i

i

i

i

i

i = number of rowTuesday, October 22, 13

block_Gp

1

2

3

4

5

6

7

8

9

((j-1) x number of rows) + i = block numberTuesday, October 22, 13

• When tapping on a tile, check the neighbor to see what it is

• Copy locations and info

• Swap

Swapping

Tuesday, October 22, 13

block_Gp

1

2

3

4

5

6

7

8

9

TempBlocks

Tuesday, October 22, 13

block_Gp

1

2

3

4

5

6

7

8

9

TempBlocks

Tuesday, October 22, 13

Matching

• Check above, below, left, and right

• Ensure no illegal checking (crash)

• Skip non-essential checks

• Mark matched blocks

Tuesday, October 22, 13

block_Gp

1

2

3

4

5

6

7

8

9

i x j = block numberTuesday, October 22, 13

block_Gp

5

y-1

y+1

x -#rows

x +#rows

Tuesday, October 22, 13

Skip non-essentials

Tuesday, October 22, 13

Repopulation/Randomize

• Add physics

• Insert new blocks

• Drop them in

Tuesday, October 22, 13