Rexrainbow Board series tutorial #3 Chess remove, drop, and add row

2

Index

Attached Files

The following files have been attached to this tutorial:

.capx

Stats

6,012 visits, 11,895 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 29 Feb, 2016. Last updated 19 Feb, 2019

Chapter 3. Add Row

For a typical match-3 game, new random chess should be added while user removed chess from board. In this chapter we will realize this function.

Change to <Event sheet 1> and add following codes:

Event#20 defines a function named "add_row". In this event we use <GridMove> to force all chess to move up 1 grid first. And then create one row chess at the bottom (y = Board.BoardHeight - 1) with their animation set randomly.

Look at Event#19, when all the chess removal is done, we call "add_row" to insert one row at the bottom of the board, then call "loop" to match again.

Push <F4> to run layout, congratulations! Now your game can match, remove, dropdown, and add a new row. See how many events you've use? Only 21, that's great!

In next tutorial we will make a FSM (finite state machine) on top of those functions you've made ("match3", "matchL"...). And we will also finish this Poptile game and wrap things up.

Hope you'll like this tutorial. See you soon!

Part 4 is here.

.CAPX
  • 0 Comments

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