SourcePP: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Create SourcePP page)
 
(Doxygen-generated documentation has been moved to a subfolder of the full site)
 
(3 intermediate revisions by the same user not shown)
Line 36: Line 36:
| <code>vcryptpp</code> || [[VICE]], [[Vfont|VFONT]] || C, C#, Python
| <code>vcryptpp</code> || [[VICE]], [[Vfont|VFONT]] || C, C#, Python
|-
|-
| <code>vpkpp</code> || 007, FGP, FPX, [[GCF]], [[GMA]], HOG, OL, ORE, [[PAK]], PCK, SIN, [[VPK]], [[VPK (file format)/Vampire: The Masquerade – Bloodlines|VPK (V:TMB)]], VPP, [[WAD]], XZP, XZP2, [[ZIP]] || C, C#, Python
| <code>vpkpp</code> || 007, FGP, FPX, [[GCF]], [[GMA]], HOG, HROT, [[OL]], ORE, [[PAK]], PCK, SIN, [[VPK]], [[VPK (file format)/Vampire: The Masquerade – Bloodlines|VPK (V:TMB)]], VPP, [[WAD]], XZP, XZP2, [[ZIP]] || C, C#, Python
|-
|-
| <code>vtfpp</code> || [[PPL]], [[Animated Particles|SHT]], [[Vampire: The Masquerade – Bloodlines|TTH/TTZ]], [[VTF]], [[VTFX file format|VTFX]], VTF3, XTF (as well as many image formats) || C, Python
| <code>vtfpp</code> || FRAMES, [[PPL]], [[Animated Particles|SHT]], [[Vampire: The Masquerade – Bloodlines|TTH/TTZ]], [[VTF]], [[VTFX file format|VTFX]], VTF3, XTF (as well as many image formats) || C, Python
|}
|}


Line 48: Line 48:
== Production Ready ==
== Production Ready ==


Performance is an important consideration during development, and libraries are built with this in mind.
Performance is an important consideration during development, and libraries are written with performance in mind from the outset.
For example, the <code>vtfpp</code> library has been benchmarked as being many times faster than [[VTFLib]], likely due to the "pay for what you use" design and usage of threading for easily parallelized tasks.
For example, the <code>vtfpp</code> library has been benchmarked as being many times faster than [[VTFLib]], likely due to a combination of the "pay for what you use" API, usage of threading for easily parallelized tasks, and optimized image format conversion routines.


These libraries are used by {{VPKEdit|4}}, [https://github.com/craftablescience/MareTF/ MareTF], and many other tools written by [[User:Craftablescience|craftablescience]] and others.
These libraries are used by {{VPKEdit|4}}, [https://github.com/craftablescience/MareTF/ MareTF], and many other tools written by [[User:Craftablescience|craftablescience]] and others.
Line 55: Line 55:


== External links ==
== External links ==
*[https://sourcepp.org/ Official website]
*[https://github.com/craftablescience/sourcepp/ GitHub repository]
*[https://github.com/craftablescience/sourcepp/ GitHub repository]
*[https://sourcepp.org/ Doxygen-generated documentation]
*[https://pypi.org/project/sourcepp/ PyPI project page]
*[https://pypi.org/project/sourcepp/ PyPI project page]


{{sdktools|0}}
{{sdktools|0}}
[[Category:Third Party Tools]]
[[Category:Third Party Tools]]

Latest revision as of 07:15, 27 November 2025

SourcePP SourcePP is an MIT-licensed open source collection of several libraries, which can read and write many Source engine file formats. Precompiled builds are distributed for Windows Windows, Linux Linux, and macOS macOS, and should work without issue on any little-endian system (big-endian support is mostly untested, some libraries will not work).

SourcePP is written in C++20. Bindings of varying completeness exist for C, C#, and Python, and bindings for JavaScript and Rust are planned. C++ and Python are the languages with the most support and development focus.

Created by craftablescience, with contributions from many lovely people.

Included Libraries

Please see the project's GitHub readme for more details. The information here is heavily abbreviated. Most file formats in this list can be created from scratch, read from, and written to.

Library File Formats Wrappers
bsppp BSP (Source) Python
dmxpp* DMX
fspp* Source 1 filesystem recreation
gamepp Access information about/send data to a running game instance C, Python
kvpp KeyValues text and binary
mdlpp* MDL, VTX, VVD
sndpp* WAV, XWV
steampp Parses Steam configs, find library folders, library assets, etc. C, Python
toolpp FGD, WC Python
vcryptpp VICE, VFONT C, C#, Python
vpkpp 007, FGP, FPX, GCF, GMA, HOG, HROT, OL, ORE, PAK, PCK, SIN, VPK, VPK (V:TMB), VPP, WAD, XZP, XZP2, ZIP C, C#, Python
vtfpp FRAMES, PPL, SHT, TTH/TTZ, VTF, VTFX, VTF3, XTF (as well as many image formats) C, Python

* These libraries are incomplete and still in development. Their interfaces are unstable and will likely change in the future. Libraries not starred should be considered stable, and their existing interfaces will not change much if at all. Note that wrappers only exist for stable libraries.

Many text-based formats in Source are close to (if not identical to) KeyValues, such as VMT and VMF.

Production Ready

Performance is an important consideration during development, and libraries are written with performance in mind from the outset. For example, the vtfpp library has been benchmarked as being many times faster than VTFLib, likely due to a combination of the "pay for what you use" API, usage of threading for easily parallelized tasks, and optimized image format conversion routines.

These libraries are used by VPKEdit VPKEdit, MareTF, and many other tools written by craftablescience and others. They are used (directly and indirectly) by Portal 2: Community Edition Portal 2: Community Edition and Momentum Mod Momentum Mod to package and/or create some bundled assets. The project's GitHub readme has a more complete list of known consumers.

External links