How mdc15/s-olo-gameengine works
S:OLO is a browser-based 2D game engine with a React/WebGPU editor and a Rust simulation host. The principal workflow is editing a project and its entities, then running or building the game: the host simulates ECS state, sends updates over WebSockets, and the client interpolates and renders them. The graph also preserves documented physics, animation, scripting, asset, and IDE capabilities. Some subsystem wiring is based on README statements; unsampled implementation details are not assumed.
Main entry points: main.rs Rust host · App.tsx Editor shell · ws_handler.rs WebSocket handler · ws-client.ts WebSocket client
Components 27
Editor and authoring
- Editor shell
solo-client/src/App.tsx - Project launcher
solo-client/src/components/editor/ProjectLauncher.tsx - Scene authoring
solo-client/src/components/editor/HierarchyPanel.tsx - Entity inspector
solo-client/src/components/editor/InspectorPanel.tsx - Animation editor
solo-client/src/components/editor/AnimationEditorModal.tsx - Asset browser
solo-client/src/components/editor/AssetBrowser.tsx - Script IDE
solo-client/src/components/editor/CodePanel.tsx
Client state and transport
- Editor state
solo-client/src/store/editor-store.ts - Client singletons
solo-client/src/singletons.ts - WebSocket client
solo-client/src/network/ws-client.ts - Frame parser
solo-client/src/network/binary-parser.ts - Interpolated world
solo-client/src/ecs/world.ts
Rendering
- Game viewport
solo-client/src/components/editor/ViewportPanel.tsx - 2D camera
solo-client/src/renderer/camera.ts - WebGPU context
solo-client/src/renderer/gpu.ts - Sprite pipeline
solo-client/src/renderer/sprite-pipeline.ts
Host simulation
- ECS world
solo-host/src/ecs/world.rs - Physics system
solo-host/src/systems/physics.rs - Animation system
solo-host/src/systems/animation.rs - Script system
solo-host/src/systems/script.rs - Simulation camera
solo-host/src/simulation_camera.rs
Host services
- Rust host
solo-host/src/main.rs - WebSocket handler
solo-host/src/server/ws_handler.rs - Language service
solo-host/src/lsp/mod.rs - Texture import
solo-host/src/texture_import.rs - Project assets
solo-host/src/server/app_state.rs
Other components
- Developer
Connections 30
- Developer → Editor shell: uses
solo-client/src/App.tsx - Editor shell → Project launcher: shows
solo-client/src/App.tsx - Editor shell → Editor state: updates
solo-client/src/App.tsx - Editor shell → Client singletons: handles messages
solo-client/src/App.tsx - Editor shell → Game viewport: mounts editor
solo-client/src/App.tsx - Developer → Scene authoring: authors scene
README.md - Developer → Entity inspector: edits entities
README.md - Developer → Animation editor: edits clips
README.md - Developer → Asset browser: manages assets
README.md - Developer → Script IDE: writes scripts
README.md - Game viewport → Client singletons: uses client state
- Client singletons → WebSocket client: connects
solo-client/src/singletons.ts - WebSocket client → Frame parser: parses frames
solo-client/src/network/ws-client.ts - WebSocket client → Interpolated world: delivers frames
- Interpolated world → Sprite pipeline: supplies render states
solo-client/src/main.ts - Game viewport → Sprite pipeline: renders
README.md - Sprite pipeline → WebGPU context: uses device
solo-client/src/renderer/sprite-pipeline.ts - Sprite pipeline → 2D camera: uses camera
solo-client/src/renderer/sprite-pipeline.ts - Rust host → WebSocket handler: routes WebSocket
solo-host/src/main.rs - WebSocket handler → ECS world: handles world commands
solo-host/src/server/ws_handler.rs - WebSocket handler → WebSocket client: exchanges updates
README.md - Rust host → ECS world: initializes world
solo-host/src/main.rs - Rust host → Physics system: runs systems
solo-host/src/main.rs - Rust host → Animation system: runs systems
solo-host/src/main.rs - Rust host → Script system: runs systems
solo-host/src/main.rs - Script system → Simulation camera: sets camera commands
solo-host/src/simulation_camera.rs - Rust host → Simulation camera: resolves camera
solo-host/src/main.rs - Script IDE → Language service: requests language service
README.md - Rust host → Texture import: imports textures
solo-host/src/main.rs - WebSocket handler → Project assets: serves project assets
README.md