Commit graph

6 commits

Author SHA1 Message Date
Till JS
3925019344 feat(manavoxel): add local persistence and world templates
Local-First Persistence (Dexie.js):
- gameStore via @manacore/local-store: worlds, areas, items, inventories
- Guest seed data: demo village with street + 2-story house
- World loader bridge: converts between DB format and engine format
- Base64 encoding for pixel data (Dexie-compatible)
- Auto-loads first world on startup, supports ?world= URL param

World Templates + "New World" UI:
- 5 templates: Village, Dungeon, Arena, House, Empty
- Each template generates pre-built areas with pixel data
- /worlds route: browse own worlds, create new, delete
- New World dialog: name input + template selection grid
- Navigation: "Worlds" button in HUD links to world browser
- Game engine accepts world data from DB instead of hardcoded demo

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 14:07:46 +02:00
Till JS
d71eade816 feat(manavoxel): add item programming system (Phase 2)
Property Panel (Slider Ebene 1):
- Sliders for damage, range, speed, durability
- Element selector (fire, ice, poison, lightning, neutral)
- Rarity selector (common → legendary) with color coding
- Sound and particle effect dropdowns
- Auto-save on any change, opens via double-click on inventory item

Trigger-Action Editor (Ebene 2):
- WHEN [trigger] THEN [action] visual rule builder
- 10 triggers: onTouch, onUse, onTimer, onHpBelow, onNearItem, etc.
- 15 actions: damage, heal, particle, sound, pixel destroy, teleport,
  message, variable, event, camera shake, wait, etc.
- Per-action parameter inputs (amount, radius, text, etc.)
- Add/remove rules and actions, readable preview text
- Tab switching between Properties and Behaviors panels

Particle System:
- 7 presets: sparks, fire_burst, ice_shards, poison_cloud,
  lightning_bolt, heal_glow, shatter
- Physics-based (velocity, gravity, lifetime, alpha fade)
- Item use (Space key) spawns particles in facing direction
- High-damage items destroy pixels in facing direction (radius scaling)
- Cooldown system for item use

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 09:24:20 +02:00
Till JS
5f187705e2 feat(manavoxel): add inventory system with item creation from sprite editor
- Inventory class: 8 slots, hold/select, add/remove, rarity-based borders
- GameItem type with sprite data, properties, and rarity
- Inventory UI component with canvas-rendered item thumbnails (Svelte action)
- Rarity border colors (common→legendary), held item highlight
- Right-click to drop items, number keys 1-8 to select slots
- Sprite editor now creates GameItems and adds them to inventory
- Inventory bar always visible at bottom of screen

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 09:09:52 +02:00
Till JS
939bdbe45b feat(manavoxel): add in-game sprite editor for items and characters
- SpriteEditor component: 16x32 pixel canvas at 1cm resolution
- Tools: brush, eraser, flood fill, color picker (pipette)
- 24-color palette + custom color picker
- Mirror horizontal/vertical, clear all
- Undo/redo stack (30 levels)
- Pixel-perfect rendering with grid overlay
- Live preview at 2x scale
- Keyboard shortcuts (B/E/G/I, Ctrl+Z/Y)
- Integrated as modal overlay via "+ Item" button in editor mode
- Saves sprite data as RGBA Uint8Array

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 09:05:30 +02:00
Till JS
47a0692a4c feat(manavoxel): add portal system, interiors, and floor switching
- AreaManager: load/unload areas, portal detection, fade transitions,
  floor switching for multi-story interiors
- Demo street (10cm): cobblestone road, brick/wood buildings, trees, torches
- Demo interior (5cm): 2-floor house with table, fireplace, bed, windows
- TilemapRenderer: dynamic tileSize per resolution, clear(), setWorldSize()
- Game engine: E key for doors, F key for stairs, area name + floor in HUD
- Fade overlay for smooth area transitions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 09:03:00 +02:00
Till JS
5589765180 feat(manavoxel): scaffold 2D pixel platform MVP (Phase 0)
Add ManaVoxel — a 2D top-down pixel platform for creating and programming
miniature worlds in the browser. This commit includes:

- SvelteKit + PixiJS 8 web app with chunk-based tilemap renderer
- Game engine: camera (scroll/zoom), input (keyboard/mouse/touch), player with
  AABB collision, editor/play mode toggle
- Pixel editor tools: brush, eraser, flood fill, pipette, box fill, line
  (Bresenham), undo/redo stack
- Shared types package: materials, areas, items, network protocol, inventory
- Demo world generator with terrain, buildings, trees
- Material palette UI with 15 materials, keyboard shortcuts
- Comprehensive design documents (Roblox analysis, tech stack options,
  voxel resolution analysis, 2D alternative comparison, full project plan)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 08:57:08 +02:00