Jump to content
The Dark Mod Forums

Idea: Demo support, watch recordings of playthroughs as a floating camera / player 1st person / 1st person view from AI


Recommended Posts

As usual this is mainly intended as a discussion and to hear opinions: It's not an expectation that the feature will happen soon or at all. Especially as this would be complicated to achieve, but if it could be done I think it may be a fun capability to consider.

The idTech engine had several features that got removed since we aren't using them like multiplayer. One used to be the ability to record a demo of your matches, which makes sense in multiplayer DeathMatch games. Yet recently I started to wonder: How would it be like to have a demo capability designed for TDM?

Imagine being able to record your playthroughs or share your recordings for others to watch, for when you'd like to relax watching a FM like a film instead of playing it like a game. You could fly as a detached camera, observing yourself wonder around the map and watching the things you did... or stay in 1st person and see the game play itself like in a Youtube video. The coolest thing would be the ability to see through the eyes of any NPC: Imagine being able to click on a guard in floating camera mode to embody them, seeing through their eyes as they patrol the area and at some point notice the player hiding in a corner through that guard's eyes (even if the AI didn't notice you).

The biggest challenge would be a way to record store and reproduce every input from the player, with every AI decision and other entity actions just as they occurred, which includes preserving object physics to represent the exact movements of all entities: Parts of the demo system from Quake would likely need to be reimplemented, wonder how much it knows to handle on its own. Saves and loads would be another tricky one: Each demo should erase what you did after last loading to produce a seamless run... alternatively it could record that as an action and include reloading in the playback. There's probably other challenges but if it's within the realm of possibility, would anyone else use this and think it's worth thinking of?

Link to comment
Share on other sites

25 minutes ago, jaxa said:

I think there's randomness in parts of the game, like NPC reactions. It probably won't work.

Those would need to be recorded and made constant during playback of course. Physics aren't random though right... like if you pick up and throw a vase against a wall, it will always move and roll the same way based on initial velocity? If so I'd presume this could work by merely remembering and simulating identical player key-presses and mouse movements, while using constant values for randoms in AI decision making and other entity scripts to ensure they always do the same things.

Link to comment
Share on other sites

1 minute ago, Daft Mugi said:

@MirceaKitsune Have you tried the following?

recordDemo <name>
playDemo <name>

It does work to a degree, but I don't know how extensive it is or if there are bugs. Plus, FPS drops considerably -- at least on my machine.

Oh my, it's already there? I will definitely take a look at it at some point! If it works there should definitely be a menu component so it's accessible to everyone, I didn't even hope it was already implemented to some extent :)

Will need to see how it handles saving and loading while a demo is being recorded. Also what camera modes are supported: The magic I had in mind would be the ability to fly around and see the player, as well as through AI's eyes to experience how they perceived the world and saw you during your run.

Link to comment
Share on other sites

2 hours ago, Daft Mugi said:

Yeah, it was originally part of the Doom 3 engine.

Indeed, but I imagined it was removed with the other stuff... now I hope it won't be, and if need be can be fixed to be compatible with TDM. The question is if it knows to work with our AI and entities, if we haven't done anything too radical to break it maybe we're lucky and it does! I should finish the FM I'm currently on, then I'll reload a previous one and give it a quick try to at least ensure nothing crashes or goes crazy.

Edited by MirceaKitsune
Link to comment
Share on other sites

There are two recordings in the engine.

One is "avi" or "render demo" recording, which records the data which flows into the renderer. I generates a lot of data, but I think it worked more or less recently.

The second kind records player inputs, and replays them later. Indeed, randomness has to be deterministic to make this work. However, it does not work: the player movements don't repeat. I tried to fix it, but could not find the problem.

  • Thanks 1
Link to comment
Share on other sites

So which type of recording is done by the "recordDemo" command?

I just tried it, following Daft Mugi's instructions and it worked reasonably well but

  • The replay had no sound
  • I had some entity guis (signs) in my test map and the text wasn't shown on the replay - the signs were just blank
  • The saved file was nearly 2MB for ~20 secs of recording (and wasn't particularly compressable either)

I'm guessing (from the file size) that this was an 'avi' recording.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      In addition to voting for TDM, let's help our friend Skacky garner some Moddb recognition for the momentous release of "The Black Parade" https://www.moddb.com/mods/thief-the-black-parade
      · 0 replies
    • peter_spy

      I don't think The Last of Us part I is a good game; it is something else in terms of pure audio-visual experience though. The attention to detail is insane, especially in sound and animation.
      · 0 replies
    • snatcher

      TDM Modpack v3.8 released!
      Introducing the SHOCK MINE!
      · 1 reply
    • JackFarmer

      If you find the new Beatles song "Now and Then", which was created with the help of AI, totally boring, then you should better play the mission of the same name by our esteemed mission maker friend joebarnin, because the latter is actually a creative milestone!
      · 4 replies
    • datiswous

      Idea: Thief 3 style missions.
      One of the great features of Thief 3 are missions defided in small segments with loading screens when you move from segment to segment. We all miss those right? I was thinking of mapping only horizontal, so not stacked. When you go up or down (stairs or elevator), you get a 20 seconds fake loading screen where you can play a minigame (The Builder's Blocks?). After that you get teleported to a different area that seems to be on top of the first, but actually isn't in the map file. It's much easier mapping, because you can see everything in one glance from above. This could also give more freedom building, because it doesn't have to fit. Everything is predictable because guards don't move to different sections.
      This could be used for the Thief 3 contest possibly..
      · 7 replies
  • Create New...