Mahjong Manse (Templates)

Discuss Scirra's 2D Asset Store

Post » Wed Oct 29, 2014 2:49 am



Mahjong Manse — Now for sale in the Scirra Store!
https://www.scirra.com/store/royalty-free-game-templates/mahjong-manse-419

Have you always wanted to create your own Mahjong themed game, or perhaps a Shanghai game (solitaire version of Mahjong)? Well, you can now do so with Mahjong Manse, a well thought out template with only 73 lines of code.

1. Mahjong Manse is a bare-bones template for a Shanghai style solitaire game, traditional Mahjong game or variant. Currently, Shanghai levels are designed on individual layouts; there are 4 example layouts provided in the template - ly_GameBoard1, ly_GameBoard2, ly_GameBoard3, and ly_GameBoard4. The game starts up using the first layout.

2. Each game board can have a maximum of up to 7 layers, and all 144 tiles of a Mahjong set are in use. Refer to the following Wikipedia entry to take a look at a complete set of Mahjong tiles: http://en.wikipedia.org/wiki/Mahjong_tiles

3. You design a game board by going to the Layer Bar and turning on/off Layers 1 to 7 in turn. The grid should be turned on (with X = 32 and Y = 40) to facilitate easy placement of tiles. You should place empty slots (spr_Slot) on the game board until you have placed 144 of them. You can easily debug the game and watch the array ar_TileCountPerLayer to see whether the sum of all entries in the array equals 144.

4. To obtain a 3D effect, you must adjust the Z-order of each slot (spr_Slot) manually. Alternatively, you could implement code to do this yourself - we suggest parsing the entire game grid from the upper right to bottom left corners.

IMPORTANT: Although gameplay is not implemented, you could easily implement it yourself by reading the comments and understanding how the template works. We recommend adding another instance variable to spr_Tile to indicate a tile has been chosen for matching.

For more information, download the template today... and see how to implement a Mahjong themed game, how to fool users into thinking your game is a 3D game, and look at the advanced techniques used in Mahjong Manse!



Use this topic to leave comments, ask questions and talk about Mahjong Manse
=========================================
If you are on Linkedin, join other C2 professionals and network on the Scirra Construct 2 Developer Group at https://www.linkedin.com/groups?home=&gid=6732005
B
47
S
11
G
6
Posts: 193
Reputation: 7,714

Return to Scirra Store

Who is online

Users browsing this forum: No registered users and 2 guests