Skip to content
This repository was archived by the owner on Dec 12, 2022. It is now read-only.

Commit 3022e94

Browse files
committed
Merge branch 'windows'
2 parents 1cfe04e + 9613f29 commit 3022e94

File tree

187 files changed

+12279
-4883
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+12279
-4883
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
.vscode/
22
*.so
3-
/src/SourceAutoRecord/Features/AirControl.hpp
3+
*.o
4+
obj/
5+
src/Features/AirControl.hpp
46

57
## Ignore Visual Studio temporary files, build results, and
68
## files generated by popular Visual Studio add-ons.

README.md

+29-203
Original file line numberDiff line numberDiff line change
@@ -1,212 +1,38 @@
1-
[![Build Version](https://img.shields.io/badge/version-v1.7--linux-brightgreen.svg)](https://github.com/NeKzor/SourceAutoRecord/projects/3)
2-
[![Build Version](https://img.shields.io/badge/version-v1.5--windows-orange.svg)](https://github.com/NeKzor/SourceAutoRecord/projects/2)
1+
[![Build Version](https://img.shields.io/badge/version-v1.7-brightgreen.svg)](https://github.com/NeKzor/SourceAutoRecord/projects/3)
32
[![Release Status](https://img.shields.io/github/release/NeKzor/SourceAutoRecord/all.svg)](https://github.com/NeKzor/SourceAutoRecord/releases)
43

5-
**SourceAutoRecord** allows automatic demo recording, automatic binding, demo parsing, session timing and [much more](#features).
6-
7-
## Overview
8-
- [Supported Games](#supported-games)
9-
- [Features](#features)
10-
- [Automatic Demo Recorder](#automatic-demo-recorder)
11-
- [Automatic Binding](#automatic-binding)
12-
- [Demo Parser](#demo-parser)
13-
- [Session Timing](#session-timing)
14-
- [Summary](#summary)
15-
- [Timer](#timer)
16-
- [Average](#average)
17-
- [Checkpoints](#checkpoints)
18-
- [HUD](#hud)
19-
- [Optional](#optional)
20-
- [Stats](#stats)
21-
- [Cheats](#cheats)
22-
- [Movement](#movement)
23-
- [TAS](#tas)
24-
- [Routing](#routing)
25-
- [Unlocked](#unlocked)
26-
- [Config](#config)
27-
- [Mapping](#mapping)
28-
- [Start & Stop Triggers](#start--stop-triggers)
29-
- [With Checkpoints](#with-checkpoints)
30-
- [Credits](#inspired-by)
31-
32-
## Supported Games
33-
- Portal 2
34-
- Aperture Tag
35-
- Portal Stories: Mel
36-
- Portal
37-
- The Stanley Parable
38-
- The Beginners Guide
39-
- Half-Life 2
40-
414
## Features
425

43-
### Automatic Demo Recorder
44-
- `sar_autorecord <0-1>` keeps recording a demo when loading from a save
45-
46-
### Automatic Binding
47-
- `sar_bind_save <key> [save_name]` binds automatically `save save_name` to the given key when loading
48-
- `sar_save_flag [echo_message]` appends `;echo message` to the save bind
49-
- `sar_bind_reload <key> [save_name]` binds automatically `save save_name;reload` to the given key when loading
50-
- `sar_unbind_save` unbinds the key and stops automatic binding for `sar_bind_save`
51-
- `sar_unbind_reload` unbinds the key and stops automatic binding for `sar_bind_reload`
52-
53-
Save files will be named _2, _3, etc.
54-
File indexing will be synced automatically with the demo recorder when recording with demos.
55-
56-
### Demo Parser
57-
- `sar_time_demo [demo_name]` parses a demo and prints some useful information about it
58-
- Passing an empty string will take the last played demo from the demo player
59-
- `sar_time_demo_dev` prints demo's console commands and packets when using `sar_time_demo`
60-
- Use `con_log [file_name]` to export the extra data into a file
61-
- `sar_time_demos [demo_name] [demo_name2] [etc.]` parses multiple demos
62-
63-
### Session Timing
64-
- `sar_session` prints current tick count since the server has loaded
65-
66-
##### Summary
67-
- `sar_sum_here` starts saving the total tick count of each session
68-
- `sar_sum_stop` stops counting
69-
- `sar_sum_reset` resets the counter
70-
- `sar_sum_result` prints the result of all saved sessions
71-
- `sar_sum_during_session <0-1>` counts current session too
72-
73-
### Timer
74-
- `sar_timer_start` starts or restarts the timer, counting from invocation
75-
- `sar_timer_stop` stops timer
76-
- `sar_timer_result` prints result
77-
- `sar_timer_always_running <0-1>` doesn't stop the timer when disconnecting from server
78-
79-
Mappers can use this for accurate timing, [see below](#mapping).
80-
81-
##### Average
82-
- `sar_avg_start` starts calculating the average of the timer
83-
- `sar_avg_stop` stops calculation
84-
- `sar_avg_result` prints result
85-
86-
##### Checkpoints
87-
- `sar_cps_add` saves current timer value
88-
- `sar_cps_clear` resets all saved values
89-
- `sar_cps_result` prints result of all checkpoints
90-
91-
### HUD
92-
- `sar_hud_text <0-1>` draws given string
93-
- `sar_hud_position <0-1>` draws player's position
94-
- `sar_hud_angles <0-1>` draws player's view angles
95-
- `sar_hud_velocity <0-2>` draws player's velocity
96-
- `sar_hud_session <0-1>` draws current session value
97-
- `sar_hud_last_session <0-1>` draws value of latest completed session
98-
- `sar_hud_sum <0-1>` draws summary value of sessions
99-
- `sar_hud_timer <0-1>` draws timer value
100-
- `sar_hud_avg <0-1>` draws current average of timer
101-
- `sar_hud_cps <0-1>` draws last checkpoint value of timer
102-
- `sar_hud_demo <0-1>` draws current name, tick and time of demo recorder or demo player
103-
- `sar_hud_jumps <0-1>` draws total jump count
104-
- `sar_hud_portals <0-1>` draws total portal count
105-
- `sar_hud_steps <0-1>` draws total step count
106-
- `sar_hud_distance <0-1>` draws calculated jump distance
107-
- `sar_hud_trace <0-1>` draws tracer result
108-
- `sar_hud_velocity_peak <0-1>` draws velocity peak
109-
- `sar_hud_jump <0-1>` draws last jump distance
110-
- `sar_hud_jump_peak <0-1>` draws jump distance peak
111-
112-
##### Optional
113-
- `sar_hud_default_spacing` space between HUD elements
114-
- `sar_hud_default_padding_x` additional padding on x-axis
115-
- `sar_hud_default_padding_y` additional padding on y-axis
116-
- `sar_hud_default_font_index` font index
117-
- `sar_hud_default_font_color` font color
118-
119-
### Stats
120-
- `sar_stats_jumps` prints jump stats
121-
- `sar_stats_jumps_reset` resets jump stats
122-
- `sar_stats_steps` prints step stats
123-
- `sar_stats_steps_reset` resets step stats
124-
- `sar_stats_velocity` prints velocity stats
125-
- `sar_stats_velocity_reset` resets velocity stats
126-
- `sar_stats_reset` resets all stats
127-
- `sar_stats_jumps_xy <0-1>` saves jump distance peak as 2d-vector
128-
- `sar_stats_velocity_peak_xy <0-1>` saves velocity peak as 2d-vector
129-
- `sar_stats_auto_reset <0-2>` resets all stats automatically
130-
131-
### Cheats
132-
- `sar_teleport` teleports player to a saved location
133-
- `sar_teleport_setpos` saves current location for teleportation
134-
- `sar_disable_challenge_stats_hud <0-1>` disables the challenge stats HUD in challenge mode (Portal 2)
135-
136-
#### Movement
137-
- `sar_autojump <0-1>` enables tick-perfect jumping on the server
138-
- `sar_jumpboost <0-2>` enables ABH or HL2-Bhop movement on the server (Portal 2 Engine)
139-
- `sar_aircontrol <0-1>` enables more air-control movement on the server (Portal 2 Engine)
140-
- `+bhop` makes the player jump (The Stanley Parable)
141-
142-
#### TAS
143-
- `sar_tas_frame_at <frame> [command]` adds a command frame to the queue at specified frame
144-
- `sar_tas_frame_after <delay> [command]` adds a command frame to the queue, relatively to last added frame
145-
- `sar_tas_frames_at <frame> <interval> <last_frame> [command]` adds command frame multiple times to the queue at specified frame
146-
- `sar_tas_frames_after <delay> <interval> <length> [command]` adds command frame multiple times to the queue, relatively to last added frame
147-
- `sar_tas_start` starts executing queued commands
148-
- `sar_tas_reset` stops execution and clears all queued commands
149-
- `sar_tas_autostart <0-1>` starts playing queued commands automatically on first frame after a load
150-
151-
Here is a simple TAS of [Propulsion Catch](https://gist.github.com/NeKzor/5ba4fd9bafc80855a395b4a5f03f1c6e).
152-
153-
#### Routing
154-
- `sar_trace_a` saves first location to measure a distance
155-
- `sar_trace_b` saves second location to measure a distance
156-
- `sar_trace_result` prints calculated distance between saved locations
157-
- `sar_velocity_peak` prints latest velocity peak
158-
- `sar_velocity_peak_reset` resets saved velocity peak
159-
- `sar_velocity_peak_xy <0-1>` saves 2D velocity peak
160-
161-
##### Unlocked
162-
- `sv_bonus_challenge` (Portal 2)
163-
- `sv_accelerate`*
164-
- `sv_airaccelerate`*
165-
- `sv_friction`*
166-
- `sv_maxspeed`*
167-
- `sv_stopspeed`*
168-
- `sv_maxvelocity`*
169-
- `sv_footsteps`*
170-
- `sv_transition_fade_time` (Portal 2)*
171-
- `sv_laser_cube_autoaim` (Portal 2)*
172-
- `ui_loadingscreen_transition_time` (Portal 2)*
173-
- `hide_gun_when_holding` (Portal 2)
174-
175-
*Flagged as cheat.
176-
177-
### Config
178-
- `sar_cvars_save` saves important ConVar values to a file
179-
- `sar_cvars_load` loads saved ConVar values
180-
181-
## Mapping
182-
183-
### Start & Stop Triggers
184-
- Place a `point_servercommand` object anywhere in the map
185-
- Use two `trigger_multiple` objects for start and stop
186-
- Add `OnStartTouch` as output
187-
- Target the created servercommand object
188-
- Select `Command` as input
189-
- Use `sar_timer_start` as parameter
190-
- Do the same for the second trigger with `sar_timer_stop`
191-
192-
![start.png](docs/start.png)
193-
194-
### With Checkpoints
195-
- Use `trigger_multiple` object for start
196-
- Trigger `sar_timer_start`
197-
- Trigger `sar_cps_clear`
198-
- Enable checkpoint object
199-
- Use `trigger_multiple` object for checkpoint
200-
- Trigger `sar_cps_add`
201-
- Disable itself
202-
- Use `trigger_multiple` object for stop
203-
- Trigger `sar_timer_stop`
204-
205-
![cpstart.png](docs/cpstart.png)
206-
![cp1.png](docs/cp1.png)
6+
- Automatic Demo Recorder
7+
- Automatic Binding
8+
- Demo Parser
9+
- Session Timing
10+
- HUDs
11+
- A lot of cheats
12+
13+
## Support
14+
15+
Game|Windows|Linux
16+
---|:-:|:-:
17+
Portal 2|✔|✔
18+
Aperture Tag|✔|✔
19+
Portal Stories: Mel|✔|✔
20+
The Stanley Parable|✔|✔
21+
The Beginners Guide|✔|✔
22+
Half-Life 2|✔|✔
23+
Portal|✖|✔
24+
25+
## Docs
26+
27+
- [Issues & Troubleshooting](doc/issue.md)
28+
- [Mapping](doc/mapping.md)
29+
- [Maps](doc/maps.md)
30+
- [Showcases](doc/showcases.md)
31+
- [Tool-Assisted-Speedruns](doc/tas.md)
32+
- [Console Commands & Variables](https://nekzor.github.io/cvars/sar)
20733

20834
## Inspired By
209-
- [SourcePauseTool](https://github.com/YaLTeR/SourcePauseTool)
21035
- [SourceDemoRender](https://github.com/crashfort/SourceDemoRender)
36+
- [SourcePauseTool](https://github.com/YaLTeR/SourcePauseTool)
21137
- [SourceSplit](https://github.com/fatalis/SourceSplit)
21238
- [cstrike-basehook-linux](https://github.com/aixxe/cstrike-basehook-linux)

SourceAutoRecord.sln

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.27130.2010
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SourceAutoRecord", "src\SourceAutoRecord.vcxproj", "{3F6459A9-566E-4CAC-A412-C03FF51D67E9}"
7+
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4990948C-3306-40BA-9EAD-594A5520043F}"
9+
ProjectSection(SolutionItems) = preProject
10+
.gitattributes = .gitattributes
11+
.gitignore = .gitignore
12+
makefile = makefile
13+
README.md = README.md
14+
EndProjectSection
15+
EndProject
16+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "doc", "doc", "{2234E52A-D21C-4984-B830-0D1EBC6842C5}"
17+
ProjectSection(SolutionItems) = preProject
18+
doc\issue.md = doc\issue.md
19+
doc\mapping.md = doc\mapping.md
20+
doc\maps.md = doc\maps.md
21+
doc\showcases.md = doc\showcases.md
22+
doc\standard.md = doc\standard.md
23+
doc\tas.md = doc\tas.md
24+
EndProjectSection
25+
EndProject
26+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "images", "images", "{B82DAA33-1051-496B-A05A-58BB70E8BC02}"
27+
ProjectSection(SolutionItems) = preProject
28+
doc\images\cp1.png = doc\images\cp1.png
29+
doc\images\cpstart.png = doc\images\cpstart.png
30+
doc\images\failed_to_load.png = doc\images\failed_to_load.png
31+
doc\images\feature_request.png = doc\images\feature_request.png
32+
doc\images\game_crashed.png = doc\images\game_crashed.png
33+
doc\images\screenie.png = doc\images\screenie.png
34+
doc\images\start.png = doc\images\start.png
35+
doc\images\unable_to_load_plugin.png = doc\images\unable_to_load_plugin.png
36+
EndProjectSection
37+
EndProject
38+
Global
39+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
40+
Debug|Any CPU = Debug|Any CPU
41+
Debug|x64 = Debug|x64
42+
Debug|x86 = Debug|x86
43+
Release|Any CPU = Release|Any CPU
44+
Release|x64 = Release|x64
45+
Release|x86 = Release|x86
46+
EndGlobalSection
47+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
48+
{3F6459A9-566E-4CAC-A412-C03FF51D67E9}.Debug|Any CPU.ActiveCfg = Debug|Win32
49+
{3F6459A9-566E-4CAC-A412-C03FF51D67E9}.Debug|x64.ActiveCfg = Debug|x64
50+
{3F6459A9-566E-4CAC-A412-C03FF51D67E9}.Debug|x64.Build.0 = Debug|x64
51+
{3F6459A9-566E-4CAC-A412-C03FF51D67E9}.Debug|x86.ActiveCfg = Release|Win32
52+
{3F6459A9-566E-4CAC-A412-C03FF51D67E9}.Debug|x86.Build.0 = Release|Win32
53+
{3F6459A9-566E-4CAC-A412-C03FF51D67E9}.Release|Any CPU.ActiveCfg = Release|Win32
54+
{3F6459A9-566E-4CAC-A412-C03FF51D67E9}.Release|x64.ActiveCfg = Release|x64
55+
{3F6459A9-566E-4CAC-A412-C03FF51D67E9}.Release|x64.Build.0 = Release|x64
56+
{3F6459A9-566E-4CAC-A412-C03FF51D67E9}.Release|x86.ActiveCfg = Release|Win32
57+
{3F6459A9-566E-4CAC-A412-C03FF51D67E9}.Release|x86.Build.0 = Release|Win32
58+
EndGlobalSection
59+
GlobalSection(SolutionProperties) = preSolution
60+
HideSolutionNode = FALSE
61+
EndGlobalSection
62+
GlobalSection(NestedProjects) = preSolution
63+
{2234E52A-D21C-4984-B830-0D1EBC6842C5} = {4990948C-3306-40BA-9EAD-594A5520043F}
64+
{B82DAA33-1051-496B-A05A-58BB70E8BC02} = {2234E52A-D21C-4984-B830-0D1EBC6842C5}
65+
EndGlobalSection
66+
GlobalSection(ExtensibilityGlobals) = postSolution
67+
SolutionGuid = {FE1A6506-7258-47FF-839A-FF441AAA310C}
68+
EndGlobalSection
69+
EndGlobal

build.sh

-5
This file was deleted.
File renamed without changes.
File renamed without changes.

doc/images/failed_to_load.png

13.8 KB
Loading

doc/images/feature_request.png

12.4 KB
Loading

doc/images/game_crashed.png

14.4 KB
Loading

doc/images/screenie.png

4.95 KB
Loading
File renamed without changes.

doc/images/unable_to_load_plugin.png

18.7 KB
Loading

doc/issue.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## SAR: Issues & Troubleshooting
2+
3+
### The classic "it doesnt' work"
4+
[![failed_to_load](images/failed_to_load.png)](images/failed_to_load.png)
5+
6+
---
7+
### "My game crashed :("
8+
[![game_crashed](images/game_crashed.png)](images/game_crashed.png)
9+
10+
---
11+
### Unable to load plugin "sar"
12+
13+
[![unable_to_load_plugin](images/unable_to_load_plugin.png)](images/unable_to_load_plugin.png)
14+
15+
---
16+
### "Gimme xyz!"
17+
[![feature_request](images/feature_request.png)](images/feature_request.png)
18+
19+
---
20+
### "It works"
21+
[![screenie](images/screenie.png)](images/screenie.png)

doc/mapping.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## SAR: Mapping
2+
Add SAR timing to your map!
3+
4+
### Start & Stop Triggers
5+
- Place a `point_servercommand` object anywhere in the map
6+
- Use two `trigger_multiple` objects for start and stop
7+
- Add `OnStartTouch` as output
8+
- Target the created servercommand object
9+
- Select `Command` as input
10+
- Use `sar_timer_start` as parameter
11+
- Do the same for the second trigger with `sar_timer_stop`
12+
13+
![start.png](images/start.png)
14+
15+
### Using Checkpoints
16+
- Use `trigger_multiple` object for start
17+
- Trigger `sar_timer_start`
18+
- Trigger `sar_cps_clear`
19+
- Enable checkpoint object
20+
- Use `trigger_multiple` object for checkpoint
21+
- Trigger `sar_cps_add`
22+
- Disable itself
23+
- Use `trigger_multiple` object for stop
24+
- Trigger `sar_timer_stop`
25+
26+
![cpstart.png](images/cpstart.png)
27+
![cp1.png](images/cp1.png)

0 commit comments

Comments
 (0)