Quick Start
Creating a New Project (CLI)
The easiest way to get started with Dill Pixel is to use the CLI to create a new project. Run the following command in your terminal:
This will create a new directory called my-application
with all the necessary files and dependencies pre-configured.
Using PNPM (Recommended)
Manual Installation
If you prefer to set up your project manually, you can install the framework directly:
“Hello World” Example
Project Structure
When you create a new project using the CLI, it will generate the following file structure:
- package.json
- tsconfig.json
- vite.config.mjs
- index.html
- .assetpack.mjs
- .eslintrc.json
- .prettierrc.json
- .nvmrc
Directorysrc
- index.ts
- index.css
- bootstrap.ts
- MyApplication.ts
- dill-pixel.config.ts
- Splash.ts
Directoryscenes
- BaseScene.ts
- StartScene.ts
Directoryutils
- Constants.ts
Directoryassets
Directoryaudio{m}
Directorymusic
- Game_Over.ogg
Directorysfx
- click.ogg
- hover.ogg
Directoryrequired{m}
Directoryui{tps}
Directorybtn
- blue.png
- green.png
Directoryjoystick
- base.png
- handle.png
Directoryspine{m}
- spineboy-pro.png
- spineboy-pro.atlas
- spineboy-pro.skel
Key Files and Directories
src/MyApplication.ts
: Main application class extending from Dill Pixel’s Applicationsrc/bootstrap.ts
: Initializes the game and handles core setupsrc/dill-pixel.config.ts
: Core game configuration including actions, controls, and data managementsrc/Splash.ts
: Default loading screen implementationsrc/scenes/
: Contains all game scenesBaseScene.ts
: Base scene class with shared functionalityStartScene.ts
: Initial game scene with “Hello Dill Pixel” example
src/utils/Constants.ts
: Shared constants like fonts and colors.assetpack.mjs
: Asset processing configuration.eslintrc.json
: Code linting rules.prettierrc.json
: Code formatting rules