PDA

View Full Version : How fast is a Relay Trap?



Telliamed_
24th Aug 2002, 05:38
I've been experimenting with timing of events, and deterministic ordering (making sure that that one thing happens after another) . So I wanted to find out how much of a delay is caused by a relay trap. I was able to make a rough "timer" using a series of relays tied to lights and a timed relay that activates a lock. (Actually, this is just the last construction I settled on after a number of other experiments.)

http://snow.prohosting.com/tomfool/thief/missions/lights2.zip

I determined that on my system, a relay trap is roughly 33.33 ms. Which makes sense since that's roughly the optimal time for a single frame.

Anyway, I was curious if other people's systems would be either faster or slower. So I invite you to download the mission file and try it out.

1- Frob the switch
2- Count the number of lights that turn on.
3- Divide 500 by that number.
4- Tell me.

So, when I did it, I would get between 13-15 lights (it's not always the same, so try it a couple of times and take an average). Roughly 33.33+ ms.

Lytha
24th Aug 2002, 09:45
I have problems to download the file, telliamed. It says that the size is "unknown", ends the download in 2 seconds (I doubt my line is *that* fast), and if I try to open it with winzip to have a look at the content, it says it's not a valid zip archive.

Telliamed_
24th Aug 2002, 10:10
It would help if I typed the right URL in. :rolleyes:

Okay, try again. Also, you have to be sending "Referer" headers to use prohosting. If you disable them they get mad and accuse you of stealing bandwidth.

It might help to download the file from this page (http://snow.prohosting.com/tomfool/thief/tech.shtml) instead.

Lytha
24th Aug 2002, 13:37
Now I get internal server errors with both URLs. :(

Komag
24th Aug 2002, 17:33
I can't get it either. Can you e-mail me a copy?

Telliamed_
24th Aug 2002, 17:47
ugh. snow seems to be having difficulties today.

Time for the backup site. http://homepage.mac.com/ptbrown/lights2.zip

Lytha
24th Aug 2002, 20:41
16 lights in the first try
16 in the second.

Hm... I produce a processor overload now for two more shots.

Alright. With an active winamp, IRC client, opera, staroffice, editpad, active virusscanner in the background it stays at 16 and 16


;)

Komag
25th Aug 2002, 05:06
Here are my first 15 tries:

17
13
28 (all)
26
21
19
16
28 (all)
28 (all)
28 (all)
16
19
28 (all)
17
28 (all)

that doesn't seem very reliable! But with my own experience with timing nightmares with MindMaster I'd say your guestimate of 33 milliseconds is probably close; I had figured it to be around 50 milliseconds, but it never was exactly the same from time to time. And I think it has to do with processor power and speed and what all is going on with the scene and background stuff. So if you want things to work, you have to try to build in some redundancy so you can count in it working like you want! :)

Telliamed_
25th Aug 2002, 06:58
We should probably include our system specs as well.

P3-450 100MHz bus 192MB RAM
Win98se, DirectX 8.1
TNT 16MB (don't laugh) Detonator 6.31 drivers
YMF-724 sound


Don't you have a P4, Komag? Thief, of course, isn't threaded in any way. But I wouldn't be surprised if some parts of DX8 take advantage of threading. And the P4 has the "hyperthreading" which can make it act like a multi-processor in some cases. If that's kicking in then I'd expect results like that.

My system, though, has been pretty consistent. 13-15 every time.

One of the problems with the way you did MindMaster is that things which either have to appear physically, or use TIMER events (like TrapTimedRelay) don't actually take place in real-time. They use "sim time". Sim-time is used to keep things that appear in the game synchronized. So it may be slowed down if there are a lot of things happening at once. (I don't think there's any normal case will sim-time will be faster than real-time.) Meanwhile, scripts are all executing as fast as they can, in real-time.

It's my theory that if you work entirely in sim-time or real-time, then you can make things happen in an exact order. But once you have one thing running in sim-time and one thing in real-time, then all bets are off.

Incidentally, there's a 'scale_sim_time' command. It's a multiplier so you can either go >1.0 to speed things up or <1.0 to slow things down. The switch and timed relay will scale, but the regular relays won't. (Odd, I thought animlights were supposed to scale too but I don't see it happening.)

Komag
25th Aug 2002, 07:24
Hmm, didn't know that about the timing - it might explain some of my trouble perhaps


My specs
P4 1.7ghz
512meg Rambus RAM
GeForce 3 ti200 w/128megDDR-RAM
SoundBlaster Audigy X-Gamer package

(Mine's not tip top of the line, but I will certainly need betatesters for future missions so I can see how they work on other more common systems!)

Lytha
25th Aug 2002, 10:47
Hm... it seemed quite reliable here on my system though. ;)

Explains why I had these reliable results with MM, I guess... ;)


Well, it's the processor speed.

I have (don't laugh)...

128 MB Ram (if it was the RAM, I would have had less lamps than telliamed)
AMD 800 Mhz
ASUS AGP-V6600 (wasn't it a Geforce? *is puzzled*)
Win95

Lytha
30th Aug 2002, 12:23
Oki, I just upgraded my RAM; just plugged in 256 more MB of it. :D :) :D

(leaving me with 384 MB RAM in total, yay!)


I still get 16 lights. :)

