Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6831441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:44:17+00:00 2026-05-26T22:44:17+00:00

We are building a multiplayer game that supports replays. The replays work like this:

  • 0

We are building a multiplayer game that supports replays. The replays work like this:

All state updates from the server get saved into a file. When we are replaying the file we just take the initial state recieved from the server and apply the state updates. This works fine. We can play, fast-forward, pause and go ba… oh wait.

What would be the best way to actually allow players to view the replay backwards?


Some implementation details, we use a huge state struct (well, not really, but you could see it as such). This struct gets updated over the network (UDP) by calculating differences between the last sent struct and the current one. The client interpolates between the last two recieved structs and extrapolates when needed (when ping > throttle of updates). In addition we use an acked event system for stuff that hasn’t to be drawn smoothly on the screen but needs to be, well, acked.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:44:17+00:00Added an answer on May 26, 2026 at 10:44 pm

    A couple of suggestions (assuming you can make a snapshot at any point, and you’re storing forward deltas).

    1.. If the replay is short and the state isn’t too big, actually generate snapshots for each frame in the sequence and “render” them in reverse.

    2.. If the whole state is very big, then only generate a snapshot for the last frame of the reversed replay. Then apply X forward deltas to the snap shot to generate the first frame of the reversed replay. Render that. Then apply X-1 deltas, and render that, repeat until X = 0, when you’re at the end of replay (just the first snap shot).

    // pseudo code for reverse play
    first, last = GetReplayRange();
    
    if (playReversed) {
      GameState snapShot = GenerateSnapshot(first);
      GameState currentState;
    
      currentFrame = last;
      while (currentFrame != first) {
        // loop from snapshot up to current frame
        for (i = first; i < currentFrame; i++) {
          currentState = snapShot.AddDetlasTo(currentFrame);
        }
        Render(currentState);
        currentFrame--;
      }
    }
    

    3.. If its too slow to apply X updates to a snapshots to “rewind” then make a series of snap shots N frames apart, and do the same reverse trick in #2, over a narrower range.

    Remember that even if you have a reversed game state ready to render – you’ll still have to render all your effects in reverse, which most effect systems probably aren’t geared for.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building a massively multiplayer game with Node.js and Socket.io. All players will
I'd like to build a turn-based, multiplayer iPhone game that will require a game
I'm building an iOS game that will have both singleplayer and multiplayer modes. I'm
building upon the $.fn.serializeObject() function from this question , i'd like to be able
I'm building a multiplayer game in PHP. Each game is split into stages that
I'm building a multiplayer game which when connecting to the server, the server sends
I'm building a web game in Ruby on Rails that relies on a choose-your-own-adventure
I am planning to create a Flash AS3 game that is like SimCity. Or
I'm building a prototype game and have some multiplayer functionality hooked up. I am
I'm building a game and I'm looking for a good way to implement multiplayer.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.