public void Run(IAppBuilder builder) { builder.AddPlugin(new ConfigurationManagerPlugin()); builder.AddPlugin(new ProfilesPlugin()); builder.AddPlugin(new SteamPlugin()); //Add matchmaking plugin var fastMatchMakingConfig = new MatchmakingConfig("fast", b => { b.Register <DataExtractor>().As <IMatchmakingDataExtractor>(); b.Register <Matchmaker>().As <IMatchmaker>(); b.Register <MatchmakingResolver>().As <IMatchmakingResolver>(); b.Register <RulesService>(resolver => new RulesService(resolver.Resolve <ILogger>(), p => 0));//Everyone is at MMR 0 }); builder.SceneTemplate("main", scene => { scene.AddController <ProfilesController>(); scene.Metadata["stormancer.profiles"] = "enabled"; //scene.AddNatPunchthrough(); //scene.AddGameVersion(); //scene.AddLeaderboard(); //scene.AddAnalytics(); }); builder.SceneTemplate(GAMESESSION_SCENE_TYPE, scene => { scene.AddGameSession(); scene.AddChat(); scene.AddTurnByTurn(); }); builder.SceneTemplate("matchmaker-fast", scene => { scene.AddMatchmaking(fastMatchMakingConfig); }); builder.AdminPlugin("users").Name("Users"); var userConfig = new Users.UserManagementConfig() { SceneIdRedirect = "services" /*Constants.MATCHMAKER_NAME*/ }; //userConfig.AuthenticationProviders.Add(new LoginPasswordAuthenticationProvider()); userConfig.AuthenticationProviders.Add(new SteamAuthenticationProvider()); userConfig.AuthenticationProviders.Add(new AdminImpersonationAuthenticationProvider()); builder.AddPlugin(new UsersManagementPlugin(userConfig)); }
public void Run(IAppBuilder builder) { builder.SceneTemplate("gameSession", scene => { new StickyPlatformsServer(scene); }); }
public void Run(IAppBuilder builder) { builder.SceneTemplate("empty", scene => { }); var userConfig = new Users.UserManagementConfig() { SceneIdRedirect = "main" /*Constants.MATCHMAKER_NAME*/ }; userConfig.AuthenticationProviders.Add(new LoginPasswordAuthenticationProvider()); userConfig.AuthenticationProviders.Add(new SteamAuthenticationProvider()); builder.AddPlugin(new UsersManagementPlugin(userConfig)); }
//The runtime calls this method on startup to initialize the server. public void Run(IAppBuilder builder) { //Declares a scene template called "hello" builder.SceneTemplate("hello", scene => { //Adds an handler executed whenever a peer connects to the scene. scene.Connected.Add(async peer => { //Sends the string "hello world!" to the peer that just connected. peer.Send("msg", "hello world!"); }); }); }
public void Run(IAppBuilder builder) { builder.AddPlugin(new MatchmakingPlugin(MatchmakingFactory.Create( new DefaultMatchmakingDataExtractor(), new DefaultMatchmaker(), new DefaultMatchmakingResolver() ))); builder.SceneTemplate("test-template", scene => { scene.AddRoute("echo.in", p => { scene.Broadcast("echo.out", s => p.Stream.CopyTo(s, (int)p.Stream.Length), PacketPriority.MEDIUM_PRIORITY, PacketReliability.RELIABLE); }); }, new Dictionary<string, string> { { "description", "Broadcasts data sent to the route 'echo.in' to all connected users on the route 'echo.out'." } }); }
public void Run(IAppBuilder builder) { builder.AddPlugin(new ConfigurationManagerPlugin()); builder.SceneTemplate(GAMESESSION_TEMPLATE, scene => { scene.AddGameSession(); }); var userConfig = new Users.UserManagementConfig() { SceneIdRedirect = "locator" /*Constants.MATCHMAKER_NAME*/ }; //userConfig.AuthenticationProviders.Add(new LoginPasswordAuthenticationProvider()); userConfig.AuthenticationProviders.Add(new TestAuthenticationProvider()); //userConfig.AuthenticationProviders.Add(new AdminImpersonationAuthenticationProvider()); builder.AddPlugin(new UsersManagementPlugin(userConfig)); }
void Run(IAppBuilder builder) { builder.SceneTemplate("ChatRoom", scene => scene.AddChat()); }
public void Run(IAppBuilder builder) { builder.SceneTemplate("ChatRoom", scene => scene.AddChat()); }
public void Run(IAppBuilder builder) { builder.SceneTemplate("tester", scene => TesterBehavior.AddTesterBehaviorToScene(scene)); }
public void Run(IAppBuilder builder) { builder.SceneTemplate("interpolator_scene", (scene) => new InterpolatorScene(scene)); }
public static void AddGameScene(this IAppBuilder builder) { builder.SceneTemplate("server", scene => new server(scene)); }
public void Run(IAppBuilder builder) { builder.SceneTemplate("main", scene => new Main(scene)); }
public void Run(IAppBuilder builder) { builder.SceneTemplate("Lobby", scene => scene.addServerLogic()); builder.SceneTemplate("Game", scene => scene.addGameLogic()); }