Chromattis is a simple, fun, and challenging puzzle game by Andre Stackhouse. Do you have the brains to solve it?
This project was bootstrapped with Create React App and Redux. Hosting done via GitHub Pages.
-
Chromattis is played by tapping or clicking
Tiles
on the gameBoard
. -
Each
Tile
has aColor
(also represented as a number). -
Tapping or clicking a
Tile
changes theColor
of one or moreTiles
on theBoard
. -
The goal of the game is to solve the puzzle by getting every
Tile
to share the sameColor
. -
It is not possible to lose, but solving the puzzle in fewer moves is considered a higher score.
Chromattis is a new kind of puzzle and can be counterintuitive to solve. While clicking Tiles
randomly can help you get an intuitive feeling for how the game works, success comes from observing how different moves effect different Tiles
and recognizing patterns.
-
Tiles
cycle throughColors
in a consistent cycle which matches their numeric values. 0 =Red
, 1 =Orange
, 2 =Yellow
, 3 =Green
, 4 =Blue
, 5 =White
. -
A
Tile
only ever advances by one color at a time. -
You can move
Tiles
backwards through theColor
cycle by right-clicking. -
You can cancel a move by long-pressing or letting go of a click outside of the clicked/tapped
Tile
. -
Start by trying to get certain parts of the
Board
, for instance the corners or the edges to the sameColor
. -
Try to eliminate the number of
Colors
on theBoard
down to just two. -
See if you can get those two
Colors
to be "three apart" in theColor
cycle described in Hint #1 (e.g.Red
&Green
orYellow
&White
). Since there exactly six Colors in the cycle these can be considered inverted values. -
Try clicking on the same
Tile
in bursts of 3 to "invert" that set's colors.
Chromattis comes with a built in command line interface which can be used from the browser developer tools (often accessed with F12 or Ctrl + i). Look for a "Console" tab. The CLI is made up of JavaScript functions loaded in index.html
and therefore can be run directly from the console. Because they are JavaScript functions, all commands must be entered with open and close parenthesis ()
. Some functions take a parameter.
Below is a list of all available commands:
help()
- displays all CLI commands.
show_board()
- Prints the current state of the game board to the console.
shuffle()
- Resets the board by shuffling, also sets movecount back to 0.
press(index)
- Takes an integer corresponding to a Tile on the board. Triggers a press of that tile.
reverse(index)
- Takes an integer corresponding to a Tile on the board. Triggers a reverse-press of that tile.
preview(index)
- Takes an integer corresponding to a Tile on the board and prints all the tiles that pressing it would impact.
undo()
- Undoes the last move taken - cannot be used twice in a row.
next_level()
- Navigates the game to the next level if unlocked.
previous_level()
- Navigates the game to the previous level.
goto_level(index)
- Takes a level index and navigates the game to it.
install()
- Installs Chromattis to your device. Requires Progressive Web Application (PWA) support.
Chromattis is an open source project under the permissive MIT license. Those interested should feel empowered and encouraged to clone or fork the repository, experiment with changes, and to send in pull requests (see the Contributing to Chromattis section for more information).
In order to run a development build of Chromattis you will have to have nodejs
and npm
installed.
Installing git
is also recommended in order to clone the repository, track changes, and send in pull requests.
git clone https://github.com/CaptainStack/chromattis.git
cd chromattis
npm install
To run Chromattis locally type the following command from the root directory.
$ ./chromattis> npm run start
The game should now be accessible and playable in a web browser. If the game does not start automatically open a a browser and go to https://localhost/chromattis:3000
.
Chromattis is a single page application (SPA) that runs entirely client-side within a web browser. It may be installed locally as a progressive web application (PWA).
ReactJS
handles UI components and rendering.Redux
is used to manage all application state and state changes.CSS
with no additional frameworks or libraries is used to manage all styling.localstorage
is to store player progress persistently between sessions.
/
- the root directory contains config files as well as the project's readme and license. For project dependencies seepackage.json
./src
- Location of most development files including React components, Redux reducers, CSS styles, and event handlers./public
- Store static assets here including the main application containerindex.html
./build
- Generated by build process, files should not be modified by developer./src/components
- location for all React componentssrc/styles
- contains all additional CSS styles.
index.html
- the main application container that the React app loads into.index.js
- the JavaScript file which binds the React app to index.html.actions.js
- The file which contains all JavaScript actions fired from event handlers or reducers.events.js
- The file which contains all UI event listeners.reducer.js
- The file which specifies all operations which modify the Redux state. All state management must be done via reducers defined in this file.sw.js
- The service worker which handles application caching.app.webmanifest
- the file which specifies metadata necessary to install Chromattis as a PWA.
Deployment is handled by the gh-pages
package which specifies a deployment script in package.json
. In order for the deployemnt to work, you will need to set up your GitHub repository to deploy via GitHub Pages
. The branch which should be deployed should be called gh-pages
.
The deployment script is:
npm run deploy
IMPORTANT - this deployment script will deploy your application as it currently stands on your local setup, it does not deploy from your main branch on GitHub. Always deploy from a clean branch instead of a working branch.
Chromattis has been to date the project of a single developer. As such, there is no currently defined contribution process other than to send a pull request.
However, before investing significant development time with hopes that your changes will be merged into the project, please consult with our issues tracker and milestones to get a sense of what is being worked on and what the project's priorities are.
If you spot an issue you'd like to take on consider contacting the developer first to set expectations and create a plan of action.
Currently Chromattis makes no reveneue and there is no plan to incorporate paid contributors to the project.