Use draw mode to create rooms. Use select mode to move and resize rooms.
+ ++ drag on the grid to create +
diff --git a/README.md b/README.md index f18bdbf..bc32a7b 100644 --- a/README.md +++ b/README.md @@ -1,54 +1,49 @@ # Pixel Forge -Pixel Forge is a browser-based dungeon level designer for game developers, RPG creators, and world-builders. You can create intricate dungeon layouts with a drag-and-drop interface, edit in real time, and export or import your work. - -It works well for tabletop RPGs, video game level design, and quick prototyping. The project is maintained by [Pixel Clover](https://github.com/pixelclover). +Pixel Forge is a browser-based dungeon designer for creating room layouts with doors and hallways. + +## Project Structure + +- `index.html` – app markup and script/style includes +- `styles/theme.css` – theme variables, focus states, accessibility helpers +- `styles/layout.css` – base layout and panel/grid structure +- `styles/components.css` – room/door/hallway/UI component styles +- `js/app.js` – main editor logic and event wiring +- `js/canvas.js` – PNG/SVG export helpers +- `js/tools.js` – install prompt + service worker registration helpers +- `js/state.js` – lightweight runtime metrics store +- `js/utils.js` – debounce, raf-throttle, download, and time utilities +- `js/storage.js` – localStorage key and JSON helpers +- `manifest.json` / `service-worker.js` – basic PWA support ## Features -### Core Design Tools - -- Draw rooms by clicking and dragging with snap-to-grid precision. -- Select and move any room by clicking and dragging it. -- Resize rooms using the white handle on each room. -- Add doors to connect rooms with interactive anchors. -- Create hallways between rooms with movable anchor points. - -### Customization - -- Dark and light theme with local storage persistence. -- Wall thickness and color controls. -- Individual colors for each room. -- Connection labels that show the distance between rooms. - -### Power Features - -- Undo and redo with full history using Ctrl+Z and Ctrl+Y. -- Export and import levels as JSON files. -- Mini-map for an overview of the entire dungeon. -- Context menu with right-click for quick actions. -- Keyboard shortcuts for a professional workflow. -- Room preview with instant info on hover. +- Draw/select/move/resize dungeon rooms +- Doors and hallways with draggable anchors +- Undo/redo history +- JSON export/import +- PNG and SVG export +- Auto-save every 30 seconds to localStorage +- Manual save/load of latest project snapshot with timestamp status +- Mini-map, zoom controls, and fit-to-view +- Keyboard shortcut help modal +- PWA manifest + offline cache via service worker -### Keyboard Shortcuts +## Accessibility -| Key | Action | -|-----|--------| -| `1` | Draw mode | -| `2` | Select mode | -| `3` | Door mode | -| `4` | Hallway mode | -| `Ctrl+Z` | Undo | -| `Ctrl+Y` | Redo | -| `Ctrl+D` | Duplicate room | -| `Delete` | Delete selected | -| `Right-click` | Context menu | +- ARIA labeling for interactive controls +- Live status updates for save and toast feedback +- Focus-visible outlines for keyboard users +- Keyboard access for workspace and mini-map -## Getting Started +## Responsive Breakpoints -### Quick Start +- `900px` compact layout +- `768px` tablet adjustments +- `480px` mobile button wrapping +- `320px` small phone fallback -Clone the repository: +## Development -```bash -git clone https://github.com/pixelclover/pixel-forge.git +This repository is static HTML/CSS/JS and does not currently include a test runner. +Open `index.html` in a browser (or serve the directory) to use Pixel Forge. diff --git a/icons/icon.svg b/icons/icon.svg new file mode 100644 index 0000000..54446ef --- /dev/null +++ b/icons/icon.svg @@ -0,0 +1,6 @@ + diff --git a/index.html b/index.html new file mode 100644 index 0000000..3555198 --- /dev/null +++ b/index.html @@ -0,0 +1,215 @@ + + +
+ + + + + + + + +Use draw mode to create rooms. Use select mode to move and resize rooms.
+ +Pixel Forge moved to index.html.
- \ No newline at end of file +