Jump to content
The Dark Mod Forums

Tip: Using timescale cvar to verify AI patrols


Ishtvan

Recommended Posts

I stumbled on this while watching some AI patrols in test maps. Say you want to watch an AI ingame to make sure they patrol correctly, don't get stuck up on things, etc. You can set yourself notarget and noclip and hover around somewhere, watching. If you watch this in normal time, it can take a long time to watch the AI's entire patrol. Instead, you can effectively set up time compression by opening up the console and typing timescale <number greater than one>. For example:

timescale 2.0

 

This is like watching a fast-forwarded recording of the AI, and saves you some time. :)

 

DISCLAIMERS:

-If you turn it up too high, AI might start suffering g-force damage and physics might get strange, because in some places, I think Id hard-coded the frame time-step as 1/60 seconds, ignoring the timescale variable. If the actual frame time step is larger, causing animations to move them farther, but the hard-code says this occurred over a normal time step, they'll think they have a higher velocity than they really do. I could be wrong, though.

 

-You can nominally set it back to normal time by setting timescale 1.0, but this never feels quite right to me. I think there might be a bug where timescale 1.0 is actually slightly too fast or something, so I usually restart Doom3 when I'm done playing with time and want to be absolutely sure I'm back in normal-time.

 

FUN FACTS:

-You can look at things in slow motion by setting timescale less than 1.0. Try watching a fire arrow blow up a breakable window in slow motion. It's pretty sweet!

 

-You can also use g_stoptime 1 and 0 to stop and start time, and you can walk around and look at stuff while it's stopped. I bound this to a key when developing, and find it really useful. Don't forget to start time up again when you switch maps, though, otherwise the screen will stay black due to the timed fade-in, and you'll wonder what's going on until you remember that you stopped time and it always fades in from black when you load a map. :)

 

If this is useful, we can add it to wiki. As usual, I'm not sure where to put it.

Link to comment
Share on other sites

Yes, I'm sure you could also use this effect to make the most boring FM ever where you have to search through a lot of security camera footage of a crime trying to figure out what happened. :)

 

EDIT: I agree it could be used to good effect in cinematics. For example, you could do all your 2002-era-movie slow motion rotating around effects :), and it might be cool to show a cinematic at mission start that is basicaly a time-lapse of the city area you're going to be sneaking through in the daytime, with people moving around and a shadow casting sun that sets and a sky that changes color as day turns to night. Then when the mission started you'd kill the sun and people so that performance was normal. Or you could do all that on a high end system and save it to a video briefing instead of an ingame cinematic, if performance during the cinematic was an issue was an issue. Although if the frames are already time-lapse scenes, I'm not sure if low fps would be an issue. Unless it is really low like spf instead of fps. :)

Link to comment
Share on other sites

Scaling time is a killer feature for all kinds of in-game debugging; I've used it in Unreal before, but didn't realise Doom 3 had it. Nice find!

 

I've found slow motion very useful for checking out animation glitches, etc.

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
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

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • 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 )
      · 3 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
       
      · 7 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
×
×
  • Create New...