summaryrefslogtreecommitdiff
path: root/content/notes/source-sdk.md
diff options
context:
space:
mode:
Diffstat (limited to 'content/notes/source-sdk.md')
-rw-r--r--content/notes/source-sdk.md43
1 files changed, 43 insertions, 0 deletions
diff --git a/content/notes/source-sdk.md b/content/notes/source-sdk.md
new file mode 100644
index 0000000..6a63601
--- /dev/null
+++ b/content/notes/source-sdk.md
@@ -0,0 +1,43 @@
++++
+title = 'Source SDK (Team Fortress 2) development notes'
++++
+
+## Websites
+
+* [ValveSoftware/source-sdk-2013](https://github.com/ValveSoftware/source-sdk-2013) - git repo
+* [ValveSoftware/Source-1-Games](https://github.com/ValveSoftware/Source-1-Games) - issue tracker
+
+## Development
+
+Patches are merged by [EricS-Valve](https://github.com/EricS-Valve) from time to time, usually late in the day or on a weekend.
+
+The SDK game code and live TF2 are not identical. There is code in the SDK that is not present in TF2, and vice versa. For example, `NotificationQueue_Add` is [disabled in the SDK](https://github.com/ValveSoftware/source-sdk-2013/blob/9cbe7d5d3c847fb2e2be6049c3e2a72853bd6b85/src/game/client/econ/econ_notifications.cpp#L1292) but not in live TF2. Not to mention, Valve uses Perforce P4 for version control instead of Git.
+
+## Building with Visual Studio 2026
+
+Valve Project Creator (VPC) only targets up to Visual Studio 2022. Visual Studio 2026 can be used if you install the 2022 toolchain:
+```bat
+"C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe" modify --installPath "C:\Program Files\Microsoft Visual Studio\18\Community" ^
+ --add Microsoft.VisualStudio.Component.VC.14.44.17.14.x86.x64 ^
+ --add Microsoft.VisualStudio.Component.VC.14.44.17.14.MFC ^
+ --add Microsoft.VisualStudio.Component.VC.14.44.17.14.ATL
+```
+
+You will need to install Python as well:
+```bat
+winget install Python.Python.3.14
+```
+
+After that, follow the build instructions in README.md.
+
+## Code style
+
+* Use tabs for indentation.
+* Use [hungarian notation](https://en.wikipedia.org/wiki/Hungarian_notation) for any variable that is serialized.
+* Curly braces get a new line. ([Allman style](https://en.wikipedia.org/wiki/Indentation_style#Allman_style))
+* Curly braces can be omitted if the condition body is only one line.
+* Pointer asterisks go on the right, next to the variable name.
+* Put spaces around function arguments.
+* Put spaces around template arguments. (Usually. The code base is like 60-40 in favor of this style.)
+
+All this being said, much of the code base is not consistent. Just pay attention to the surrounding code and match the style.