Commit graph

13 commits

Author SHA1 Message Date
Till JS
ec7c563283 fix: remove stale references to deleted packages (shared-auth-stores, shared-profile-ui, shared-app-onboarding)
- Dockerfile.sveltekit-base: remove COPY lines for 3 deleted packages
- CI workflow: remove shared-profile-ui from SHARED_WEB_PATTERN
- manavoxel package.json: remove shared-auth-stores dependency
- uload CLAUDE.md: update auth store reference to shared-auth-ui
- APP_ONBOARDING.md: update package path to shared-ui/onboarding

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 13:15:58 +02:00
Till JS
954923334f feat(manavoxel): clean up dead code, add portal keys, fix triggers, implement gold economy
Remove unused multiplayer protocol types, script/wasmBinary/capabilities fields,
and onNearItem trigger. Implement portal requiresKey gate, fix onDayNight and
onTouch triggers to fire for all inventory items, and add gold-based trading
economy with NPC kill rewards and merchant purchasing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 21:04:25 +02:00
Till JS
ad82a83f20 feat(manavoxel): add merchant trading UI and NPC loot drops
- Trade UI: merchant NPCs show 5 items (sword, wand, shard, herb, hammer)
  with stats preview, buy button adds item to inventory
- Loot system: defeated hostile/guard NPCs roll loot table drops
  (bone club, poison fang, dark crystal, iron shield, guard sword)
- Ground items: loot appears at NPC death position, pickup button
  when player is nearby
- Placeholder sprite generator for trade/loot items

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 15:06:51 +02:00
Till JS
45a17188e1 feat(manavoxel): complete game engine with behavior system, NPCs, lighting, and dialog
Major systems added to ManaVoxel:
- Behavior runtime: EventBus + 10 triggers + 11 action executors
- Item persistence: save/load items, inventory, area pixels to IndexedDB
- NPC system: 4 types (hostile/passive/merchant/guard), patrol/chase/attack AI
- Lighting: darkness overlay with emissive material light sources
- Day/night cycle: time-based ambient lighting on streets
- Sound system: 8 synthesized Web Audio API presets
- Sprite animation: multi-frame support in editor with play/stop
- Dialog system: NPC interaction with text bubbles and options
- Item properties: range, speed, durability, element all functional
- Health endpoint for Docker, durability bar in inventory UI

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 15:04:07 +02:00
Till JS
4ccbdbc9fe fix(manavoxel): improve demo world with full ground coverage and better spawn
- Fill entire area with grass (top-down needs ground everywhere, no AIR gaps)
- Add cobblestone road with stone edges
- Add dirt paths, sand area, market stalls, flower patches
- 10 trees with trunk + leaf canopy scattered around
- 3 distinct buildings: brick house, wood cabin, stone tower
- Well with water in village center
- Torches along road edges
- Player spawns at center of road (200, 150) for better first impression
- Camera default zoom reduced to 1.5x (was 2x) to show more of the village
- Min zoom out to 0.3x for full overview
- New seed ID (guest-world-002) to regenerate for existing users

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 15:14:32 +02:00
Till JS
13cbdf027b fix(manavoxel): rename inventory.ts to .svelte.ts for $state runes support
$state() is Svelte 5 runes syntax that only works in .svelte or .svelte.ts
files. The Inventory class used $state for reactive slots/heldSlot which
caused "ReferenceError: $state is not defined" in production builds.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 15:08:59 +02:00
Till JS
35ec9aeb2e deploy(manavoxel): add Dockerfile, docker-compose, and deploy config
- Dockerfile: two-stage build on sveltekit-base, port 5028
- docker-compose.macmini.yml: manavoxel-web service on port 5028
- Root package.json: dev:manavoxel:web and dev:manavoxel:full scripts
- Fix Tailwind CSS import (shared-tailwind/themes.css)
- Port changed from 5195 to 5028 (consistent dev/prod)

Deploy with: ./scripts/mac-mini/build-app.sh manavoxel-web

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 14:56:32 +02:00
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