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


MirceaKitsune

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>
stopRecording
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.

Guest
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

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 5 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
×
×
  • Create New...