A browser based tile editor for Sega Master System and Sega Game Gear.
- Tile editor.
- Colour palette editor.
- Import palettes and tiles directly from Sega Master System and Sega Game Gear compatible WLA-DX assembly code.
- Export tiles and palettes to Sega Master System and Sega Game Gear compatible WLA-DX assembly code.
- Supports multiple colour palettes with colour picker to customise colours.
- Supports saving and loading of project files in simple JSON format.
- Project data is saved locally within browser local storage.
- Runs completely within a modern web browser, no tool installation required or cloud dependencies.
- Written in pure ES6.
If you have your own server then there are no dependencies, all required files are included in the /wwwroot directory or loaded via CDN.
To use the Configuration for a local Node.js Express based server the following is required:
A design goal of this project is that the raw source files may be run from within a browser without any compilation steps required.
- Copy the files from
/wwwrootto your own server. - Open
index.html.
- Run the following from a terminal from the project root folder:
node app.js - Browse to http://localhost:8080/index.html.
For this you will require OpenSSL to be installed.
- Navigate to the project root folder in a terminal window.
- Run the command '
openssl req -nodes -new -x509 -keyout cert/server.key -out cert/server.cert' to create the certificate.- Make sure you set the common name to '
localhost'.
- Make sure you set the common name to '
- The files '
cert/server.keyandcert/server.certwill be created, theapp.jsfile will detect these files and automatically create a HTTPS server for you next time that you run it.
You could run: python -m httpserver
While the goal of the project is to produce a code base that may be run from any browser without a compilation step, when deploying to a production environment it may be desirable to bundle and minify the files in order to reduce network request and transfer.
The bundled and minified output can still be served without a server-side scripting requirement.
A Webpack config file is supplied which will build a bundled and minified version of this project into the dist directory.
To deploy to Azure Storage Account container run the deploy-to-azure-storage.js file.
Note: Before you deploy to Azurre Storage Accounts, please run Webpack to create the files for the dist directory.
node ./deploy-to-azure-storage.js
For the file to work you will need to define the following environment variables:
| Variable | Description |
|---|---|
AZURE_STORAGE_CONNECTION_STRING |
Connection string to use to connect to the Azure storage account. |
AZURE_STORAGE_CONTAINER_NAME |
Name of the container that you wish to deploy the files. Note: All existing files will be deleted. |
If you wish to use multiple environments, you can use the --env parameter to pass in an environment name.
For example to dploy to a dev environment:
- Append
_devto the above environment variables (AZURE_STORAGE_CONNECTION_STRING_devandAZURE_STORAGE_CONTAINER_NAME_dev) with the appropriate values for the dev environment. - Run:
node ./deploy-to-azure-storage.js --env dev.
Note: Before you deploy to Azurre Storage Accounts, please run Webpack to create the files for the dist directory.
- Run
docker build . -t smsgfx - Run
docker run -p8080:80 smsgfx - Go to https://localhost:8080
| Key | Function |
|---|---|
| Ctrl + Shift + S | Save project to a JSON file. |
| Ctrl + Shift + O | Open a project JSON file. |
| Ctrl + Shift + E | Export project to assembly. |
| Ctrl + Shift + N | Create a new blank project. |
| Key | Function |
|---|---|
| Ctrl + X | Cut selected tile. |
| Ctrl + C | Copy selected tile. |
| Ctrl + V | Paste tile or import image from clipboard. |
| Ctrl + D | Clone / duplicate selected tile. |
| Ctrl + Z | Undo last change. |
| Ctrl + Y | Redo last change. |
| F or B | Change to fill / bucket tool. |
| S | Change to select tool. |
| P | Change to pencil tool. |
| I | Change to colour select tool. |
| Alt + plus (+) | Increase image scale / zoom. |
| Alt + minus (-) | Decrease image scale / zoom. |
| Ctrl + 1 - 5 | Set pencil size. | | Ctrl + left click | While the pencil tool is selected this will change to the current colour that the mouse is hovering over. |
| Key | Function |
|---|---|
| Ctrl + Alt + P | Add palette. |
| Ctrl + Up arrow | Move up one palette. |
| Ctrl + Down arrow | Move down one palette. |
| Ctrl + Left arrow | Select lower palette colour. |
| Ctrl + Right arrow | Select higher palette colour. |
| Key | Function |
|---|---|
| Ctrl + Alt + E | Add tile. |
| Delete | Delete the selected tile. |
| Up arrow | Select tile directly above. |
| Down arrow | Select tile directly below. |
| Left arrow | Select tile directly left. |
| Right arrow | Select tile directly right. |
| Ctrl + [ | Mirror selected tile horizontally. |
| Ctrl + ] | Mirror selected tile vertically. |
| Ctrl + Left arrow | Move the selected tile to the left. |
| Ctrl + Right arrow | Move the selected tile to the right. |
| Ctrl + Up arrow | Move the selected tile to the row above. |
| Ctrl + Down arrow | Move the selected tile to the row below. |
Event dispatcher class is based off: