Popcorning Guinea Pig
Search Results for

    Show / Hide Table of Contents

    Class RollbackScene

    Base class for scenes that support rollback netcode Extends the existing Scene architecture with rollback capabilities

    Inheritance
    object
    Scene
    RollbackScene
    Implements
    IDisposable
    Inherited Members
    Scene.IsLoaded
    Scene.HidesOsCursor
    Scene.Host
    Scene.CommandHandler
    Scene.SceneLoader
    Scene.SceneFileElements
    Scene.SceneData
    Scene.SceneInputContext
    Scene.DynamicBindings
    Scene.HierarchyManager
    Scene.ResolveHost()
    Scene.GetSceneFilePath()
    Scene.Load()
    Scene.Unload()
    Scene.Dispose()
    Scene.ConfigureInputBindings()
    Scene.OnLoad()
    Scene.OnUnload()
    Scene.ResolveBindingSource(BindingSource, object)
    Scene.UpdateBindings()
    Scene.AddBinding(DynamicBinding)
    Scene.Render(int, int)
    Scene.SetSceneData(SceneData)
    Scene.GetElement<T>(string)
    Scene.GetElementOrNull<T>(string)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: PopcorningGuineaPig.Engine.Scenes
    Assembly: PopcorningGuineaPig.Engine.dll
    Syntax
    public abstract class RollbackScene : Scene, IDisposable

    Constructors

    | Edit this page View Source

    RollbackScene(ILogger)

    Declaration
    protected RollbackScene(ILogger logger)
    Parameters
    Type Name Description
    ILogger logger

    Fields

    | Edit this page View Source

    _logger

    Declaration
    protected readonly ILogger _logger
    Field Value
    Type Description
    ILogger

    Properties

    | Edit this page View Source

    CurrentFrame

    Current frame number for this scene

    Declaration
    public long CurrentFrame { get; }
    Property Value
    Type Description
    long

    Methods

    | Edit this page View Source

    ApplyInput(string, object)

    Apply player input to the scene Override in derived classes to handle specific input types

    Declaration
    public abstract void ApplyInput(string playerId, object input)
    Parameters
    Type Name Description
    string playerId
    object input
    | Edit this page View Source

    Clone()

    Create a deep clone of the current scene state

    Declaration
    public RollbackScene Clone()
    Returns
    Type Description
    RollbackScene
    | Edit this page View Source

    CreateClone()

    Override in derived classes to create a new instance for cloning

    Declaration
    protected abstract RollbackScene CreateClone()
    Returns
    Type Description
    RollbackScene
    | Edit this page View Source

    DeserializeState(byte[])

    Deserialize and restore scene state from network data

    Declaration
    public void DeserializeState(byte[] data)
    Parameters
    Type Name Description
    byte[] data
    | Edit this page View Source

    GetDebugInfo()

    Get detailed scene information for debugging

    Declaration
    public virtual Dictionary<string, object> GetDebugInfo()
    Returns
    Type Description
    Dictionary<string, object>
    | Edit this page View Source

    RestoreCustomState(Dictionary<string, object>)

    Override to restore custom scene-specific state

    Declaration
    protected virtual void RestoreCustomState(Dictionary<string, object> customState)
    Parameters
    Type Name Description
    Dictionary<string, object> customState
    | Edit this page View Source

    RestoreState(RollbackSceneState)

    Restore scene state from a saved snapshot

    Declaration
    public void RestoreState(RollbackSceneState state)
    Parameters
    Type Name Description
    RollbackSceneState state
    | Edit this page View Source

    SaveCustomState()

    Override to save custom scene-specific state

    Declaration
    protected virtual Dictionary<string, object> SaveCustomState()
    Returns
    Type Description
    Dictionary<string, object>
    | Edit this page View Source

    SaveState()

    Save the current scene state for rollback

    Declaration
    public RollbackSceneState SaveState()
    Returns
    Type Description
    RollbackSceneState
    | Edit this page View Source

    SerializeState()

    Serialize scene state for network transmission

    Declaration
    public byte[] SerializeState()
    Returns
    Type Description
    byte[]
    | Edit this page View Source

    Update(double)

    Update method that increments frame counter

    Declaration
    public override void Update(double deltaTime)
    Parameters
    Type Name Description
    double deltaTime
    Overrides
    Scene.Update(double)
    | Edit this page View Source

    ValidateState()

    Validate scene state integrity Override to add custom validation logic

    Declaration
    public virtual bool ValidateState()
    Returns
    Type Description
    bool

    Implements

    IDisposable
    • Edit this page
    • View Source
    In this article
    Back to top © 2024 Popcorning Guinea Pig Game Engine. A custom C# game engine for indie developers.