IDApixiTIK is a browser-based hacking/network simulator game built with ReScript and PixiJS. It combines platformer gameplay with realistic network simulation, featuring multiplayer co-op support via Elixir/Phoenix WebSocket server.
- Combat System: Guard encounters, dog handlers, drone surveillance, assassin AI
- Companion System: Moletaire (controllable mole character) with hunger mechanics
- Training Screens: 8 training scenarios including combat, stealth, and puzzle mechanics
- Network Simulation: Realistic device interaction, SSH, terminal commands, network topology
- Multiplayer: Real-time co-op via Phoenix Channels (WebSocket)
- ✅ Enhanced combat with body collision, knockdown mechanics, assassin dodge
- ✅ Companion system (Moletaire) with building navigation and hunger
- ✅ New training screens: Drone encounters, Highway crossing (Frogger-style)
- ✅ New devices: Firewall, PBX phone system, Coprocessor bridge
- ✅ Multiplayer infrastructure with Phoenix WebSocket channels
- ✅ SafeJson utility for safe JSON parsing
- ✅ Deno runtime support
- Deno - Runtime and package manager
- Elixir - For multiplayer sync server (optional for single-player)
Deno:
curl -fsSL https://deno.land/install.sh | shElixir (for multiplayer):
- macOS:
brew install elixir - Ubuntu/Debian:
sudo apt install elixir - See https://elixir-lang.org/install.html for other platforms
./start-game-only.shThis starts only the Vite dev server on port 8080. Open http://localhost:8080 in your browser.
./start-dev.shThis starts:
- Elixir sync server on port 4000
- Vite dev server on port 8080
Open http://localhost:8080 in your browser.
# ReScript compilation
deno task res:build # Compile ReScript once
deno task res:clean # Clean ReScript build artifacts
deno task res:dev # Watch mode (recompile on changes)
# Vite dev server
deno task dev:vite # Start Vite dev server only
deno task dev # ReScript watch + Vite (game only, no sync server)
# Production build
deno task build # ReScript compile + Vite production build
# Multiplayer sync server
deno task sync-server # Start Elixir sync server only
deno task dev:all # Start everything (sync server + game)IDApixiTIK/
├── src/
│ ├── Main.res # Entry point
│ ├── manifest.json # AssetPack generated (don't edit)
│ ├── app/
│ │ ├── combat/ # Combat system (guards, knockdown, hitboxes)
│ │ ├── companions/ # Moletaire AI and mechanics
│ │ ├── devices/ # Network devices (laptops, routers, firewalls)
│ │ ├── enemies/ # Guard, dog, drone, assassin AI
│ │ ├── multiplayer/ # Phoenix WebSocket client, VMNetwork
│ │ ├── narrative/ # Mission briefings, data files
│ │ ├── player/ # Player character (physics, input, graphics)
│ │ ├── popups/ # Modal overlays (settings, network view)
│ │ ├── proven/ # SafeJson and utility modules
│ │ ├── screens/ # Game screens
│ │ │ ├── training/ # 8 training scenarios
│ │ │ └── locations/ # Game locations
│ │ └── ui/ # UI components
│ ├── engine/ # Core game engine
│ │ ├── Engine.res # Main orchestrator
│ │ ├── navigation/ # Screen/popup management
│ │ ├── audio/ # BGM & SFX
│ │ └── resize/ # Responsive canvas
│ └── bindings/ # JavaScript FFI bindings (PixiJS, Motion)
├── sync-server/ # Elixir/Phoenix multiplayer server
│ ├── lib/ # Phoenix channels, game sessions
│ ├── config/ # Server configuration
│ └── mix.exs # Elixir dependencies
├── public/ # Static assets
├── raw-assets/ # Source assets (processed by AssetPack)
├── scripts/ # Build scripts
├── deno.json # Deno configuration and tasks
├── rescript.json # ReScript compiler configuration
├── vite.config.js # Vite build configuration
├── start-dev.sh # Launch script (game + multiplayer)
└── start-game-only.sh # Launch script (game only)
- ReScript - Primary language for game logic, compiles to
.res.mjsfiles - PixiJS 8 - 2D WebGL rendering engine
- Vite - Build tool and dev server
- Deno - Runtime and package manager
- Elixir/Phoenix - Multiplayer sync server (WebSocket channels)
- @pixi/sound - Audio (BGM/SFX)
- @pixi/ui - UI components
- motion - Tweening/animation library
- AssetPack - Asset pipeline (raw-assets/ → public/assets/)
Screen Navigation: Screens define lifecycle methods (prepare, show, hide, pause, resume, update, resize). Navigation.t manages a stack of screens/popups with asset preloading.
Device System: DeviceTypes.device interface with getInfo() and openGUI(). Factory pattern via DeviceFactory.res. Security levels: Open, Weak, Medium, Strong.
Network Topology: Star topology with central router. Features DNS resolution, traceroute, SSH between devices, zone-based layout (LAN, VLAN, External).
Multiplayer: Phoenix Channels over WebSocket. Pure ReScript client (PhoenixSocket.res) with reconnect, heartbeat, and multiplexing. VMNetwork handles cross-VM messaging.
State Management: Functional with immutable records; mutable fields only where necessary. LocalStorage for persistence via Storage.res.
The Elixir sync server provides:
- WebSocket-based Phoenix Channels for real-time multiplayer
- Game session management and registry
- Co-op event broadcasting
- VM network synchronization
- In-memory caching via ETS (no external dependencies)
Sync server configuration is in sync-server/config/:
config.exs- Base configurationdev.exs- Development settingsprod.exs- Production settings
Key environment variables:
SECRET_KEY_BASE- Phoenix secret key (auto-generated for dev)PHX_HOST- Hostname (default: localhost)PORT- Server port (default: 4000)
# Build the game
deno task build
# Output will be in dist/
# Serve dist/ with any static file server
# Build Elixir sync server release
cd sync-server
MIX_ENV=prod mix release
# Output will be in _build/prod/rel/deno task res:clean
deno task res:buildDelete node_modules and rebuild:
rm -rf node_modules
deno task res:build
deno task devCheck that the sync server is running on port 4000:
curl http://localhost:4000/healthShould return JSON with server status.
This version integrates features from the newer idaptik monorepo:
- Removed: Podman/container infrastructure, PWA support
- Added: Deno runtime, standalone Elixir sync server, new game features
- Updated: ReScript 11 → 12, improved vite config, health endpoint plugin
See LICENSE file for details.
Raw assets in raw-assets/ are processed by AssetPack into public/assets/ with manifest at src/manifest.json. Assets are loaded by bundle name.
- Files compile to
.res.mjsalongside source - Module namespaces pattern:
module ModuleName = { ... } - FFI bindings in
src/bindings/wrap external JS libraries - Use
@rescript/corefor standard library
After any changes:
- Run
deno task res:build- verify ReScript compilation - Run
deno task devor./start-game-only.sh- test in browser - Check console for errors
- Test new features according to handoff documentation
Originally created by Joshua B. Jewell, developed under hyperpolymath.