Skip to content

Vermouth1995/MatchThreeGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Match Three Game

Build Status GitHub GitHub code size in bytes

An elimination game that drawed by Canvas and implemented using TypeScript.
The game play design and some of the resources are from Gardenscapes.

English | ็ฎ€ไฝ“ไธญๆ–‡

๐ŸŽฎ Game online

https://vermouth1995.github.io/MatchThreeGame/

โœจ Features

  • ๐ŸŽ€ Beautiful page, smooth game experience.
  • ๐ŸŒผ Written in TypeScript with predictable static types.
  • ๐Ÿ… Multiple rendering methods support capability.
  • โš™๏ธ Compile with gulp, full link development.
  • ๐Ÿ† Powerful level customization in every detail.
  • ๐Ÿคณ Support for mobile terminal.

๐Ÿ”จ Debug

  • run npm i
  • run npm run build
  • open html file(/dist/index.html) in browser

๐Ÿ’… Code Foramt

  • run npm run format

๐Ÿ”– Directory Structure

concept -- Basic tools (tool concept class content)

concept
โ”œโ”€ coordinate                         -- Coordinate and coordinate operation
   โ”œโ”€ event                           -- Record movement events
   โ”œโ”€ coordinate_adaptor              -- Coordinate adaptor
   โ”œโ”€ coordinate_dynamic              -- Dynamic coordinate
   โ”œโ”€ coordinate_value                -- Common coordinate
   โ”œโ”€ coordinate                      -- Coordinate interface
   โ””โ”€ locus                           -- Record the moving state and coordinate track
โ”œโ”€ linked_list                        -- Linked list
โ”œโ”€ listener                           -- Listening tools to manage listening events
โ”œโ”€ once                               -- Manages the invocation of a series of callback functions
โ”œโ”€ style                              -- Style classes, such as colors, fonts, and so on
โ””โ”€ random_weight                      -- Random access with weights

engine -- Game engine (core elements and concepts in game)

engine
โ”œโ”€ birth                              -- The generation of eliminable elements
โ”œโ”€ board                              -- Game board
โ”œโ”€ cell                               -- Game cell
โ”œโ”€ goal                               -- Game goal
โ”œโ”€ item                               -- Eliminated elements
โ”œโ”€ sacrifice                          -- Rule of elimination
โ”œโ”€ puzzle_keeper                      -- The object that holds the real rendering block
โ””โ”€ score                              -- Game steps/Score management

game -- Game logic (including score calculation, relationship between levels, etc.)

game
โ”œโ”€ game                               -- Instance of game logic
โ”œโ”€ level_creator                      -- Level generator
โ”œโ”€ level_data                         -- Level data interface
โ”œโ”€ level                              -- Level implementation
โ””โ”€ message                            -- Message

level -- Level (level content setting)

level
โ”œโ”€ 1                                  -- Level 1
โ”œโ”€ 2                                  -- Level 2
โ”œโ”€ 3                                  -- Level 3
โ””โ”€ ...                                -- Level ...

main -- Project entrance

main
โ”œโ”€ resource                           -- Game resources
โ””โ”€ index                              -- Entrance

platform -- Rendering platform

platform
โ”œโ”€ canvas                             -- canvas
โ””โ”€ webgl                              -- webgl

render -- Image rendering

render
โ”œโ”€ atom                               -- Minimum render unit
โ”œโ”€ puzzle                             -- Real rendering block
โ”œโ”€ render_adapter                     -- Render adapter
โ”œโ”€ render_locus                       -- Trace nodes of the rendering tree
โ”œโ”€ render_position                    -- Nodes of the rendering tree
โ””โ”€ render                             -- Render interface

๐Ÿšง TODO List

  • Rerender when window onResize
  • onTouch realization
  • Level selection
  • Style optimization
  • Automatic prompt
  • Bomb appearance weight can be set
  • Level of dwarf

๐Ÿ‘ฉโ€๐Ÿ’ป Maintainer

๐Ÿค Contributors

โฐ License

MIT ยฉ Vermouth1995