“Mahjong solitaire” Documentation by “sney2002” v1.0
“Mahjong solitaire”
Thank you for purchasing my game. If you have any questions, please feel free to contact me here.
Table of Contents
- Getting Started
- Available options
- Creating maps
- Creating a tile set
- Events
- JavaScript
- Sources and Credits
Features - top
- Works on IPAD!!!!!
- Works on all modern browsers
- Undo movements
- Create your own maps
- Easy to install
- Great support
A) Getting started - top
To install the game just upload the files to the server. you can select one of the four default maps: space
, heart
, default
or pyramid
. or create your own map.
there are also three set of tiles: flowers
, letters
and symbols
.
B) Available options - top
Below is an example with all available options and their defaults values:
C) Creating a tile set - top
To create your own set of tiles follow the measures of the template in templates/photoshop
:
I know what you think, I suck at photoshop. Then creates a sprite of 36 tiles, like this:
D) Creating maps - top
You can create your own maps, just remember:
- The game board is 12 tiles width by 8 height
- Separate each layer with a
#
character
- Don't put tiles on the "air" (it looks weird)
- The number of tiles must be even
- Save your map with txt extension under the directory
maps/
Examples
Right
Wrong
E) Events - top
There are three events you can subscribe:
- shuffle: when the user shuffle the tiles.
- gameover: game over: when.
- finish: when the game is finished, you receive the time needed to complete the game.
To subscribe an event you use the method on
.
F) JavaScript - top
This game imports three Javascript files.
- canvas-event-js: javascript library that add events to the canvas element.
- jquery: used for ajax and events.
- mahjong: The mahjong game.
To initialize the app create an instance of game.Mahjong()
* after the DOM is ready. you can customise the instance through the options.
*Use jQuery.ready
G) Sources and Credits - top
I've used the following code:
Jhonatan Salguero
Go To Table of Contents