Convert Figma logo to code with AI

ValveSoftware logosource-sdk-2013

The 2013 edition of the Source SDK

3,758
1,997
3,758
267

Top Related Projects

Doom 3 BFG Edition

Unity C# reference source code.

90,206

Godot Engine – Multi-platform 2D and 3D game engine

3,553

A powerful free cross-platform RTS game engine. - Report issues at https://springrts.com/mantis/

Quick Overview

The Source SDK 2013 is the official Software Development Kit for Valve's Source engine, released in 2013. It provides developers with the tools and resources needed to create mods and games using the Source engine, which has powered popular titles like Half-Life 2, Portal, and Team Fortress 2.

Pros

  • Provides access to a powerful and versatile game engine used in many successful titles
  • Includes a comprehensive set of tools for level design, asset creation, and game logic implementation
  • Offers a large community of developers and modders for support and resources
  • Allows for both single-player and multiplayer game development

Cons

  • The SDK is based on an older version of the Source engine, lacking some modern features
  • Documentation can be outdated or incomplete in some areas
  • Learning curve can be steep for newcomers to game development or the Source engine
  • Limited official support from Valve, as their focus has shifted to newer technologies

Code Examples

// Example 1: Creating a simple entity
class CMyEntity : public CBaseEntity
{
    DECLARE_CLASS( CMyEntity, CBaseEntity );
public:
    void Spawn( void )
    {
        Precache();
        SetModel( "models/mymodel.mdl" );
        SetSolid( SOLID_BBOX );
        AddSolidFlags( FSOLID_NOT_STANDABLE );
        SetMoveType( MOVETYPE_NONE );
    }
};
LINK_ENTITY_TO_CLASS( my_entity, CMyEntity );

This code demonstrates how to create a basic entity in the Source engine, defining its properties and behavior.

// Example 2: Implementing a simple weapon
class CMyWeapon : public CBaseCombatWeapon
{
    DECLARE_CLASS( CMyWeapon, CBaseCombatWeapon );
public:
    void PrimaryAttack( void )
    {
        CBasePlayer *pPlayer = ToBasePlayer( GetOwner() );
        if ( !pPlayer )
            return;

        WeaponSound( SINGLE );
        pPlayer->DoMuzzleFlash();
        SendWeaponAnim( ACT_VM_PRIMARYATTACK );
        pPlayer->SetAnimation( PLAYER_ATTACK1 );

        FireBulletsInfo_t info( 1, pPlayer->Weapon_ShootPosition(), pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES ), vec3_origin, MAX_TRACE_LENGTH, m_iPrimaryAmmoType );
        info.m_pAttacker = pPlayer;
        FireBullets( info );

        m_flNextPrimaryAttack = gpGlobals->curtime + 0.15f;
    }
};
LINK_ENTITY_TO_CLASS( weapon_myweapon, CMyWeapon );

This example shows how to implement a basic weapon in the Source engine, including firing logic and animation handling.

