Match 3 Deep Dive

39
Match 3 Deep Dive Kurt Bieg Tuesday, October 22, 13

Transcript of Match 3 Deep Dive

Page 1: Match 3 Deep Dive

Match 3 Deep DiveKurt Bieg

Tuesday, October 22, 13

Page 2: Match 3 Deep Dive

Tuesday, October 22, 13

Page 3: Match 3 Deep Dive

Tuesday, October 22, 13

Page 4: Match 3 Deep Dive

Tuesday, October 22, 13

Page 5: Match 3 Deep Dive

Tuesday, October 22, 13

Page 6: Match 3 Deep Dive

Tuesday, October 22, 13

Page 7: Match 3 Deep Dive

Tuesday, October 22, 13

Page 8: Match 3 Deep Dive

Tuesday, October 22, 13

Page 10: Match 3 Deep Dive

Art by Loren Bednar sheets.LorenBednar.com

Tuesday, October 22, 13

Page 11: Match 3 Deep Dive

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

Page 12: Match 3 Deep Dive

Recipe for a classic

• Single step mechanic

• Exponential agency loop

• Randomization

• Completion/order

Tuesday, October 22, 13

Page 13: Match 3 Deep Dive

Single Step Mechanic

Do one small thing and only one small thing

Tuesday, October 22, 13

Page 14: Match 3 Deep Dive

Tuesday, October 22, 13

Page 15: Match 3 Deep Dive

Tuesday, October 22, 13

Page 16: Match 3 Deep Dive

Exponential Agency

Repetition of simple choices build complex outcomes

Tuesday, October 22, 13

Page 17: Match 3 Deep Dive

Tuesday, October 22, 13

Page 18: Match 3 Deep Dive

Randomization

A set of objects presented in rule based randomization

Tuesday, October 22, 13

Page 19: Match 3 Deep Dive

Tuesday, October 22, 13

Page 20: Match 3 Deep Dive

Tuesday, October 22, 13

Page 21: Match 3 Deep Dive

Completion/Order

A final state the player is attempting to reach

Tuesday, October 22, 13

Page 22: Match 3 Deep Dive

Tuesday, October 22, 13

Page 23: Match 3 Deep Dive

Tuesday, October 22, 13

Page 24: Match 3 Deep Dive

Lua is all about tables

Tuesday, October 22, 13

Page 25: Match 3 Deep Dive

Tuesday, October 22, 13

Page 26: Match 3 Deep Dive

Grid Based Logic

• Make a grid

• Swapping

• Matching

• Repopulation/Randomize

Tuesday, October 22, 13

Page 27: Match 3 Deep Dive

Make a grid

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

Tuesday, October 22, 13

Page 28: Match 3 Deep Dive

block_Gp

Tuesday, October 22, 13

Page 29: Match 3 Deep Dive

block_Gp

j j j

j = number of columnTuesday, October 22, 13

Page 30: Match 3 Deep Dive

block_Gp

j j j

i

i

i

i

i

i

i

i

i

i = number of rowTuesday, October 22, 13

Page 31: Match 3 Deep Dive

block_Gp

1

2

3

4

5

6

7

8

9

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

Page 32: Match 3 Deep Dive

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

• Copy locations and info

• Swap

Swapping

Tuesday, October 22, 13

Page 33: Match 3 Deep Dive

block_Gp

1

2

3

4

5

6

7

8

9

TempBlocks

Tuesday, October 22, 13

Page 34: Match 3 Deep Dive

block_Gp

1

2

3

4

5

6

7

8

9

TempBlocks

Tuesday, October 22, 13

Page 35: Match 3 Deep Dive

Matching

• Check above, below, left, and right

• Ensure no illegal checking (crash)

• Skip non-essential checks

• Mark matched blocks

Tuesday, October 22, 13

Page 36: Match 3 Deep Dive

block_Gp

1

2

3

4

5

6

7

8

9

i x j = block numberTuesday, October 22, 13

Page 37: Match 3 Deep Dive

block_Gp

5

y-1

y+1

x -#rows

x +#rows

Tuesday, October 22, 13

Page 38: Match 3 Deep Dive

Skip non-essentials

Tuesday, October 22, 13

Page 39: Match 3 Deep Dive

Repopulation/Randomize

• Add physics

• Insert new blocks

• Drop them in

Tuesday, October 22, 13