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

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 1 reply
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...