Getting Started

  1. Download the Source SDK 2013 from the GitHub repository.
  2. Install Visual Studio (preferably VS 2013 for compatibility).
  3. Open the solution file in the mp/src folder for multiplayer or sp/src for single-player development.
  4. Build the solution to compile the necessary libraries and tools.
  5. Use the Hammer Editor (found in the bin folder) to create levels and the Source SDK tools to manage assets and game logic.
  6. Refer to the Valve Developer Community (https://developer.valvesoftware.com/wiki/Main_Page) for detailed documentation and tutorials.

Competitor Comparisons

Doom 3 BFG Edition

Pros of DOOM-3-BFG

  • More modern codebase, utilizing C++11 features and improved rendering techniques
  • Includes full game content, allowing for easier modding and experimentation
  • Better cross-platform support, including console versions

Cons of DOOM-3-BFG

  • Less extensive documentation and community resources compared to Source SDK
  • Smaller modding community and fewer available tools
  • More limited in terms of multiplayer functionality and networking capabilities

Code Comparison

DOOM-3-BFG (idTech 4 engine):

void idRenderWorldLocal::AddEntityDefs( const std::vector<renderEntity_t *> &entityDefs ) {
    for ( const auto *def : entityDefs ) {
        AddEntityDef( def );
    }
}

Source SDK (Source engine):

void CClientRenderablesList::AddRenderable( IClientRenderable *pRenderable, int renderGroup, RenderableInstance_t instance )
{
    m_RenderGroups[renderGroup].m_Renderables.AddToTail( pRenderable );
    m_RenderGroups[renderGroup].m_RenderableInstanceData.AddToTail( instance );
}

The DOOM-3-BFG code showcases more modern C++ practices, while the Source SDK code reflects an older C++ style with custom container classes.

Unity C# reference source code.

Pros of UnityCsReference

  • More active development and frequent updates
  • Broader scope, covering a complete game engine
  • Extensive documentation and community support

Cons of UnityCsReference

  • Larger codebase, potentially more complex to navigate
  • Closed-source engine core, limiting full customization
  • Steeper learning curve for beginners

Code Comparison

UnityCsReference (C#)

public class GameObject : Object
{
    public Transform transform { get; }
    public GameObject(string name) : base(name) { }
    public T GetComponent<T>() where T : Component { }
}

source-sdk-2013 (C++)

class CBaseEntity : public IServerEntity
{
public:
    virtual Vector GetAbsOrigin() const;
    virtual void SetAbsOrigin(const Vector& origin);
    virtual const char* GetClassname();
};

The UnityCsReference code showcases Unity's object-oriented approach with C#, emphasizing ease of use and modern language features. In contrast, source-sdk-2013 uses C++ with a focus on performance and lower-level control, typical of game engine development in the early 2000s.

UnityCsReference provides a more accessible and feature-rich environment for game development, while source-sdk-2013 offers deeper engine-level control at the cost of complexity. The choice between them depends on project requirements, team expertise, and desired level of customization.

90,206

Godot Engine – Multi-platform 2D and 3D game engine

Pros of Godot

  • Open-source and free to use, with a large community and extensive documentation
  • Cross-platform support for multiple target platforms
  • User-friendly editor with visual scripting capabilities

Cons of Godot

  • Less optimized for high-end graphics compared to Source SDK
  • Smaller ecosystem of pre-made assets and tools
  • Learning curve for developers accustomed to traditional game engines

Code Comparison

Godot (GDScript):

extends KinematicBody

var velocity = Vector3.ZERO
const SPEED = 10

func _physics_process(delta):
    velocity = move_and_slide(velocity, Vector3.UP)

Source SDK (C++):

class CPlayer : public CBasePlayer
{
public:
    void Think()
    {
        BaseClass::Think();
        // Player-specific logic here
    }
};

The Godot example showcases its simplified syntax and built-in physics functions, while the Source SDK example demonstrates its C++ foundation and class inheritance structure. Godot's approach is more accessible for beginners, while Source SDK offers more low-level control.

3,553

A powerful free cross-platform RTS game engine. - Report issues at https://springrts.com/mantis/

Pros of Spring

  • More active development and larger community support
  • Broader application scope, suitable for various enterprise-level projects
  • Extensive documentation and learning resources available

Cons of Spring

  • Steeper learning curve due to its comprehensive nature
  • Potentially heavier resource consumption for smaller applications
  • More complex configuration and setup process

Code Comparison

Spring (Java):

@RestController
public class HelloController {
    @GetMapping("/hello")
    public String hello() {
        return "Hello, World!";
    }
}

Source SDK 2013 (C++):

class CMyGameRules : public CGameRules
{
public:
    virtual void Think() override;
    virtual bool ClientCommand(CBaseEntity *pEdict, const CCommand &args) override;
};

The Spring example showcases a simple REST controller, highlighting its focus on web applications and ease of creating endpoints. The Source SDK example demonstrates game rule implementation, emphasizing its game development orientation.

Spring is a versatile framework for building enterprise applications, while Source SDK 2013 is specifically designed for game development using the Source engine. Spring offers more flexibility and broader application, but may be overkill for simple projects. Source SDK is more specialized and potentially easier to use for game-specific tasks, but has a narrower scope of application.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

           SOURCE 1 SDK LICENSE

Source SDK Copyright(c) Valve Corp.

THIS DOCUMENT DESCRIBES A CONTRACT BETWEEN YOU AND VALVE CORPORATION ("Valve"). PLEASE READ IT BEFORE DOWNLOADING OR USING THE SOURCE ENGINE SDK ("SDK"). BY DOWNLOADING AND/OR USING THE SOURCE ENGINE SDK YOU ACCEPT THIS LICENSE. IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE PLEASE DON’T DOWNLOAD OR USE THE SDK.

You may, free of charge, download and use the SDK to develop a modified Valve game running on the Source engine. You may distribute your modified Valve game in source and object code form, but only for free. Terms of use for Valve games are found in the Steam Subscriber Agreement located here: http://store.steampowered.com/subscriber_agreement/

You may copy, modify, and distribute the SDK and any modifications you make to the SDK in source and object code form, but only for free. Any distribution of this SDK must include this LICENSE file and thirdpartylegalnotices.txt.

Any distribution of the SDK or a substantial portion of the SDK must include the above copyright notice and the following:

DISCLAIMER OF WARRANTIES.  THE SOURCE SDK AND ANY 
OTHER MATERIAL DOWNLOADED BY LICENSEE IS PROVIDED 
"AS IS".  VALVE AND ITS SUPPLIERS DISCLAIM ALL 
WARRANTIES WITH RESPECT TO THE SDK, EITHER EXPRESS 
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED 
WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, 
TITLE AND FITNESS FOR A PARTICULAR PURPOSE.  

LIMITATION OF LIABILITY.  IN NO EVENT SHALL VALVE OR 
ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, 
INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER 
(INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF 
BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF 
BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) 
ARISING OUT OF THE USE OF OR INABILITY TO USE THE 
ENGINE AND/OR THE SDK, EVEN IF VALVE HAS BEEN 
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  

   

If you would like to use the SDK for a commercial purpose, please contact Valve at sourceengine@valvesoftware.com.