Wiki

Clone wiki

Portal 2 Live Timer / Home

Portal 2 Live Timer

Now resizable and with chapter and map-by-map splits! See below for how the comparisons work.

Current version: 0.2.1c (19 May '14)

A timer for those who complain "Portal 2 isn't timed as RTA".

Installation

Sorry, it's not a simple .exe because I was trying to see if IronPython was practical to deploy apps (doesn't seem that way). I'm working on adapting it to C# so it will be just a 1-click .exe, but it'll be a while. Unless I hear complaints, no fucks will be given.

  1. If you're not running Windows 8, make sure you have .NET 4.0 installed, if not, get it here. (Windows 8 includes .NET 4.0)
  2. Download and install IronPython 2.7 from http://www.ironpython.net/ Default install options.
  3. Download and unzip the program from the downloads section, or right here.
  4. Double-click the P2LT.pyw file and associate it with ipyw.exe, likely at C:\Program Files\IronPython 2.7\ipyw.exe.
    • If there is an update, do not repeat the above, just unzip and double-click the new P2LT.pyw.
    • If you already have CPython installed, rename the file to P2LT.ipyw. If you have Python 3.3+ installed, you have the Python Launcher for Windows, so you can alternatively add the IronPython folder to the system path and it will read the hashbang (#!) and execute appropriately.

General Usage

  1. Tell the program where your Portal 2 demo folder is (if it didn't detect it)
  2. Start recording demos in Portal 2.
    • In the developer console, opened with the ~ (tilde) key, enter record mydemo.
    • Use new demo names. If you use the same name as old demos and overwrite other demos, the timer will ignore them.
  3. Go fast.
    • If you die, Portal will stop recording. If you begin recording again the timer will pick up the new demos, regardless of their name, so call them whatever.
    • On the final map, do not stop recording until at least after GLaDOS pulls you up (you can let all the credits roll). If you don't, the timer won't stop.
  4. If you feel you didn't go sufficiently fast, stop recording and hit the Reset button. The timer will again watch for new demos and start automatically.

Comparing Splits

If you get a good run, save the tick data by going to File >> Save Current Run... This will prompt you to save a CSV that can be imported later or added to your records. Here's an example (Znernicus' 1:07:28.7)

If a split CSV file, either one generated by the program or in Excel, Calc, Google Spreadsheets, Notepad, etc. is loaded via File >> Open Splits..., the chapter splits will start filled in with times from the CSV and become colored deltas when the current run completes them. The CSV file must fulfill the following criteria:

  1. Each row must have the same number of fields
  2. The number of fields must be 2 or 3
  3. The first field is the map file name, (e.g. sp_a1_intro1)
  4. If there are ...
    • 2 fields per row, the field is the number of ticks spent on that map.
    • 3 fields per row, the middle field is the start tick for the map and the last field is the stop tick.
  5. All single player maps must be included (except the credits).
  6. No extra maps may be present.

An error box should prompt you about what's wrong. It should not just crash without a trace. If it does, send me the CSV file you used.

Things that don't (shouldn't, file a bug report...) matter

  • Quotes around fields (Excel sometimes does this)
  • A 1-row header with field names will be detected and ignored
  • Multiple rows with the same map name (e.g. you died)

Screenshots

Casual vs. WR
P2LT020.png

What it's doing

The program checks the demo folder every so often for new, recorded demos. When it finds one that has been written out, it processes it to find the number of ticks within, and adds them to the split timer. It also resets the counting timer to that split, so there is no accumulated error between real-time and demo time. The most the timer should be off is a single map load.

Known caveats

This is not the be-all-end-all of Portal 2 timing (yet). While I hope to have it reporting times that agree with the official method of timing, this is not the official method of timing. So, double check before you say you beat my epic, sub-3 hour record.

First Map

See Start Timing for more methodology.

I use player position to determine when to start counting in sp_a1_intro1. Sometimes runners claim it's off by a tick, but on checking again it's OK. If it's tick-precise or not is still debatable, but it's usually no more than 1 off. If you want to give me intro demos (Dropbox them and tweet the link and your time to @nicktimko) that you've manually timed and tell me the starting tick, I can improve the timing. You can check the tick I said the demo started on by copying out the ticks (Edit, Copy ticks)

Last Map

To figure out when you make the final shot in sp_a4_finale4, I check when you fall sufficiently far through the floor and subtract a fixed amount of time. Ergo, please do not stop recording until GLaDOS pulls you up. From my amateur timing, I'm sometimes off by a tick or several. Like with the intro, if you give me demos you've timed, I can reduce this error.

It's even more broken than you say/It doesn't X. It should really do X.

Report bugs and feature requests here or harass me on twitter @nicktimko.

Updated