How m9w/darkorbit-cli-client works
Darkorbit CLI Client is a protocol framework for connecting to a DarkOrbit game server and running modular client behavior. The principal workflow selects credentials, resolves a game-server address, connects and exchanges protocol packets, then dispatches packets to modules that update game entities or perform actions. Plugins and scheduled event handlers provide the extensibility layer; the included box-collector script demonstrates an automation feature. The README is minimal, and several subsystem links are inferred from annotations or unsampled code, so those are marked unverified rather than asserted as confirmed calls.
Main entry points: GameEngine.kt Game engine · Scheduler.kt Event scheduler · DynamicModule.kt Dynamic modules · BasicBoxCollector.kts Box collector
Components 22
Client runtime
- Application entry
src/main/kotlin/com/github/m9w/Main.kt - Client launcher
src/main/kotlin/com/github/m9w/Launcher.kt - Game engine
src/main/kotlin/com/github/m9w/client/GameEngine.kt
Authentication and network
- Authentication module
src/main/kotlin/com/github/m9w/metaplugins/AuthModule.kt - Authentication providers
src/main/kotlin/com/github/m9w/client/auth/AuthenticationProvider.kt - Server SID login
src/main/kotlin/com/github/m9w/client/auth/ServerSidAuthenticationProvider.kt - HTTP client
src/main/kotlin/com/github/m9w/util/Http.kt - Network layer
src/main/kotlin/com/github/m9w/client/network/NetworkLayer.kt - Protocol parsing
src/main/kotlin/com/github/m9w/protocol/ProtocolParser.kt - Packet factory
src/main/kotlin/com/github/m9w/protocol/Factory.kt
Plugin system
- Plugin repository
src/main/kotlin/com/github/m9w/plugins/PluginRepo.kt - Plugin loader
src/main/kotlin/com/github/m9w/plugins/Loader.kt - Dynamic modules
src/main/kotlin/com/github/m9w/plugins/dao/DynamicModule.kt - Package handlers
src/main/kotlin/com/github/m9w/plugins/dao/handlers/OnPackageHandler.kt
Game model and actions
- Entity tracking
src/main/kotlin/com/github/m9w/metaplugins/EntitiesModule.kt - Game entities
src/main/kotlin/com/github/m9w/game/entities/EntityImpl.kt - Game actions
src/main/kotlin/com/github/m9w/util/EngineUtils.kt - Box collector
src/main/kotlin-scripting/BasicBoxCollector.kts
Scheduling and configuration
- Event scheduler
src/main/kotlin/com/github/m9w/feature/Scheduler.kt - Module context
src/main/kotlin/com/github/m9w/context/Context.kt - Configuration
src/main/kotlin/com/github/m9w/config/config.kt
Other components
- User
Connections 24
- User → Application entry: starts
src/main/kotlin/com/github/m9w/Main.kt - Application entry → Plugin repository: loads plugins
src/main/kotlin/com/github/m9w/Main.kt - Application entry → Client launcher: launches
src/main/kotlin/com/github/m9w/Main.kt - Client launcher → Game engine: creates
- Authentication module → Game engine: connects
src/main/kotlin/com/github/m9w/metaplugins/AuthModule.kt - Authentication module → Authentication providers: selects provider
src/main/kotlin/com/github/m9w/metaplugins/AuthModule.kt - Authentication providers → Server SID login: creates login
src/main/kotlin/com/github/m9w/client/auth/AuthenticationProvider.kt - Server SID login → HTTP client: requests login
src/main/kotlin/com/github/m9w/client/auth/ServerSidAuthenticationProvider.kt - Game engine → Network layer: connects
src/main/kotlin/com/github/m9w/client/GameEngine.kt - Game engine → Packet factory: builds packets
src/main/kotlin/com/github/m9w/client/GameEngine.kt - Network layer → Protocol parsing: parses packets
src/main/kotlin/com/github/m9w/client/network/NetworkLayer.kt - Plugin repository → Plugin loader: loads definitions
- Plugin loader → Dynamic modules: creates modules
src/main/kotlin/com/github/m9w/plugins/Loader.kt - Dynamic modules → Package handlers: registers handlers
src/main/kotlin/com/github/m9w/plugins/dao/DynamicModule.kt - Event scheduler → Dynamic modules: schedules modules
src/main/kotlin/com/github/m9w/feature/Scheduler.kt - Event scheduler → Package handlers: dispatches packets
- Module context → Dynamic modules: resolves instances
src/main/kotlin/com/github/m9w/context/Context.kt - Entity tracking → Game entities: creates entities
src/main/kotlin/com/github/m9w/metaplugins/EntitiesModule.kt - Game actions → Game engine: sends actions
src/main/kotlin/com/github/m9w/util/EngineUtils.kt - Box collector → Entity tracking: reads entities
src/main/kotlin-scripting/BasicBoxCollector.kts - Box collector → Game actions: collects boxes
src/main/kotlin-scripting/BasicBoxCollector.kts - Box collector → Configuration: reads settings
src/main/kotlin-scripting/BasicBoxCollector.kts - Game engine → Event scheduler: emits events
src/main/kotlin/com/github/m9w/client/GameEngine.kt - Event scheduler → Game engine: disconnects
src/main/kotlin/com/github/m9w/feature/Scheduler.kt