private static MyGameplayEndAnalytics GetGameplayEndAnalyticsData() { MyFpsManager.PrepareMinMax(); string multiplayerType = "Off-line"; if (MyMultiplayer.Static != null) { if (MySession.Static != null && MySession.Static.LocalCharacter != null && MyMultiplayer.Static.HostName.Equals(MySession.Static.LocalCharacter.DisplayNameText)) { multiplayerType = "Host"; } else if (MyMultiplayer.Static.HostName.Equals("Dedicated server")) { multiplayerType = "Dedicated server"; } else { multiplayerType = "Client"; } } MyGameplayEndAnalytics data = new MyGameplayEndAnalytics { AverageFramesPerSecond = (uint)(MyFpsManager.GetSessionTotalFrames() / MySession.Static.ElapsedPlayTime.TotalSeconds), AverageUpdatesPerSecond = (uint)(MyGameStats.Static.UpdateCount / MySession.Static.ElapsedPlayTime.TotalSeconds), MinFramesPerSecond = (uint)MyFpsManager.GetMinSessionFPS(), MaxFramesPerSecond = (uint)MyFpsManager.GetMaxSessionFPS(), TotalAmountMined = MySession.Static.AmountMined, TimeOnBigShipSeconds = (uint)MySession.Static.TimeOnBigShip.TotalSeconds, TimeOnSmallShipSeconds = (uint)MySession.Static.TimeOnSmallShip.TotalSeconds, TimeOnFootSeconds = (uint)MySession.Static.TimeOnFoot.TotalSeconds, TimeOnJetpackSeconds = (uint)MySession.Static.TimeOnJetpack.TotalSeconds, TotalDamageDealt = MySession.Static.TotalDamageDealt, TotalBlocksCreated = MySession.Static.TotalBlocksCreated, TotalPlayTime = (uint)MySession.Static.ElapsedPlayTime.TotalSeconds, Scenario = (bool)MySession.Static.IsScenario, voxelSupport = MySession.Static.Settings.EnableConvertToStation, destructibleBlocks = MySession.Static.Settings.DestructibleBlocks, destructibleVoxels = MySession.Static.Settings.EnableVoxelDestruction, jetpack = MySession.Static.Settings.EnableJetpack, hostility = MySession.Static.Settings.EnvironmentHostility.ToString(), drones = MySession.Static.Settings.EnableDrones, Wolfs = MySession.Static.Settings.EnableWolfs != null ? (bool)MySession.Static.Settings.EnableWolfs : false, spaceSpiders = MySession.Static.Settings.EnableSpiders != null ? (bool)MySession.Static.Settings.EnableSpiders : false, encounters = MySession.Static.Settings.EnableEncounters, oxygen = MySession.Static.Settings.EnableOxygen, toolShake = MySession.Static.Settings.EnableToolShake, inventorySpace = MySession.Static.Settings.InventorySizeMultiplier, welderSpeed = MySession.Static.Settings.WelderSpeedMultiplier, grinderSpeed = MySession.Static.Settings.GrinderSpeedMultiplier, refinerySpeed = MySession.Static.Settings.RefinerySpeedMultiplier, assemblerEfficiency = MySession.Static.Settings.AssemblerEfficiencyMultiplier, assemblerSpeed = MySession.Static.Settings.AssemblerSpeedMultiplier, floatingObjects = (uint)MySession.Static.Settings.MaxFloatingObjects, worldName = MySession.Static.Name, multiplayerType = multiplayerType }; return(data); }
public void ReportGameplayEnd(MyGameplayEndAnalytics attributes) { Add(new MyEventAttributes { EventType = MyInfinarioEventType.GameplayEnd, EventTimestamp = DateTime.UtcNow, GameplayEnd = attributes }); }
private static MyGameplayEndAnalytics GetGameplayEndAnalyticsData() { MyGameplayEndAnalytics data = new MyGameplayEndAnalytics { AverageFramesPerSecond = (int)(MyFpsManager.GetSessionTotalFrames() / MySession.Static.ElapsedPlayTime.TotalSeconds), MinFramesPerSecond = MyFpsManager.GetMinSessionFPS(), MaxFramesPerSecond = MyFpsManager.GetMaxSessionFPS(), TotalAmountMined = MySession.Static.AmountMined, TimeOnBigShipSeconds = (uint)MySession.Static.TimeOnBigShip.TotalSeconds, TimeOnSmallShipSeconds = (uint)MySession.Static.TimeOnSmallShip.TotalSeconds, TimeOnFootSeconds = (uint)MySession.Static.TimeOnFoot.TotalSeconds, TimeOnJetpackSeconds = (uint)MySession.Static.TimeOnJetpack.TotalSeconds }; return(data); }
private static MyGameplayEndAnalytics GetGameplayEndAnalyticsData() { MyFpsManager.PrepareMinMax(); string multiplayerType = "Off-line"; if (MyMultiplayer.Static != null) { if (MySession.Static != null && MySession.Static.LocalCharacter != null && MyMultiplayer.Static.HostName.Equals(MySession.Static.LocalCharacter.DisplayNameText)) { multiplayerType = "Host"; } else if (MyMultiplayer.Static.HostName.Equals("Dedicated server")) { multiplayerType = "Dedicated server"; } else { multiplayerType = "Client"; } } MyGameplayEndAnalytics data = new MyGameplayEndAnalytics { AverageFramesPerSecond = (uint)(MyFpsManager.GetSessionTotalFrames() / MySession.Static.ElapsedPlayTime.TotalSeconds), AverageUpdatesPerSecond = (uint)(MyGameStats.Static.UpdateCount / MySession.Static.ElapsedPlayTime.TotalSeconds), averageSimSpeedPlayer = (float)(MySession.Static.sessionSimSpeedPlayer / MySession.Static.ElapsedPlayTime.TotalSeconds), averageSimSpeedServer = (float)(MySession.Static.sessionSimSpeedServer / MySession.Static.ElapsedPlayTime.TotalSeconds), MinFramesPerSecond = (uint)MyFpsManager.GetMinSessionFPS(), MaxFramesPerSecond = (uint)MyFpsManager.GetMaxSessionFPS(), TotalAmountMined = MySession.Static.AmountMined, TimeOnBigShipSeconds = (uint) MySession.Static.TimeOnBigShip.TotalSeconds, TimeOnSmallShipSeconds = (uint) MySession.Static.TimeOnSmallShip.TotalSeconds, TimeOnFootSeconds = (uint) MySession.Static.TimeOnFoot.TotalSeconds, TimeOnJetpackSeconds = (uint) MySession.Static.TimeOnJetpack.TotalSeconds, TotalDamageDealt = MySession.Static.TotalDamageDealt, TotalBlocksCreated = MySession.Static.TotalBlocksCreated, TotalPlayTime = (uint)MySession.Static.ElapsedPlayTime.TotalSeconds, Scenario = (bool)MySession.Static.IsScenario, voxelSupport = MySession.Static.Settings.EnableConvertToStation, destructibleBlocks = MySession.Static.Settings.DestructibleBlocks, destructibleVoxels = MySession.Static.Settings.EnableVoxelDestruction, jetpack = MySession.Static.Settings.EnableJetpack, hostility = MySession.Static.Settings.EnvironmentHostility.ToString(), drones = MySession.Static.Settings.EnableDrones, cyberHounds = MySession.Static.Settings.EnableCyberhounds != null ? (bool)MySession.Static.Settings.EnableCyberhounds : false, spaceSpiders = MySession.Static.Settings.EnableSpiders != null ? (bool)MySession.Static.Settings.EnableSpiders : false, encounters = MySession.Static.Settings.EnableEncounters, oxygen = MySession.Static.Settings.EnableOxygen, trashAutoRemoval = MySession.Static.Settings.RemoveTrash, toolShake = MySession.Static.Settings.EnableToolShake, inventorySpace = MySession.Static.Settings.InventorySizeMultiplier, welderSpeed = MySession.Static.Settings.WelderSpeedMultiplier, grinderSpeed = MySession.Static.Settings.GrinderSpeedMultiplier, refinerySpeed = MySession.Static.Settings.RefinerySpeedMultiplier, assemblerEfficiency = MySession.Static.Settings.AssemblerEfficiencyMultiplier, assemblerSpeed = MySession.Static.Settings.AssemblerSpeedMultiplier, floatingObjects = (uint)MySession.Static.Settings.MaxFloatingObjects, worldName = MySession.Static.Name, multiplayerType = multiplayerType }; return data; }
private static MyGameplayEndAnalytics GetGameplayEndAnalyticsData() { MyGameplayEndAnalytics data = new MyGameplayEndAnalytics { AverageFramesPerSecond = (int)(MyFpsManager.GetSessionTotalFrames() / MySession.Static.ElapsedPlayTime.TotalSeconds), MinFramesPerSecond = MyFpsManager.GetMinSessionFPS(), MaxFramesPerSecond = MyFpsManager.GetMaxSessionFPS(), TotalAmountMined = MySession.Static.AmountMined, TimeOnBigShipSeconds = (uint) MySession.Static.TimeOnBigShip.TotalSeconds, TimeOnSmallShipSeconds = (uint) MySession.Static.TimeOnSmallShip.TotalSeconds, TimeOnFootSeconds = (uint) MySession.Static.TimeOnFoot.TotalSeconds, TimeOnJetpackSeconds = (uint) MySession.Static.TimeOnJetpack.TotalSeconds }; return data; }