==== Island startup ==== - starts in CobaltBrowser >> setup - calls CobaltBrowser >> startInitialWorld - reaches CobaltHarness >> createLocalIsland:named: - CobaltRouterConfig >> startDispatcher - ========= External contact info is now known to the dispatcher ========= - CobaltHarness >> startRouterFor:named: - CobaltController >> connectTo:port:sessionID: - open a TCP connection to the dispatcher on localhost and send the sessionID to connect to the router [TMessageRelay >> connectTo:port:sessionID:] - Send a routerInfo datagram, recieve a routerInfoFrom datagram [CobaltController >> requestRouterInfo] - ========= External contact info is now known to the controller ========= - CobaltHarness >> addController: - CobaltController >> login:password: - Send a login datagram of authService CoLocalSecretTestAuthService - Receive a challenge datagram of authService CoLocalSecretTestAuthService - Send a list datagram - Receive a recvFacets datagram - join - send join, receive joinFrom - heartbeat: 20 - send heartbeat, receive ticks - beServer - send beServer, receive serve datagrams in the future - CobaltController >> newIsland - set id/name of island to the same as the router - Within the island, do CobaltWorld class >> new - This sets up the ugly grey space with a portal in it - starts up a contact point for the island - What is a contact point? some kind of network service. maybe it's the local network service discovery thing. Don't know though - From TBuildDualWorldConfig >> startInitialIn:morph: - build another island repeating all the same steps above (same dispatcher, new router, new island, new space (CobaltWorldIntro, the green space), new contact point - link the two portals in the two spaces together ==== UI startup (3.8) ==== Start dragging the Cobalt icon: In Morphic UI Process: - "CobaltMaster launchPartVia: #newStandAlone label: 'Cobalt'" - ... - CobaltMaster (CobaltParticipant) >> initialize - Start a Upnp listener and scan the network for listening devices ("SsdpListener restart") - NEW PROCESS: (50) Semaphore>>wait - [] in RbtServer >> listenLoop - Set some tweak preferences - CobaltMaster(CroquetParticipantWithMenu) >> initialize - CobaltMaster(CroquetParticipant) >> initialize - set the default blue color - "self setProperty: #suppressStepping toValue: true" - start up a Tweak ScriptScheduler and associate it with the CobaltMaster - ... - CobaltMaster(CroquetParticipantWithMenu) >> initializeTweakWorld:withWorldPlayer: - method comment: "Make a Tweak overlay, and evaluate aBlock with the Tweak world to setup its contents. All events will go directly to the Tweak world, so register event handlers for us." - Create and initialize a CobaltMenuWorld - Bootstrap the Tweak world in another process: In initializeTweakWorld bootstrap ScriptProcess: - [] in CobaltMenuWorld(CWorldPlayer) >> initializeTweakWorld:withWorldPlayer: - NEW SUSPENDED PROCESS: (47s) [World>>evaluate:with:]: ScriptProcess(Process)>>suspend - Resumes at "In World Bootstrap ScriptProcesss" - Start up mouse and keyboard handling Tweak scripts First script resumes: - [] in CobaltBrowser(CroquetParticipantWithMenu) >> initializeTweakWorld: - CobaltMenuWorld >> onBootstrap - project = ... - ... - CobaltMenuProject >> initialize - CobaltMenuProject(CroquetModularMenuProject) >> initialize - CobaltMenuProject(CroquetMenuProject) >> initialize - CobaltMenuProject(CProjectBuilder) >> initialize - ... - CProjectShell >> newProject - Start a new island and scheduler - start script #installWorldMenu - project topLeft: 0@0 - ... - CMenuProject >> setupCostume In Morphic UI Process, after initializeTweakWorld bootstrap ScriptProcess - CobaltMaster(CroquetParticipantWithMenu) >> initialize - Draw master as splash screen from Content/Textures/splashscreen.jpg - The cursor changes to a pair of glasses while reading the image file You are now holding the Cobalt splash screen Now, the CobaltMaster is stepping up to 50 times per second (See CroquetParticipant >> stepTime is 20 msec = 1/50th of a second). All this is doing is simulating nothing in the Tweak world: In Morphic UI Process: - CobaltMaster(CroquetParticipantWithMenu)>>step - CobaltMaster(CroquetParticipant)>>step - supressStepping is enabled (from CroquetParticipant>>initialize), so skip harness operation - schedule a redraw for no good reason ("self changed") - CobaltMaster(CroquetParticipantWithMenu)>>runTweakCycle - ensure that the tweak world is the same size as the CobaltMaster morph - ... - CobaltMenuWorld(CroquetMenuWorld)>>runCroquetCycle Now drop the splash screen: In Morphic UI Process: - CobaltMaster(CroquetParticipant) >> justDroppedInto:event: - run a Morphic world cycle (Why?) - Remove property #supressStepping Now, in the next Morphic cycle, the step method will run differently, and we will initialize the CobaltHarness In Morphic UI Process: - CobaltMaster(CroquetParticipantWithMenu)>>step - CobaltMaster(CroquetParticipant)>>step - ... - CobaltMaster(CroquetParticipant)>>setupAndGo - CobaltMaster>>setup - Start the progress bar - Set loading progress to 5% - CobaltMaster(CobaltParticipant)>>setup - CobaltMaster(CobaltParticipant)>>setup - CobaltMaster(CroquetParticipantWithMenu)>>setup - CobaltMaster(CroquetParticipant)>>setup - Create a new CobaltHarness - CobaltHarness>>initialize - CobaltHarness(CroquetHarnessWithMenu)>>initialize - Initialize Croquet Properties from file "croquet.props" - CobaltHarness(OpenALHarness)>>initialize - CobaltHarness(CroquetHarness)>>initialize - "FileDirectory addCroquetMimeTypes" - initialize cryptographic entropy pool - Initialize the TFormMagager and TCacheManager, which are responsible for keeping textures off the island - Initialize a bunch of harness variables - CobaltHarness>>initializeAvatar - - CobaltMaster(CroquetParticipant)>>setupPortal so skip harness operation - schedule a redraw for no good reason ("self changed") - CobaltMaster(CroquetParticipantWithMenu)>>runTweakCycle - ensure that the tweak world is the same size as the CobaltMaster morph - ... - CobaltMenuWorld(CroquetMenuWorld)>>runCroquetCycle Note: To debug Tweak, put a halt in ScriptScheduler>>run, between "self debugPrintActive. activeList signal" and one in ScriptMessageSend>>synchronousValueWithArguments:event:, just before "result := receiver perform: selector withArguments: anArray." vi:sw=2 sts=2 nowrap