That means, it is the processor, and that Athlons are quite reliable. ;)

Telliamed_
31st Aug 2002, 05:43
Thief was designed for computers with 32-64M of RAM, so going above 64 will give you more headroom, but no significant speed improvements.

The video card has the greatest impact on performance. And since Thief doesn't use things like T&L or anti-aliasing, the only thing it needs is bandwidth. Going from 2x to 4x, or a faster GPU. Video memory isn't as much an issue since most of the textures are 64x64 and only about 200-300 in a fair sized mission. I'd guess Thief isn't using more than 24M for textures.

Komag
31st Aug 2002, 06:01
Originally posted by Telliamed
Thief was designed for computers with 32-64M of RAM, so going above 64 will give you more headroom, but no significant speed improvements.

But more memory helps TONS with Dromed, especially with portalizing/optimizing time

Lytha
31st Aug 2002, 07:39
More RAM helps a lot with dromed and with loading a mission. And with the performance of the mission.

I am so happy that CL suddenly runs like charm on my system that I replay it now.


With my lowly 128 MB RAM, I had sometimes framerates of ~2-5 fps in the lowest possible resolution when I first time played it (meaning that I had to reload a lot); and a reload took me <b>5</b> minutes. I looked at my watch during one of those.

The RAM helps a lot now, I am playing it now in the highest possible resolution; a reload takes a max. of 20 seconds, I have my opera and my IRC client up and running in the background, and I did not have to reboot my computer yet because it suddenly went frozen during the mission.


And there is another change. No, actually, there are already several changes, so far.

1.) Recall the archer at the bottom of the towers that lead to Mr. Provost's balcony? She rotates <b>faster</b> now, and her peripheral vision is improved. I know that, I have picked this certain lock 3 times with my lowly 128 MB RAM, and I never had so much problems with her before.

2.) Recall the evil trap in the Museum's Vault? With my upgraded RAM, there is <b>not</b> the little gap anymore between the left wall and the second death trap. I was trying exactly the same maneuvre as I successfully used before (hug the wall, creep, get in), and it <i>does not work anymore</i>. I needed to shoot a moss arrow on the floor, stack my holy water potions, and jump across (tedious task.) Getting out was even worse - I ended up with standing, running, jumping (the death trap <i>was</i> set off, but I was already away from the impact zone. I could see the fireballs now, last times I would just have died), and then right down and out of the window.

3.) The AI calms down a lot faster from alert 1 back to alert 0. I do not need to sit i.e. behind the Archer at the Murkbell gate for 5 minutes until she relaxed again, she relaxes now almost double as fast.

4.) I killed the invisible beast last night (mission failed, because it is obviously part of the "humans" OH branch or because the "don't kill people" is set to archetype "animals" and it is one... I guess I will need to lead it to the wizards again and use it to heal myself in the mean time.) Still, that's quite cool. I would not even have dared to attempt this with 128 MB RAM because it could attack me a couple of times until the next frame allowed me to hit it again. With all the blood on the floor, it would have become even worse.

5.) The pressure plates in the Tomb are working differently now. They go faster back to the 0-position. Placing a rock onto the fireball-pressure plate was difficult because the pressure plate would start to bop up and down like nuts.


As you see, there are some interesting changes. Most of all, the deathtrap in the vault intruiges me; that indicates that some things are working differently now (maybe I could even finish MM now? ;) )

ChangelingJane
31st Aug 2002, 14:47
I'll add my results as well:

28 (all) normally (no anti-aliasing, no background programs) and with 2x anti-aliasing
27 with 4x anti-aliasing, both with/without winamp running

I got the same results consistently with each setup. I changed around the anti-aliasing because I usually play in 640x480 with 4x anti-aliasing.

My system specs:

P3 800mzh
256mb ram
VooDoo 5 (64mb)
SB PCI128

OS: WinME

Apache
1st Sep 2002, 04:35
If you are trying to time things..there is a lot easier way.
**CREATE**
1. Create your Relay Marker
2. Create as many Plain Markers as events that you have (IE 3 things happening in a certain order. Needs 3 Markers.)
Open the props for each marker
ADD>S>Scripts - TrapTimedRelay
ADD>Scripts>Timing
put in the amount of delay you want in milliseconds. 5000 = 5 sec
Set each marker this way and change the Timing as needed.
**LINKING**
Link your main trigger event (IE walking into a room) to the relay trap with a CD
Link the RelayTrap to each marker with a CD
Link each Marker to it's own event with a CD
Now give it a try.
This by the way only works for Thief 2. A nice addition to anyones folder of DromEd tips & tricks.

Telliamed_
1st Sep 2002, 06:48
ChangelingJane's results seem consistent. Her system is comparable to Lytha's, but the V5 and only running at 640x480 speed things up a lot. Higher FPS translates into more frequent runs through the message queue. In my system, the video card is obviously the bottleneck. (Although I run at 1024x768. I'm gonna scale down and try again.... 17 lights @ 640x480)


TrapTimedRelay is only available to Thief2 1.18. There are other ways to fake it: flicker triggers, levers with slow joint speeds. But the issue here isn't to create delays, but to know how long a path will take for when you have parallel paths executing at the same time. If one of those paths involves sim-time, and the other does not, then the order that the paths will complete in will be different depending on the speed of the player's hardware.